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

Unified Diff: tests_lit/assembler/arm32/vcvt.s32.f32.ll

Issue 1611293003: Add vcvt.s32.f32 instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix not. Created 4 years, 11 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
« no previous file with comments | « 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/vcvt.s32.f32.ll
diff --git a/tests_lit/assembler/arm32/vcvt.s32.f32.ll b/tests_lit/assembler/arm32/vcvt.s32.f32.ll
new file mode 100644
index 0000000000000000000000000000000000000000..94e99df7f3e78e92c2e926738977a79d34b9aa09
--- /dev/null
+++ b/tests_lit/assembler/arm32/vcvt.s32.f32.ll
@@ -0,0 +1,38 @@
+; Show that we know how to translate converting float to signed integer.
+
+; REQUIRES: allow_dump
+
+; Compile using standalone assembler.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \
+; RUN: --reg-use=s20 | FileCheck %s --check-prefix=ASM
+
+; Show bytes in assembled standalone code.
+; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
+; RUN: --args -Om1 --reg-use=s20 | FileCheck %s --check-prefix=DIS
+
+; Compile using integrated assembler.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -Om1 \
+; RUN: --reg-use=s20 \
+; RUN: | FileCheck %s --check-prefix=IASM
+
+; Show bytes in assembled integrated code.
+; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
+; RUN: --args -Om1 --reg-use=s20 | FileCheck %s --check-prefix=DIS
+
+define internal i32 @FloatToSignedInt() {
+; ASM-LABEL: FloatToSignedInt:
+; DIS-LABEL: 00000000 <FloatToSignedInt>:
+; IASM-LABEL: FloatToSignedInt:
+
+entry:
+; ASM-NEXT: .LFloatToSignedInt$entry:
+; IASM-NEXT: .LFloatToSignedInt$entry:
+
+ %v = fptosi float 0.0 to i32
+
+; ASM: vcvt.s32.f32 s20, s20
+; DIS: 14: eebdaaca
+; IASM-NOT: vcvt
+
+ ret i32 %v
+}
« no previous file with comments | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698