[DAGCombiner] make variable name less ambiguous; NFC

llvm-svn: 358886
This commit is contained in:
Sanjay Patel 2019-04-22 13:42:50 +00:00
parent 3275742898
commit 9bc6c77220
1 changed files with 4 additions and 4 deletions

View File

@ -17944,9 +17944,9 @@ static SDValue combineShuffleOfSplatVal(ShuffleVectorSDNode *Shuf,
if (!Splat || !Splat->isSplat()) if (!Splat || !Splat->isSplat())
return SDValue(); return SDValue();
ArrayRef<int> Mask = Shuf->getMask(); ArrayRef<int> ShufMask = Shuf->getMask();
ArrayRef<int> SplatMask = Splat->getMask(); ArrayRef<int> SplatMask = Splat->getMask();
assert(Mask.size() == SplatMask.size() && "Mask length mismatch"); assert(ShufMask.size() == SplatMask.size() && "Mask length mismatch");
// Prefer simplifying to the splat-shuffle, if possible. This is legal if // Prefer simplifying to the splat-shuffle, if possible. This is legal if
// every undef mask element in the splat-shuffle has a corresponding undef // every undef mask element in the splat-shuffle has a corresponding undef
@ -17972,13 +17972,13 @@ static SDValue combineShuffleOfSplatVal(ShuffleVectorSDNode *Shuf,
return false; return false;
return true; return true;
}; };
if (CanSimplifyToExistingSplat(Mask, SplatMask)) if (CanSimplifyToExistingSplat(ShufMask, SplatMask))
return Shuf->getOperand(0); return Shuf->getOperand(0);
// Create a new shuffle with a mask that is composed of the two shuffles' // Create a new shuffle with a mask that is composed of the two shuffles'
// masks. // masks.
SmallVector<int, 32> NewMask; SmallVector<int, 32> NewMask;
for (int Idx : Mask) for (int Idx : ShufMask)
NewMask.push_back(Idx == -1 ? -1 : SplatMask[Idx]); NewMask.push_back(Idx == -1 ? -1 : SplatMask[Idx]);
return DAG.getVectorShuffle(Splat->getValueType(0), SDLoc(Splat), return DAG.getVectorShuffle(Splat->getValueType(0), SDLoc(Splat),