summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2009-02-11 22:36:25 +0000
committerNate Begeman <natebegeman@mac.com>2009-02-11 22:36:25 +0000
commit318aea93bf1f9ea31d8e2889c6208aa4a277e774 (patch)
tree84cf7a8372e8e4992b68110fbb9a9f949db2a1f9
parent1f0a9ebf7231eb07c2c7dd6b39da4c6d36bf9360 (diff)
downloadbcm5719-llvm-318aea93bf1f9ea31d8e2889c6208aa4a277e774.tar.gz
bcm5719-llvm-318aea93bf1f9ea31d8e2889c6208aa4a277e774.zip
the two non-mask arguments to a shufflevector must be the same width, but they do not have to be the same
width as the result value. llvm-svn: 64335
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index b4262743a3c..7117bda7067 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -1538,11 +1538,12 @@ Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
}
}
+ APInt UndefElts4(LHSVWidth, 0);
TmpV = SimplifyDemandedVectorElts(I->getOperand(0), LeftDemanded,
- UndefElts2, Depth+1);
+ UndefElts4, Depth+1);
if (TmpV) { I->setOperand(0, TmpV); MadeChange = true; }
- APInt UndefElts3(VWidth, 0);
+ APInt UndefElts3(LHSVWidth, 0);
TmpV = SimplifyDemandedVectorElts(I->getOperand(1), RightDemanded,
UndefElts3, Depth+1);
if (TmpV) { I->setOperand(1, TmpV); MadeChange = true; }
@@ -1553,7 +1554,7 @@ Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
if (MaskVal == -1u) {
UndefElts.set(i);
} else if (MaskVal < LHSVWidth) {
- if (UndefElts2[MaskVal]) {
+ if (UndefElts4[MaskVal]) {
NewUndefElts = true;
UndefElts.set(i);
}
OpenPOWER on IntegriCloud