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

Side by Side Diff: tests_lit/llvm2ice_tests/nop-insertion.ll

Issue 1670413002: Add NOP to ARM IR lowering. (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 | « src/IceTargetLoweringARM32.cpp ('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 is a smoke test of nop insertion. 1 ; This is a smoke test of nop insertion.
2 2
3 ; REQUIRES: allow_dump 3 ; REQUIRES: allow_dump
4 4
5 ; Use filetype=asm because this currently depends on the /* variant */ 5 ; Use filetype=asm because this currently depends on the /* variant */
6 ; assembler comment. 6 ; assembler comment.
7 7
8 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \ 8 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \
9 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \ 9 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \
10 ; RUN: | FileCheck %s --check-prefix=PROB50 10 ; RUN: | FileCheck %s --check-prefix=PROB50
11 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \ 11 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \
12 ; RUN: -nop-insertion-percentage=90 -max-nops-per-instruction=1 \ 12 ; RUN: -nop-insertion-percentage=90 -max-nops-per-instruction=1 \
13 ; RUN: | FileCheck %s --check-prefix=PROB90 13 ; RUN: | FileCheck %s --check-prefix=PROB90
14 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \ 14 ; RUN: %p2i -i %s --filetype=asm -a -sz-seed=1 -nop-insertion \
15 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=2 \ 15 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=2 \
16 ; RUN: | FileCheck %s --check-prefix=MAXNOPS2 16 ; RUN: | FileCheck %s --check-prefix=MAXNOPS2
17 ; RUN: %p2i -i %s --filetype=asm --sandbox -a -sz-seed=1 -nop-insertion \ 17 ; RUN: %p2i -i %s --filetype=asm --sandbox -a -sz-seed=1 -nop-insertion \
18 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \ 18 ; RUN: -nop-insertion-percentage=50 -max-nops-per-instruction=1 \
19 ; RUN: | FileCheck %s --check-prefix=SANDBOX50 19 ; RUN: | FileCheck %s --check-prefix=SANDBOX50
20 ; RUN: %p2i -i %s --filetype=asm --sandbox --target=arm32 -a -sz-seed=1 \
21 ; RUN: -nop-insertion -nop-insertion-percentage=110 \
22 ; RUN: -max-nops-per-instruction=2 \
23 ; RUN: | FileCheck %s --check-prefix=ARM110P2
20 24
21 25
22 define internal <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) { 26 define internal <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) {
23 entry: 27 entry:
24 %res = mul <4 x i32> %a, %b 28 %res = mul <4 x i32> %a, %b
25 ret <4 x i32> %res 29 ret <4 x i32> %res
26 30
27 ; PROB50-LABEL: mul_v4i32 31 ; PROB50-LABEL: mul_v4i32
28 ; PROB50: nop /* variant = 1 */ 32 ; PROB50: nop /* variant = 1 */
29 ; PROB50: subl $60, %esp 33 ; PROB50: subl $60, %esp
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 ; SANDBOX50: nop /* variant = 1 */ 134 ; SANDBOX50: nop /* variant = 1 */
131 ; SANDBOX50: movups %xmm0, (%esp) 135 ; SANDBOX50: movups %xmm0, (%esp)
132 ; SANDBOX50: movups (%esp), %xmm0 136 ; SANDBOX50: movups (%esp), %xmm0
133 ; SANDBOX50: addl $60, %esp 137 ; SANDBOX50: addl $60, %esp
134 ; SANDBOX50: pop %ecx 138 ; SANDBOX50: pop %ecx
135 ; SANDBOX50: .bundle_lock 139 ; SANDBOX50: .bundle_lock
136 ; SANDBOX50: andl $-32, %ecx 140 ; SANDBOX50: andl $-32, %ecx
137 ; SANDBOX50: jmp *%ecx 141 ; SANDBOX50: jmp *%ecx
138 ; SANDBOX50: .bundle_unlock 142 ; SANDBOX50: .bundle_unlock
139 143
144 ; ARM110P2: mul_v4i32:
145 ; ARM110P2-NEXT: .Lmul_v4i32$entry:
146 ; ARM110P2-NEXT: .bundle_lock
147 ; ARM110P2-NEXT: sub sp, sp, #48
148 ; ARM110P2-NEXT: bic sp, sp, #3221225472
149 ; ARM110P2-NEXT: .bundle_unlock
150 ; ARM110P2-NEXT: nop
151 ; ARM110P2-NEXT: nop
152 ; ARM110P2-NEXT: .bundle_lock
153 ; ARM110P2-NEXT: add ip, sp, #32
154 ; ARM110P2-NEXT: bic ip, ip, #3221225472
155 ; ARM110P2-NEXT: vst1.32 q0, [ip]
156 ; ARM110P2-NEXT: .bundle_unlock
157 ; ARM110P2-NEXT: nop
158 ; ARM110P2-NEXT: nop
159 ; ARM110P2-NEXT: # [sp, #32] = def.pseudo
160 ; ARM110P2-NEXT: .bundle_lock
161 ; ARM110P2-NEXT: add ip, sp, #16
162 ; ARM110P2-NEXT: bic ip, ip, #3221225472
163 ; ARM110P2-NEXT: vst1.32 q1, [ip]
164 ; ARM110P2-NEXT: .bundle_unlock
165 ; ARM110P2-NEXT: nop
166 ; ARM110P2-NEXT: nop
167 ; ARM110P2-NEXT: # [sp, #16] = def.pseudo
168 ; ARM110P2-NEXT: .bundle_lock
169 ; ARM110P2-NEXT: add ip, sp, #32
170 ; ARM110P2-NEXT: bic ip, ip, #3221225472
171 ; ARM110P2-NEXT: vld1.32 q0, [ip]
172 ; ARM110P2-NEXT: .bundle_unlock
173 ; ARM110P2-NEXT: nop
174 ; ARM110P2-NEXT: nop
175 ; ARM110P2-NEXT: .bundle_lock
176 ; ARM110P2-NEXT: add ip, sp, #16
177 ; ARM110P2-NEXT: bic ip, ip, #3221225472
178 ; ARM110P2-NEXT: vld1.32 q1, [ip]
179 ; ARM110P2-NEXT: .bundle_unlock
180 ; ARM110P2-NEXT: nop
181 ; ARM110P2-NEXT: nop
182 ; ARM110P2-NEXT: vmul.i32 q0, q0, q1
183 ; ARM110P2-NEXT: nop
184 ; ARM110P2-NEXT: nop
185 ; ARM110P2-NEXT: .bundle_lock
186 ; ARM110P2-NEXT: vst1.32 q0, [sp]
187 ; ARM110P2-NEXT: .bundle_unlock
188 ; ARM110P2-NEXT: nop
189 ; ARM110P2-NEXT: nop
190 ; ARM110P2-NEXT: # [sp] = def.pseudo
191 ; ARM110P2-NEXT: .bundle_lock
192 ; ARM110P2-NEXT: vld1.32 q0, [sp]
193 ; ARM110P2-NEXT: .bundle_unlock
194 ; ARM110P2-NEXT: nop
195 ; ARM110P2-NEXT: nop
196 ; ARM110P2-NEXT: .bundle_lock
197 ; ARM110P2-NEXT: add sp, sp, #48
198 ; ARM110P2-NEXT: bic sp, sp, #3221225472
199 ; ARM110P2-NEXT: .bundle_unlock
200 ; ARM110P2-NEXT: nop
201 ; ARM110P2-NEXT: nop
202 ; ARM110P2-NEXT: .bundle_lock
203 ; ARM110P2-NEXT: bic lr, lr, #3221225487
204 ; ARM110P2-NEXT: bx lr
205 ; ARM110P2-NEXT: .bundle_unlock
206 ; ARM110P2-NEXT: nop
207 ; ARM110P2-NEXT: nop
208
140 } 209 }
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698