Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: tests_lit/assembler/arm32/vec-move.ll

Issue 1694533002: Add move vector to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/IceInstARM32.cpp ('K') | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/assembler/arm32/vec-move.ll
diff --git a/tests_lit/assembler/arm32/vec-move.ll b/tests_lit/assembler/arm32/vec-move.ll
new file mode 100644
index 0000000000000000000000000000000000000000..ca2ebe30203df1dbfbb6c934aa43fdec9f58b4c1
--- /dev/null
+++ b/tests_lit/assembler/arm32/vec-move.ll
@@ -0,0 +1,39 @@
+; Test that we handle a vector move.
+
+; NOTE: We use -O2 to force a vector move for the return value.
+
+; REQUIRES: allow_dump
+
+; Compile using standalone assembler.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \
+; RUN: | FileCheck %s --check-prefix=ASM
+
+; Show bytes in assembled standalone code.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
+; RUN: --args -O2 \
+; RUN: | FileCheck %s --check-prefix=DIS
+
+; Compile using integrated assembler.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
+; RUN: | FileCheck %s --check-prefix=IASM
+
+; Show bytes in assembled integrated code.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
+; RUN: --args -O2 \
+; RUN: | FileCheck %s --check-prefix=DIS
+
+
+define internal <4 x float> @testMoveVector(<4 x i32> %a) {
+; ASM-LABEL: testMoveVector:
+; DIS-LABEL:{{.+}} <testMoveVector>:
+; IASM-LABEL: testMoveVector:
+
+entry:
+ %0 = sitofp <4 x i32> %a to <4 x float>
Eric Holk 2016/02/11 19:24:22 This may not always create a move. Right now this
Karl 2016/02/11 22:10:28 Unless you can come up with a better example, I su
Eric Holk 2016/02/11 22:51:39 I agree. This seems like the best course of action
+ ret <4 x float> %0
+
+; ASM: vmov.f32 q0, q1
+; DIS: 3c: eef03a40
+; IASM-NOT: vmov.f32 q0, q1
+
+}
« src/IceInstARM32.cpp ('K') | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698