forked from OSchip/llvm-project
[InstCombine] Use a 32-bits instead of 64-bits for storing the number of elements in VectorType for a ShuffleVector. While there getVectorNumElements to avoid an explicit cast. NFC
llvm-svn: 290705
This commit is contained in:
parent
1a8a3377cc
commit
2e18bcfc60
|
@ -1021,8 +1021,8 @@ Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
|
|||
}
|
||||
case Instruction::ShuffleVector: {
|
||||
ShuffleVectorInst *Shuffle = cast<ShuffleVectorInst>(I);
|
||||
uint64_t LHSVWidth =
|
||||
cast<VectorType>(Shuffle->getOperand(0)->getType())->getNumElements();
|
||||
unsigned LHSVWidth =
|
||||
Shuffle->getOperand(0)->getType()->getVectorNumElements();
|
||||
APInt LeftDemanded(LHSVWidth, 0), RightDemanded(LHSVWidth, 0);
|
||||
for (unsigned i = 0; i < VWidth; i++) {
|
||||
if (DemandedElts[i]) {
|
||||
|
|
Loading…
Reference in New Issue