summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-10 16:33:38 +0000
committerChris Lattner <sabre@nondot.org>2008-07-10 16:33:38 +0000
commit85e7ac0353d6be357e6cab49f40304793ee601a1 (patch)
tree12d9d07458626362eb4698404de69df56701352f /test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll
parent5ac319ac7125b009adddcc49294d2e040c4a91e5 (diff)
downloadllvm-85e7ac0353d6be357e6cab49f40304793ee601a1.tar.gz
llvm-85e7ac0353d6be357e6cab49f40304793ee601a1.tar.bz2
llvm-85e7ac0353d6be357e6cab49f40304793ee601a1.tar.xz
Fix an altivec constant miscompilation that Duncan found through
his work on legalizetypes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll')
-rw-r--r--test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll b/test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll
new file mode 100644
index 0000000000..b6b9c89730
--- /dev/null
+++ b/test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vadduhm
+; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsubuhm
+
+define <4 x i32> @test() nounwind {
+ ret <4 x i32> < i32 4293066722, i32 4293066722, i32 4293066722, i32 4293066722>
+}
+
+define <4 x i32> @test2() nounwind {
+ ret <4 x i32> < i32 1114129, i32 1114129, i32 1114129, i32 1114129>
+}