mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Fix type of shuffle resulted from shuffle merge.
This fix resolves PR19730. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208666 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1114,12 +1114,10 @@ Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
|
||||
|
||||
// If the result mask is an identity, replace uses of this instruction with
|
||||
// corresponding argument.
|
||||
if (VWidth == LHSWidth) {
|
||||
bool isLHSID, isRHSID;
|
||||
RecognizeIdentityMask(newMask, isLHSID, isRHSID);
|
||||
if (isLHSID) return ReplaceInstUsesWith(SVI, newLHS);
|
||||
if (isRHSID) return ReplaceInstUsesWith(SVI, newRHS);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user