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

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

Issue 1137803004: Add support for using MI bundles as bundle-locked groups on x86 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: add test 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..791a1555d71086ec4454ad56143b75a211571f11
--- /dev/null
+++ b/test/NaCl/X86/dynamic-stack-alloc2.ll
@@ -0,0 +1,31 @@
+; RUN: llc -mtriple=x86_64-nacl %s -o - | FileCheck %s
+
+; CHECK-LABEL: @foo
jvoung (off chromium) 2015/05/12 23:53:05 nit: seems better to put this by the function (at
Derek Schuff 2015/05/13 00:44:50 Done.
+; CHECK: .bundle_lock
+; CHECK: leal -16({{.*}}), %esp
+; CHECK: addq %r15, %rsp
+; CHECK: .bundle_unlock
+
+target datalayout = "e-p:32:32-i64:64-n32"
+target triple = "le32-unknown-nacl"
+
+define hidden void @foo(i32 %agg.result, <16 x i8> %v) {
jvoung (off chromium) 2015/05/12 23:53:05 The parameters are unused -- is it important for t
Derek Schuff 2015/05/13 00:44:50 no, removed
+entry:
+ br label %bb1
jvoung (off chromium) 2015/05/12 23:53:05 Is it required that the alloca not be in the entry
Derek Schuff 2015/05/13 00:44:50 yes it is required, comment added.
+
+bb1:
+ %0 = alloca i8, i32 16, align 16
+ %.asint = ptrtoint i8* %0 to i32
+ %gep109 = add i32 %.asint, 0
jvoung (off chromium) 2015/05/12 23:53:05 Would it be more resilient to optimization have ad
Derek Schuff 2015/05/13 00:44:50 actually the add isn't necessary at all.
+ %gep109.asptr = inttoptr i32 %gep109 to i8*
+ %1 = load i8, i8* %gep109.asptr, align 1
+ %conv.i = sext i8 %1 to i32
+ %call5 = call i32 @bar(i32 undef, i32 %conv.i)
+ unreachable
+}
+
+
+declare hidden i32 @bar(i32, i32)
+
+
jvoung (off chromium) 2015/05/12 23:53:05 extra space
Derek Schuff 2015/05/13 00:44:50 Done.
+
« lib/Target/X86/X86NaClRewritePass.cpp ('K') | « lib/Target/X86/X86NaClRewritePass.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698