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

Side by Side Diff: tests_lit/llvm2ice_tests/bool-folding.ll

Issue 1745393002: Subzero. ARM32. Reverts cl 1687553002. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 9 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/arith.ll ('k') | tests_lit/llvm2ice_tests/branch-opt.ll » ('j') | 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 optimization where producers and consumers of i1 (bool) 1 ; This tests the optimization where producers and consumers of i1 (bool)
2 ; variables are combined to implicitly use flags instead of explicitly using 2 ; variables are combined to implicitly use flags instead of explicitly using
3 ; stack or register variables. 3 ; stack or register variables.
4 4
5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ 5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
6 ; RUN: -allow-externally-defined-symbols | FileCheck %s 6 ; RUN: -allow-externally-defined-symbols | FileCheck %s
7 7
8 ; RUN: %if --need=allow_dump --need=target_ARM32 --command %p2i --filetype=asm \ 8 ; RUN: %if --need=allow_dump --need=target_ARM32 --command %p2i --filetype=asm \
9 ; RUN: --target arm32 -i %s --args -O2 --skip-unimplemented \ 9 ; RUN: --target arm32 -i %s --args -O2 --skip-unimplemented \
10 ; RUN: -allow-externally-defined-symbols \ 10 ; RUN: -allow-externally-defined-symbols \
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ret i32 2 48 ret i32 2
49 } 49 }
50 50
51 ; CHECK-LABEL: fold_cmp_br_intervening_insts 51 ; CHECK-LABEL: fold_cmp_br_intervening_insts
52 ; CHECK-NOT: cmp 52 ; CHECK-NOT: cmp
53 ; CHECK: call 53 ; CHECK: call
54 ; CHECK: cmp 54 ; CHECK: cmp
55 ; CHECK: jge 55 ; CHECK: jge
56 ; ARM32-LABEL: fold_cmp_br_intervening_insts 56 ; ARM32-LABEL: fold_cmp_br_intervening_insts
57 ; ARM32: push {{[{].*[}]}} 57 ; ARM32: push {{[{].*[}]}}
58 ; ARM32: movw [[CALL:r[0-9]]], #:lower16:use_value 58 ; ARM32: bl use_value
59 ; ARM32: movt [[CALL]], #:upper16:use_value
60 ; ARM32: blx [[CALL]]
61 ; ARM32: cmp {{r[0-9]+}}, {{r[0-9]+}} 59 ; ARM32: cmp {{r[0-9]+}}, {{r[0-9]+}}
62 ; ARM32: bge 60 ; ARM32: bge
63 ; ARM32: mov r0, #1 61 ; ARM32: mov r0, #1
64 ; ARM32: bx lr 62 ; ARM32: bx lr
65 ; ARM32: mov r0, #2 63 ; ARM32: mov r0, #2
66 ; ARM32: bx lr 64 ; ARM32: bx lr
67 65
68 66
69 ; Cmp/branch non-folding because of live-out. 67 ; Cmp/branch non-folding because of live-out.
70 define internal i32 @no_fold_cmp_br_liveout(i32 %arg1, i32 %arg2) { 68 define internal i32 @no_fold_cmp_br_liveout(i32 %arg1, i32 %arg2) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 %result = select i1 %cmp1, i32 %arg1, i32 %arg2 183 %result = select i1 %cmp1, i32 %arg1, i32 %arg2
186 ret i32 %result 184 ret i32 %result
187 } 185 }
188 186
189 ; CHECK-LABEL: fold_cmp_select_intervening_insts 187 ; CHECK-LABEL: fold_cmp_select_intervening_insts
190 ; CHECK-NOT: cmp 188 ; CHECK-NOT: cmp
191 ; CHECK: call 189 ; CHECK: call
192 ; CHECK: cmp 190 ; CHECK: cmp
193 ; CHECK: cmovl 191 ; CHECK: cmovl
194 ; ARM32-LABEL: fold_cmp_select_intervening_insts 192 ; ARM32-LABEL: fold_cmp_select_intervening_insts
195 ; ARM32: movw [[CALL:r[0-9]]], #:lower16:use_value 193 ; ARM32: bl use_value
196 ; ARM32: movt [[CALL]], #:upper16:use_value
197 ; ARM32: blx [[CALL]]
198 ; ARM32: cmp r{{[0-9]+}}, r{{[0-9]+}} 194 ; ARM32: cmp r{{[0-9]+}}, r{{[0-9]+}}
199 ; ARM32: movlt 195 ; ARM32: movlt
200 ; ARM32: bx lr 196 ; ARM32: bx lr
201 197
202 ; Cmp/multi-select folding. 198 ; Cmp/multi-select folding.
203 define internal i32 @fold_cmp_select_multi(i32 %arg1, i32 %arg2) { 199 define internal i32 @fold_cmp_select_multi(i32 %arg1, i32 %arg2) {
204 entry: 200 entry:
205 %cmp1 = icmp slt i32 %arg1, %arg2 201 %cmp1 = icmp slt i32 %arg1, %arg2
206 %a = select i1 %cmp1, i32 %arg1, i32 %arg2 202 %a = select i1 %cmp1, i32 %arg1, i32 %arg2
207 %b = select i1 %cmp1, i32 %arg2, i32 %arg1 203 %b = select i1 %cmp1, i32 %arg2, i32 %arg1
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 ; ARM32: tst r0, #1 420 ; ARM32: tst r0, #1
425 ; ARM32: bne 421 ; ARM32: bne
426 ; ARM32: tst r1, #1 422 ; ARM32: tst r1, #1
427 ; ARM32: beq 423 ; ARM32: beq
428 ; ARM32: tst r2, #1 424 ; ARM32: tst r2, #1
429 ; ARM32: bne {{.*}}target_true 425 ; ARM32: bne {{.*}}target_true
430 ; ARM32: tst r3, #1 426 ; ARM32: tst r3, #1
431 ; ARM32: beq {{.*}}target_false 427 ; ARM32: beq {{.*}}target_false
432 ; ARM32: tst r4, #1 428 ; ARM32: tst r4, #1
433 ; ARM32: beq {{.*}}target_false 429 ; ARM32: beq {{.*}}target_false
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/arith.ll ('k') | tests_lit/llvm2ice_tests/branch-opt.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698