summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/zext-trunc.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/zext-trunc.ll')
-rw-r--r--test/CodeGen/X86/zext-trunc.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/X86/zext-trunc.ll b/test/CodeGen/X86/zext-trunc.ll
new file mode 100644
index 0000000000..b9ffbe87b2
--- /dev/null
+++ b/test/CodeGen/X86/zext-trunc.ll
@@ -0,0 +1,13 @@
+; RUN: llc < %s -march=x86-64 | FileCheck %s
+; rdar://7570931
+
+define i64 @foo(i64 %a, i64 %b) nounwind {
+; CHECK: foo:
+; CHECK: leal
+; CHECK-NOT: movl
+; CHECK: ret
+ %c = add i64 %a, %b
+ %d = trunc i64 %c to i32
+ %e = zext i32 %d to i64
+ ret i64 %e
+}