summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-11 22:47:57 +0000
committerDan Gohman <gohman@apple.com>2008-09-11 22:47:57 +0000
commit3139ff8f7b5e3eeb170d77ac8472fc4ca596ec0e (patch)
tree29814e01093bbe0023b84a39d959af82c6c50a6b /lib/Transforms
parent363f53f3ec711f603c9ba4a56a750795cd3f71aa (diff)
downloadllvm-3139ff8f7b5e3eeb170d77ac8472fc4ca596ec0e.tar.gz
llvm-3139ff8f7b5e3eeb170d77ac8472fc4ca596ec0e.tar.bz2
llvm-3139ff8f7b5e3eeb170d77ac8472fc4ca596ec0e.tar.xz
Fix a vectorshuffle instcombine bug introduced by r55995.
Patch by Nicolas Capens! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 5a9d1de2e3..f02a7108fd 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -11311,8 +11311,11 @@ Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
unsigned VWidth = cast<VectorType>(SVI.getType())->getNumElements();
uint64_t AllOnesEltMask = ~0ULL >> (64-VWidth);
if (VWidth <= 64 &&
- SimplifyDemandedVectorElts(&SVI, AllOnesEltMask, UndefElts))
+ SimplifyDemandedVectorElts(&SVI, AllOnesEltMask, UndefElts)) {
+ LHS = SVI.getOperand(0);
+ RHS = SVI.getOperand(1);
MadeChange = true;
+ }
// Canonicalize shuffle(x ,x,mask) -> shuffle(x, undef,mask')
// Canonicalize shuffle(undef,x,mask) -> shuffle(x, undef,mask').