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

Unified Diff: tests_lit/llvm2ice_tests/alloc.ll

Issue 1426933003: Subzero: Force ebp-based frame when an alloca has a large alignment. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/alloc.ll
diff --git a/tests_lit/llvm2ice_tests/alloc.ll b/tests_lit/llvm2ice_tests/alloc.ll
index 49faa7e2d32deb90ec7fb32f3178fa88c96bf81d..53e184226aed280f7c226722037c97fdc17308f1 100644
--- a/tests_lit/llvm2ice_tests/alloc.ll
+++ b/tests_lit/llvm2ice_tests/alloc.ll
@@ -50,6 +50,8 @@ entry:
ret void
}
; CHECK-LABEL: fixed_416_align_32
+; CHECK: push ebp
+; CHECK-NEXT: mov ebp,esp
; CHECK: and esp,0xffffffe0
; CHECK: sub esp,0x1a0
; CHECK: sub esp,0x10
@@ -87,6 +89,8 @@ entry:
ret void
}
; CHECK-LABEL: fixed_351_align_32
+; CHECK: push ebp
+; CHECK-NEXT: mov ebp,esp
; CHECK: and esp,0xffffffe0
; CHECK: sub esp,0x160
; CHECK: sub esp,0x10
@@ -185,6 +189,8 @@ entry:
ret void
}
; CHECK-LABEL: align1MB
+; CHECK: push ebp
+; CHECK-NEXT: mov ebp,esp
; CHECK: and esp,0xfff00000
; CHECK: add [[REG:.*]],0xfffff
; CHECK: and [[REG]],0xfff00000
@@ -212,6 +218,8 @@ entry:
ret void
}
; CHECK-LABEL: align512MB
+; CHECK: push ebp
+; CHECK-NEXT: mov ebp,esp
; CHECK: and esp,0xe0000000
; CHECK: add [[REG:.*]],0x1fffffff
; CHECK: and [[REG]],0xe0000000
@@ -241,6 +249,24 @@ entry:
; CHECK-LABEL: fixed_no_frameptr
; CHECK-NOT: mov ebp,esp
+; Test that a simple alloca sequence with at least one large alignment does
+; trigger a frame pointer.
+define internal void @fixed_bigalign_with_frameptr(i32 %arg) {
+entry:
+ %a1 = alloca i8, i32 8, align 4
+ %a2 = alloca i8, i32 12, align 4
+ %a3 = alloca i8, i32 16, align 64
+ %p1 = bitcast i8* %a1 to i32*
+ %p2 = bitcast i8* %a2 to i32*
+ %p3 = bitcast i8* %a3 to i32*
+ store i32 %arg, i32* %p1, align 1
+ store i32 %arg, i32* %p2, align 1
+ store i32 %arg, i32* %p3, align 1
+ ret void
+}
+; CHECK-LABEL: fixed_bigalign_with_frameptr
+; CHECK: mov ebp,esp
+
; Test that a more complex alloca sequence does trigger a frame pointer.
define internal void @var_with_frameptr(i32 %arg) {
entry:
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698