summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/x86-64-extend-shift.ll
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-12-21 20:10:51 +0000
committerDale Johannesen <dalej@apple.com>2010-12-21 20:10:51 +0000
commita83bf35d167c43ff2eb8c61bdea0cb660d2b07d8 (patch)
tree6882c6c11c5c734f0cd404a8f82a0e03a82abd7e /test/CodeGen/X86/x86-64-extend-shift.ll
parent5ecc340e34e6ca4b9f6ebde6c1379cb3b8084f69 (diff)
downloadllvm-a83bf35d167c43ff2eb8c61bdea0cb660d2b07d8.tar.gz
llvm-a83bf35d167c43ff2eb8c61bdea0cb660d2b07d8.tar.bz2
llvm-a83bf35d167c43ff2eb8c61bdea0cb660d2b07d8.tar.xz
Add a new transform to DAGCombiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122355 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 0000000000..6852785fd6
--- /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
+}