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

Unified Diff: tests_lit/llvm2ice_tests/alloc.ll

Issue 444443002: Subzero: Align the stack at the point of function calls. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Improve wording of a comment and reorder function in crosstest Created 6 years, 4 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
Index: tests_lit/llvm2ice_tests/alloc.ll
diff --git a/tests_lit/llvm2ice_tests/alloc.ll b/tests_lit/llvm2ice_tests/alloc.ll
index 2b92a87fb43a38efdc730d7305b14e07264f9df2..0de8052ed443dd1cc7def99148309bbf5397dd5d 100644
--- a/tests_lit/llvm2ice_tests/alloc.ll
+++ b/tests_lit/llvm2ice_tests/alloc.ll
@@ -1,8 +1,8 @@
-; This is a basic test of the alloca instruction - one test for alloca
-; of a fixed size, and one test for variable size.
+; This is a basic test of the alloca instruction - tests for alloca of
+; a fixed size and for variable size.
; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck --check-prefix=OPTM1 %s
+; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s
; RUN: %llvm2ice -O2 --verbose none %s \
; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj
; RUN: %llvm2ice -Om1 --verbose none %s \
@@ -21,15 +21,22 @@ entry:
}
; CHECK: fixed_400:
; CHECK: sub esp, 400
-; CHECK-NEXT: mov eax, esp
-; CHECK-NEXT: push eax
-; CHECK-NEXT: call f1
-;
-; OPTM1: fixed_400:
-; OPTM1: sub esp, 400
-; OPTM1-NEXT: mov {{.*}}, esp
-; OPTM1: push
-; OPTM1-NEXT: call f1
+; CHECK: sub esp, 16
+; CHECK: mov dword ptr [esp], eax
+; CHECK: call f1
+
+define void @fixed_351(i32 %n) {
+entry:
+ %array = alloca i8, i32 351, align 16
+ %__2 = ptrtoint i8* %array to i32
+ call void @f1(i32 %__2)
+ ret void
+}
+; CHECK: fixed_351:
+; CHECK: sub esp, 352
+; CHECK: sub esp, 16
+; CHECK: mov dword ptr [esp], eax
+; CHECK: call f1
declare void @f1(i32)
@@ -42,15 +49,12 @@ entry:
}
; CHECK: variable_n:
; CHECK: mov eax, dword ptr [ebp+8]
+; CHECK-NEXT: add eax, 15
+; CHECK-NEXT: and eax, 18446744073709551600
Jim Stichnoth 2014/08/05 18:09:27 What is a 64-bit integer immediate doing in an x86
wala 2014/08/05 23:57:03 This should be -16. I'm not entirely sure what cau
; CHECK-NEXT: sub esp, eax
-; CHECK-NEXT: mov eax, esp
-; CHECK-NEXT: push eax
-; CHECK-NEXT: call f2
-;
-; OPTM1: variable_n:
-; OPTM1: mov {{.*}}, esp
-; OPTM1: push
-; OPTM1-NEXT: call f2
+; CHECK: sub esp, 16
+; CHECK: mov dword ptr [esp], eax
+; CHECK: call f2
declare void @f2(i32)

Powered by Google App Engine
This is Rietveld 408576698