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

Side by Side Diff: tests_lit/llvm2ice_tests/select-opt.ll

Issue 1417393003: Subzero. ARM32. New bool folding. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixes lit tests. Created 5 years, 1 month 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 ; Simple test of the select instruction. The CHECK lines are only 1 ; Simple test of the select instruction. The CHECK lines are only
2 ; checking for basic instruction patterns that should be present 2 ; checking for basic instruction patterns that should be present
3 ; regardless of the optimization level, so there are no special OPTM1 3 ; regardless of the optimization level, so there are no special OPTM1
4 ; match lines. 4 ; match lines.
5 5
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 -O2 -allow-externally-defined-symbols \ 7 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \
8 ; RUN: | %if --need=target_X8632 --command FileCheck %s 8 ; RUN: | %if --need=target_X8632 --command FileCheck %s
9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
10 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \ 10 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ; CHECK-LABEL: testSelect 44 ; CHECK-LABEL: testSelect
45 ; CHECK: cmp 45 ; CHECK: cmp
46 ; CHECK: cmp 46 ; CHECK: cmp
47 ; CHECK: call {{.*}} R_{{.*}} useInt 47 ; CHECK: call {{.*}} R_{{.*}} useInt
48 ; CHECK: cmp 48 ; CHECK: cmp
49 ; CHECK: cmp 49 ; CHECK: cmp
50 ; CHECK: call {{.*}} R_{{.*}} useInt 50 ; CHECK: call {{.*}} R_{{.*}} useInt
51 ; CHECK: ret 51 ; CHECK: ret
52 ; ARM32-LABEL: testSelect 52 ; ARM32-LABEL: testSelect
53 ; ARM32: cmp 53 ; ARM32: cmp
54 ; ARM32-OM1: cmp
55 ; ARM32: bl {{.*}} useInt 54 ; ARM32: bl {{.*}} useInt
56 ; ARM32: cmp
57 ; ARM32-Om1: cmp
58 ; ARM32-Om1: mov {{.*}}, #20 55 ; ARM32-Om1: mov {{.*}}, #20
56 ; ARM32-O2: mov [[REG:r[0-9]+]], #20
57 ; ARM32: tst
59 ; ARM32-Om1: movne {{.*}}, #10 58 ; ARM32-Om1: movne {{.*}}, #10
60 ; ARM32-O2: movle [[REG:r[0-9]+]], #20 59 ; ARM32-O2: movne [[REG]], #10
61 ; ARM32-O2: movgt [[REG]], #10
62 ; ARM32: bl {{.*}} useInt 60 ; ARM32: bl {{.*}} useInt
63 ; ARM32: bl {{.*}} useInt 61 ; ARM32: bl {{.*}} useInt
64 ; ARM32: bl {{.*}} useInt 62 ; ARM32: bl {{.*}} useInt
65 ; ARM32: bx lr 63 ; ARM32: bx lr
66 64
67 ; Check for valid addressing mode in the cmp instruction when the 65 ; Check for valid addressing mode in the cmp instruction when the
68 ; operand is an immediate. 66 ; operand is an immediate.
69 define internal i32 @testSelectImm32(i32 %a, i32 %b) { 67 define internal i32 @testSelectImm32(i32 %a, i32 %b) {
70 entry: 68 entry:
71 %cond = select i1 false, i32 %a, i32 %b 69 %cond = select i1 false, i32 %a, i32 %b
72 ret i32 %cond 70 ret i32 %cond
73 } 71 }
74 ; CHECK-LABEL: testSelectImm32 72 ; CHECK-LABEL: testSelectImm32
75 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}}, 73 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}},
76 ; ARM32-LABEL: testSelectImm32 74 ; ARM32-LABEL: testSelectImm32
77 ; ARM32-NOT: cmp #{{.*}}, 75 ; ARM32-NOT: cmp #{{.*}},
78 76
79 ; Check for valid addressing mode in the cmp instruction when the 77 ; Check for valid addressing mode in the cmp instruction when the
80 ; operand is an immediate. There is a different x86-32 lowering 78 ; operand is an immediate. There is a different x86-32 lowering
81 ; sequence for 64-bit operands. 79 ; sequence for 64-bit operands.
82 define internal i64 @testSelectImm64(i64 %a, i64 %b) { 80 define internal i64 @testSelectImm64(i64 %a, i64 %b) {
83 entry: 81 entry:
84 %cond = select i1 true, i64 %a, i64 %b 82 %cond = select i1 true, i64 %a, i64 %b
85 ret i64 %cond 83 ret i64 %cond
86 } 84 }
87 ; CHECK-LABEL: testSelectImm64 85 ; CHECK-LABEL: testSelectImm64
88 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}}, 86 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}},
89 ; ARM32-LABEL: testSelectImm64 87 ; ARM32-LABEL: testSelectImm64
90 ; ARM32-NOT: cmp #{{.*}}, 88 ; ARM32-NOT: cmp #{{.*}},
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698