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

Side by Side Diff: tests_lit/llvm2ice_tests/branch-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 ; Tests the branch optimizations under O2 (against a lack of 1 ; Tests the branch optimizations under O2 (against a lack of
2 ; optimizations under Om1). 2 ; optimizations under Om1).
3 3
4 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 4 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
5 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \ 5 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \
6 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=O2 %s 6 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=O2 %s
7 7
8 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 8 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
9 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \ 9 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \
10 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=OM1 %s 10 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=OM1 %s
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 ; OM1: cmp {{.*}},0x7b 85 ; OM1: cmp {{.*}},0x7b
86 ; OM1: setge 86 ; OM1: setge
87 ; OM1: cmp 87 ; OM1: cmp
88 ; OM1: jne 88 ; OM1: jne
89 ; OM1: jmp 89 ; OM1: jmp
90 ; OM1: call 90 ; OM1: call
91 ; OM1: ret 91 ; OM1: ret
92 ; OM1: call 92 ; OM1: call
93 ; OM1: ret 93 ; OM1: ret
94 94
95 ; Note that compare and branch folding isn't implemented yet (unlike x86-32).
96 ; ARM32O2-LABEL: testCondFallthroughToNextBlock 95 ; ARM32O2-LABEL: testCondFallthroughToNextBlock
97 ; ARM32O2: cmp {{.*}}, #123 96 ; ARM32O2: cmp {{.*}}, #123
98 ; ARM32O2-NEXT: bge 97 ; ARM32O2-NEXT: bge
99 ; ARM32O2-NEXT: bl 98 ; ARM32O2-NEXT: bl
100 ; ARM32O2: bx lr 99 ; ARM32O2: bx lr
101 ; ARM32O2: bl 100 ; ARM32O2: bl
102 ; ARM32O2: bx lr 101 ; ARM32O2: bx lr
103 102
104 ; ARM32OM1-LABEL: testCondFallthroughToNextBlock 103 ; ARM32OM1-LABEL: testCondFallthroughToNextBlock
104 ; ARM32OM1: mov {{.*}}, #0
105 ; ARM32OM1: cmp {{.*}}, #123 105 ; ARM32OM1: cmp {{.*}}, #123
106 ; ARM32OM1: movlt {{.*}}, #0
107 ; ARM32OM1: movge {{.*}}, #1 106 ; ARM32OM1: movge {{.*}}, #1
108 ; ARM32OM1: cmp {{.*}}, #0 107 ; ARM32OM1: tst {{.*}}, #1
109 ; ARM32OM1: bne 108 ; ARM32OM1: bne
110 ; ARM32OM1: b 109 ; ARM32OM1: b
111 ; ARM32OM1: bl 110 ; ARM32OM1: bl
112 ; ARM32OM1: bx lr 111 ; ARM32OM1: bx lr
113 ; ARM32OM1: bl 112 ; ARM32OM1: bl
114 ; ARM32OM1: bx lr 113 ; ARM32OM1: bx lr
115 114
116 ; For a conditional branch with the next block as the target and a 115 ; For a conditional branch with the next block as the target and a
117 ; different block as the fallthrough, the branch condition should be 116 ; different block as the fallthrough, the branch condition should be
118 ; inverted, the fallthrough block changed to the target, and the 117 ; inverted, the fallthrough block changed to the target, and the
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ; ARM32O2: cmp {{.*}}, #123 153 ; ARM32O2: cmp {{.*}}, #123
155 ; ARM32O2-NEXT: blt 154 ; ARM32O2-NEXT: blt
156 ; ARM32O2-NEXT: bl 155 ; ARM32O2-NEXT: bl
157 ; ARM32O2: bx lr 156 ; ARM32O2: bx lr
158 ; ARM32O2: bl 157 ; ARM32O2: bl
159 ; ARM32O2: bx lr 158 ; ARM32O2: bx lr
160 159
161 ; ARM32OM1-LABEL: testCondTargetNextBlock 160 ; ARM32OM1-LABEL: testCondTargetNextBlock
162 ; ARM32OM1: cmp {{.*}}, #123 161 ; ARM32OM1: cmp {{.*}}, #123
163 ; ARM32OM1: movge {{.*}}, #1 162 ; ARM32OM1: movge {{.*}}, #1
164 ; ARM32OM1: cmp {{.*}}, #0 163 ; ARM32OM1: tst {{.*}}, #1
165 ; ARM32OM1: bne 164 ; ARM32OM1: bne
166 ; ARM32OM1: b 165 ; ARM32OM1: b
167 ; ARM32OM1: bl 166 ; ARM32OM1: bl
168 ; ARM32OM1: bx lr 167 ; ARM32OM1: bx lr
169 ; ARM32OM1: bl 168 ; ARM32OM1: bl
170 ; ARM32OM1: bx lr 169 ; ARM32OM1: bx lr
171 170
172 ; Unconditional branches to the block after a contracted block should be 171 ; Unconditional branches to the block after a contracted block should be
173 ; removed. 172 ; removed.
174 define internal void @testUncondToBlockAfterContract() { 173 define internal void @testUncondToBlockAfterContract() {
(...skipping 20 matching lines...) Expand all
195 ; OM1: call 194 ; OM1: call
196 195
197 ; ARM32O2-LABEL: testUncondToBlockAfterContract 196 ; ARM32O2-LABEL: testUncondToBlockAfterContract
198 ; ARM32O2: bl {{.*}} dummy 197 ; ARM32O2: bl {{.*}} dummy
199 ; ARM32O2-NEXT: bl {{.*}} dummy 198 ; ARM32O2-NEXT: bl {{.*}} dummy
200 199
201 ; ARM32OM1-LABEL: testUncondToBlockAfterContract 200 ; ARM32OM1-LABEL: testUncondToBlockAfterContract
202 ; ARM32OM1: bl {{.*}} dummy 201 ; ARM32OM1: bl {{.*}} dummy
203 ; ARM32OM1-NEXT: b 202 ; ARM32OM1-NEXT: b
204 ; ARM32OM1-NEXT: bl {{.*}} dummy 203 ; ARM32OM1-NEXT: bl {{.*}} dummy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698