mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[InstCombine] remove duplicate code for simplifying a shuffle; NFCI
The transform is already handled by InstSimplify or earlier in InstCombine, so trying to do it again is not necessary.
This commit is contained in:
parent
592d69a8a6
commit
70a8540846
@ -2242,12 +2242,5 @@ Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
|
||||
return new ShuffleVectorInst(newLHS, newRHS, ConstantVector::get(Elts));
|
||||
}
|
||||
|
||||
// If the result mask is an identity, replace uses of this instruction with
|
||||
// corresponding argument.
|
||||
bool isLHSID, isRHSID;
|
||||
recognizeIdentityMask(newMask, isLHSID, isRHSID);
|
||||
if (isLHSID && VWidth == LHSOp0Width) return replaceInstUsesWith(SVI, newLHS);
|
||||
if (isRHSID && VWidth == RHSOp0Width) return replaceInstUsesWith(SVI, newRHS);
|
||||
|
||||
return MadeChange ? &SVI : nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user