aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/pr21529.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/pr21529.ll')
-rw-r--r--test/CodeGen/X86/pr21529.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/pr21529.ll b/test/CodeGen/X86/pr21529.ll
new file mode 100644
index 0000000..655bc84
--- /dev/null
+++ b/test/CodeGen/X86/pr21529.ll
@@ -0,0 +1,15 @@
+; RUN: llc -show-mc-encoding < %s | FileCheck %s
+
+; Test that the direct object emission selects the and variant with 8 bit
+; immediate.
+; We used to get this wrong when using direct object emission, but not when
+; reading assembly.
+
+; CHECK: andq $-32, %rsp # encoding: [0x48,0x83,0xe4,0xe0]
+
+target triple = "x86_64-pc-linux"
+
+define void @f() {
+ %foo = alloca i8, align 32
+ ret void
+}