summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitcaf42aa6a40464b2d8ad42b5c27addeb3c5413bd (patch)
tree53a7ff3f218bb54d818321a8de60cd623251638a /llvm/test/CodeGen/X86/x86-64-extend-shift.ll
parentfa5dc82fda4addd3da3518dfc6193f8ae7656271 (diff)
downloadbcm5719-llvm-caf42aa6a40464b2d8ad42b5c27addeb3c5413bd.tar.gz
bcm5719-llvm-caf42aa6a40464b2d8ad42b5c27addeb3c5413bd.zip
Add a new transform to DAGCombiner.
llvm-svn: 122355
Diffstat (limited to 'llvm/test/CodeGen/X86/x86-64-extend-shift.ll')
-rw-r--r--llvm/test/CodeGen/X86/x86-64-extend-shift.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/x86-64-extend-shift.ll b/llvm/test/CodeGen/X86/x86-64-extend-shift.ll
new file mode 100644
index 00000000000..6852785fd6a
--- /dev/null
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud