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

Unified Diff: tests_lit/llvm2ice_tests/alloc.ll

Issue 557533003: Subzero: Make sure alloca with align=0 is handled correctly. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remap align=0 to align=1 in lowering Created 6 years, 3 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/IceTargetLoweringX8632.cpp ('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 80bba30a56e9a832b0dca1c684ca011d907b80af..d690a19cbe85808b1f4ac0fae2039395c7d0419a 100644
--- a/tests_lit/llvm2ice_tests/alloc.ll
+++ b/tests_lit/llvm2ice_tests/alloc.ll
@@ -104,6 +104,19 @@ entry:
; CHECK: mov dword ptr [esp], eax
; CHECK: call f2
+; Test alloca with default (0) alignment.
+define void @align0(i32 %n) {
+entry:
+ %array = alloca i8, i32 %n
+ %__2 = ptrtoint i8* %array to i32
+ call void @f2(i32 %__2)
+ ret void
+}
+; CHECK-LABEL: align0
+; CHECK: add [[REG:.*]], 15
+; CHECK: and [[REG]], -16
+; CHECK: sub esp, [[REG]]
+
define void @f2(i32 %ignored) {
entry:
ret void
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698