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

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

Issue 1687553002: Change all ARM calls into indirect calls. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. 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 unified diff | Download patch
« no previous file with comments | « tests_lit/llvm2ice_tests/select-opt.ll ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 \
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 \ 15 ; RUN: %if --need=target_ARM32 --need=allow_dump \
16 ; RUN: --command %p2i --filetype=asm --assemble \ 16 ; RUN: --command %p2i --filetype=asm --assemble \
17 ; RUN: --disassemble --target arm32 -i %s --args -Om1 --skip-unimplemented \ 17 ; RUN: --disassemble --target arm32 -i %s --args -Om1 \
18 ; RUN: | %if --need=target_ARM32 --need=allow_dump \ 18 ; RUN: | %if --need=target_ARM32 --need=allow_dump \
19 ; RUN: --command FileCheck --check-prefix ARM32 %s 19 ; RUN: --command FileCheck --check-prefix ARM32 %s
20 20
21 define internal i32 @divide(i32 %num, i32 %den) { 21 define internal i32 @divide(i32 %num, i32 %den) {
22 entry: 22 entry:
23 %cmp = icmp ne i32 %den, 0 23 %cmp = icmp ne i32 %den, 0
24 br i1 %cmp, label %return, label %abort 24 br i1 %cmp, label %return, label %abort
25 25
26 abort: ; preds = %entry 26 abort: ; preds = %entry
27 unreachable 27 unreachable
28 28
29 return: ; preds = %entry 29 return: ; preds = %entry
30 %div = sdiv i32 %num, %den 30 %div = sdiv i32 %num, %den
31 ret i32 %div 31 ret i32 %div
32 } 32 }
33 33
34 ; CHECK-LABEL: divide 34 ; CHECK-LABEL: divide
35 ; CHECK: cmp 35 ; CHECK: cmp
36 ; CHECK: ud2 36 ; CHECK: ud2
37 ; CHECK: cdq 37 ; CHECK: cdq
38 ; CHECK: idiv 38 ; CHECK: idiv
39 ; CHECK: ret 39 ; CHECK: ret
40 40
41 ; ARM32-LABEL: divide 41 ; ARM32-LABEL: divide
42 ; ARM32: tst 42 ; ARM32: tst
43 ; ARM32: .word 0xe7fedef0 43 ; ARM32: .word 0xe7fedef0
44 ; ARM32: bl {{.*}} __divsi3 44 ; ARM32: movw [[CALL:r[0-9]]], {{.+}} __divsi3
45 ; ARM32: movt [[CALL]]
46 ; ARM32; blx [[CALL]]
45 ; ARM32: bx lr 47 ; ARM32: bx lr
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/select-opt.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698