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

Unified Diff: tests_lit/assembler/arm32/rbit.ll

Issue 1530233004: add RBIT instruction to the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Update DART source. Created 5 years 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/rbit.ll
diff --git a/tests_lit/assembler/arm32/rev.ll b/tests_lit/assembler/arm32/rbit.ll
similarity index 58%
copy from tests_lit/assembler/arm32/rev.ll
copy to tests_lit/assembler/arm32/rbit.ll
index 6634813cdbb633f0adf0e8fef7028e702ee11110..f7300e513fd1c36332166db0d07c145a52c0c7a1 100644
--- a/tests_lit/assembler/arm32/rev.ll
+++ b/tests_lit/assembler/arm32/rbit.ll
@@ -1,4 +1,4 @@
-; Show that we know how to translate rev (used in bswap).
+; Show that we know how to translate add.
Jim Stichnoth 2015/12/17 19:31:16 rbit
Karl 2015/12/18 15:41:25 Done.
; NOTE: We use -O2 to get rid of memory stores.
@@ -20,30 +20,25 @@
; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
; RUN: --args -O2 | FileCheck %s --check-prefix=DIS
-declare i16 @llvm.bswap.i16(i16)
+declare i32 @llvm.cttz.i32(i32, i1)
-define internal i32 @testRev(i32 %a) {
-; ASM-LABEL:testRev:
-; DIS-LABEL:00000000 <testRev>:
-; IASM-LABEL:testRev:
+define internal i32 @testRbit(i32 %a) {
+; ASM-LABEL: testRbit:
+; DIS-LABEL: 00000000 <testRbit>:
+; IASM-LABEL: testRbit:
entry:
-; ASM-NEXT:.LtestRev$entry:
-; IASM-NEXT:.LtestRev$entry:
+; ASM-NEXT: .LtestRbit$entry:
+; IASM-NEXT: .LtestRbit$entry:
- %a.arg_trunc = trunc i32 %a to i16
- %v = tail call i16 @llvm.bswap.i16(i16 %a.arg_trunc)
+ %x = call i32 @llvm.cttz.i32(i32 %a, i1 0)
-; ***** Example of rev instruction. *****
-; ASM-NEXT: rev r0, r0
-; DIS-NEXT: 0: e6bf0f30
+; ASM-NEXT: rbit r0, r0
+; DIS-NEXT: 0: e6ff0f30
; IASM-NEXT: .byte 0x30
; IASM-NEXT: .byte 0xf
-; IASM-NEXT: .byte 0xbf
+; IASM-NEXT: .byte 0xff
; IASM-NEXT: .byte 0xe6
-; ASM-NEXT: lsr r0, r0, #16
-
- %.ret_ext = zext i16 %v to i32
- ret i32 %.ret_ext
+ ret i32 %x
}
« 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