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

Unified Diff: test/NaCl/X86/dynamic-stack-alloc2.ll

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 7 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: test/NaCl/X86/dynamic-stack-alloc2.ll
diff --git a/test/NaCl/X86/dynamic-stack-alloc2.ll b/test/NaCl/X86/dynamic-stack-alloc2.ll
new file mode 100644
index 0000000000000000000000000000000000000000..864ee3cba15c7d2aaf55ad736cb4821f2261515f
--- /dev/null
+++ b/test/NaCl/X86/dynamic-stack-alloc2.ll
@@ -0,0 +1,23 @@
+; RUN: llc -mtriple=x86_64-nacl %s -o - | FileCheck %s
+
+target datalayout = "e-p:32:32-i64:64-n32"
+target triple = "le32-unknown-nacl"
+
+; CHECK-LABEL: @foo
+; CHECK: .bundle_lock
+; CHECK: leal -16({{.*}}), %esp
+; CHECK: addq %r15, %rsp
+; CHECK: .bundle_unlock
+define hidden void @foo() {
+entry:
+ br label %bb1
+; The alloca must be in a non-entry block so it gets lowered in the dag as
+; a dynamic_stackalloc node
+bb1:
+ %0 = alloca i8, i32 16, align 16
+ %1 = load i8, i8* %0, align 1
+ %call5 = call i32 @bar(i8 %1)
+ unreachable
+}
+
+declare hidden i32 @bar(i8)

Powered by Google App Engine
This is Rietveld 408576698