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

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

Issue 1361803002: Subzero: Improve handling of alloca instructions of constant size. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a couple of basic tests Created 5 years, 2 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/align-spill-locations.ll ('k') | tests_lit/llvm2ice_tests/ebp_args.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 is a basic test of the alloca instruction. 1 ; This is a basic test of the alloca 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 6
7 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 7 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
8 ; RUN: --target x8632 -i %s --args -Om1 \ 8 ; RUN: --target x8632 -i %s --args -Om1 \
9 ; RUN: | %if --need=target_X8632 --command FileCheck %s 9 ; RUN: | %if --need=target_X8632 --command FileCheck %s
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 ; CHECK: add [[REG:.*]],0x1fffffff 214 ; CHECK: add [[REG:.*]],0x1fffffff
215 ; CHECK: and [[REG]],0xe0000000 215 ; CHECK: and [[REG]],0xe0000000
216 ; CHECK: sub esp,[[REG]] 216 ; CHECK: sub esp,[[REG]]
217 217
218 ; ARM32-LABEL: align512MB 218 ; ARM32-LABEL: align512MB
219 ; ARM32: and sp, sp, #-536870912 ; 0xe0000000 219 ; ARM32: and sp, sp, #-536870912 ; 0xe0000000
220 ; ARM32: mvn [[REG:.*]], #-536870912 ; 0xe0000000 220 ; ARM32: mvn [[REG:.*]], #-536870912 ; 0xe0000000
221 ; ARM32: add r0, r0, [[REG]] 221 ; ARM32: add r0, r0, [[REG]]
222 ; ARM32: and r0, r0, #-536870912 ; 0xe0000000 222 ; ARM32: and r0, r0, #-536870912 ; 0xe0000000
223 ; ARM32: sub sp, sp, r0 223 ; ARM32: sub sp, sp, r0
224
225 ; Test that a simple alloca sequence doesn't trigger a frame pointer.
226 define void @fixed_no_frameptr(i32 %arg) {
227 entry:
228 %a1 = alloca i8, i32 8, align 4
229 %a2 = alloca i8, i32 12, align 4
230 %a3 = alloca i8, i32 16, align 4
231 %p1 = bitcast i8* %a1 to i32*
232 %p2 = bitcast i8* %a2 to i32*
233 %p3 = bitcast i8* %a3 to i32*
234 store i32 %arg, i32* %p1, align 1
235 store i32 %arg, i32* %p2, align 1
236 store i32 %arg, i32* %p3, align 1
237 ret void
238 }
239 ; CHECK-LABEL: fixed_no_frameptr
240 ; CHECK-NOT: mov ebp,esp
241
242 ; Test that a more complex alloca sequence does trigger a frame pointer.
243 define void @var_with_frameptr(i32 %arg) {
244 entry:
245 %a1 = alloca i8, i32 8, align 4
246 %a2 = alloca i8, i32 12, align 4
247 %a3 = alloca i8, i32 %arg, align 4
248 %p1 = bitcast i8* %a1 to i32*
249 %p2 = bitcast i8* %a2 to i32*
250 %p3 = bitcast i8* %a3 to i32*
251 store i32 %arg, i32* %p1, align 1
252 store i32 %arg, i32* %p2, align 1
253 store i32 %arg, i32* %p3, align 1
254 ret void
255 }
256 ; CHECK-LABEL: var_with_frameptr
257 ; CHECK: mov ebp,esp
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/align-spill-locations.ll ('k') | tests_lit/llvm2ice_tests/ebp_args.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698