summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-08-01 21:13:28 +0000
committerEli Friedman <eli.friedman@gmail.com>2010-08-01 21:13:28 +0000
commit348e02600ef0191b4e0621078fc81f935065c1f7 (patch)
treed25e69260e9cb01bfdda68dc666f18bed3ae802d /test
parentad2b04c07f7e7abf7a57c7edf779df3e476d3da3 (diff)
downloadllvm-348e02600ef0191b4e0621078fc81f935065c1f7.tar.gz
llvm-348e02600ef0191b4e0621078fc81f935065c1f7.tar.bz2
llvm-348e02600ef0191b4e0621078fc81f935065c1f7.tar.xz
PR7774: Fix undefined shifts in Alpha backend. As a bonus, this actually
improves the generated code in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Alpha/2010-08-01-mulreduce64.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/Alpha/2010-08-01-mulreduce64.ll b/test/CodeGen/Alpha/2010-08-01-mulreduce64.ll
new file mode 100644
index 0000000000..b838ec949e
--- /dev/null
+++ b/test/CodeGen/Alpha/2010-08-01-mulreduce64.ll
@@ -0,0 +1,11 @@
+; RUN: llc < %s -march=alpha | FileCheck %s
+
+define fastcc i64 @getcount(i64 %s) {
+ %tmp431 = mul i64 %s, 12884901888
+ ret i64 %tmp431
+}
+
+; CHECK: sll $16,33,$0
+; CHECK-NEXT: sll $16,32,$1
+; CHECK-NEXT: addq $0,$1,$0
+