summaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/2008-11-27-MultiplyIntVec.ll
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-11-27 20:21:08 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-11-27 20:21:08 +0000
commit895f085385ab94876a6ebe34909a3f6ecad384aa (patch)
treed47c5b46a98115bb044c024808c25db2bb79e1ef /test/Transforms/InstCombine/2008-11-27-MultiplyIntVec.ll
parent9918fb5631974f2201a640384b7ebe672c749e43 (diff)
downloadexternal_llvm-895f085385ab94876a6ebe34909a3f6ecad384aa.zip
external_llvm-895f085385ab94876a6ebe34909a3f6ecad384aa.tar.gz
external_llvm-895f085385ab94876a6ebe34909a3f6ecad384aa.tar.bz2
Add a couple of missed optimizations on integer vectors. Multiply and divide
by 1, as well as multiply by -1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/2008-11-27-MultiplyIntVec.ll')
-rw-r--r--test/Transforms/InstCombine/2008-11-27-MultiplyIntVec.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2008-11-27-MultiplyIntVec.ll b/test/Transforms/InstCombine/2008-11-27-MultiplyIntVec.ll
new file mode 100644
index 0000000..544e9ab
--- /dev/null
+++ b/test/Transforms/InstCombine/2008-11-27-MultiplyIntVec.ll
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep mul
+
+define <2 x i8> @f(<2 x i8> %x) {
+ %A = mul <2 x i8> %x, <i8 1, i8 1>
+ ret <2 x i8> %A
+}
+
+define <2 x i8> @g(<2 x i8> %x) {
+ %A = mul <2 x i8> %x, <i8 -1, i8 -1>
+ ret <2 x i8> %A
+}