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

Side by Side Diff: tests_lit/llvm2ice_tests/unreachable.ll

Issue 1210073017: Subzero: Avoid unused insts for ARM Om1 lowering for arithmetic (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: change break to return where useful to make it obvious Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 ; This tests the basic structure of the Unreachable instruction. 1 ; This tests the basic structure of the Unreachable instruction.
2 2
3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
4 ; RUN: --target x8632 -i %s --args -O2 \ 4 ; RUN: --target x8632 -i %s --args -O2 \
5 ; RUN: | %if --need=target_X8632 --command FileCheck %s 5 ; RUN: | %if --need=target_X8632 --command FileCheck %s
6 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 6 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
7 ; RUN: --target x8632 -i %s --args -Om1 \ 7 ; RUN: --target x8632 -i %s --args -Om1 \
8 ; RUN: | %if --need=target_X8632 --command FileCheck %s 8 ; RUN: | %if --need=target_X8632 --command FileCheck %s
9 9
10 ; RUN: %if --need=target_ARM32 --need=allow_dump \ 10 ; RUN: %if --need=target_ARM32 --need=allow_dump \
11 ; RUN: --command %p2i --filetype=asm --assemble \ 11 ; RUN: --command %p2i --filetype=asm --assemble \
12 ; RUN: --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ 12 ; RUN: --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \
13 ; RUN: | %if --need=target_ARM32 --need=allow_dump \ 13 ; RUN: | %if --need=target_ARM32 --need=allow_dump \
14 ; RUN: --command FileCheck --check-prefix ARM32 %s 14 ; RUN: --command FileCheck --check-prefix ARM32 %s
15 ; RUN: %if --need=target_ARM32 --need=allow_dump \
16 ; RUN: --command %p2i --filetype=asm --assemble \
17 ; RUN: --disassemble --target arm32 -i %s --args -Om1 --skip-unimplemented \
18 ; RUN: | %if --need=target_ARM32 --need=allow_dump \
19 ; RUN: --command FileCheck --check-prefix ARM32 %s
15 20
16 define internal i32 @divide(i32 %num, i32 %den) { 21 define internal i32 @divide(i32 %num, i32 %den) {
17 entry: 22 entry:
18 %cmp = icmp ne i32 %den, 0 23 %cmp = icmp ne i32 %den, 0
19 br i1 %cmp, label %return, label %abort 24 br i1 %cmp, label %return, label %abort
20 25
21 abort: ; preds = %entry 26 abort: ; preds = %entry
22 unreachable 27 unreachable
23 28
24 return: ; preds = %entry 29 return: ; preds = %entry
25 %div = sdiv i32 %num, %den 30 %div = sdiv i32 %num, %den
26 ret i32 %div 31 ret i32 %div
27 } 32 }
28 33
29 ; CHECK-LABEL: divide 34 ; CHECK-LABEL: divide
30 ; CHECK: cmp 35 ; CHECK: cmp
31 ; CHECK: ud2 36 ; CHECK: ud2
32 ; CHECK: cdq 37 ; CHECK: cdq
33 ; CHECK: idiv 38 ; CHECK: idiv
34 ; CHECK: ret 39 ; CHECK: ret
35 40
36 ; ARM32-LABEL: divide 41 ; ARM32-LABEL: divide
37 ; ARM32: cmp 42 ; ARM32: cmp
38 ; ARM32: .word 0xe7fedef0 43 ; ARM32: .word 0xe7fedef0
39 ; ARM32: bl {{.*}} __divsi3 44 ; ARM32: bl {{.*}} __divsi3
40 ; ARM32: bx lr 45 ; ARM32: bx lr
OLDNEW
« src/IceTargetLoweringARM32.cpp ('K') | « tests_lit/llvm2ice_tests/callindirect.pnacl.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698