Index: test/NaCl/X86/stack-adjust.ll |
diff --git a/test/NaCl/X86/stack-adjust.ll b/test/NaCl/X86/stack-adjust.ll |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c21a3e42bfacf6b6c8ba66e2d0c4ebf3141dd658 |
--- /dev/null |
+++ b/test/NaCl/X86/stack-adjust.ll |
@@ -0,0 +1,12 @@ |
+; RUN: llc -mtriple=x86_64-pc-nacl -force-align-stack %s -o - | FileCheck %s |
+ |
+; Check that stack alignment (ANDri32 with the stack pointer) expands to |
+; the bundle-locked adjustment for asm output, instead of a naclandsp pseudo |
+define void @stackalign () { |
+; CHECK-LABEL: stackalign |
+ ret void |
+; CHECK: .bundle_lock |
+; CHECK-NEXT: andl $-8, %esp |
+; CHECK-NEXT: leaq (%rsp,%r15), %rsp |
+; CHECK-NEXT: .bundle_unlock |
+} |