aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/x86-64-extend-shift.ll
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-12-21 21:55:50 +0000
committerDale Johannesen <dalej@apple.com>2010-12-21 21:55:50 +0000
commitc72b18cdc8f155dbb99d554056f3bb6b38f5f72c (patch)
tree3b5ea1ea065dc0c9f4ceb067754b3c59e59bd998 /test/CodeGen/X86/x86-64-extend-shift.ll
parent7d6fe13efc9bcb69d3479e32f8eace933c5bd2d5 (diff)
downloadexternal_llvm-c72b18cdc8f155dbb99d554056f3bb6b38f5f72c.zip
external_llvm-c72b18cdc8f155dbb99d554056f3bb6b38f5f72c.tar.gz
external_llvm-c72b18cdc8f155dbb99d554056f3bb6b38f5f72c.tar.bz2
Reapply 122353-122355 with fixes. 122354 was wrong;
the shift type was needed one place, the shift count type another. The transform in 123555 had the same problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/x86-64-extend-shift.ll')
-rw-r--r--test/CodeGen/X86/x86-64-extend-shift.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/x86-64-extend-shift.ll b/test/CodeGen/X86/x86-64-extend-shift.ll
new file mode 100644
index 0000000..6852785
--- /dev/null
+++ b/test/CodeGen/X86/x86-64-extend-shift.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
+; Formerly there were two shifts.
+
+define i64 @baz(i32 %A) nounwind {
+; CHECK: shlq $49, %rax
+ %tmp1 = shl i32 %A, 17
+ %tmp2 = zext i32 %tmp1 to i64
+ %tmp3 = shl i64 %tmp2, 32
+ ret i64 %tmp3
+}