mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 18:06:49 +00:00
Use range based for loop. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
447a2882e2
commit
4b0a367e90
@ -27396,13 +27396,10 @@ static SDValue combineShuffleOfConcatUndef(SDNode *N, SelectionDAG &DAG,
|
||||
// index, but elements from the second source no longer need to skip an undef.
|
||||
SmallVector<int, 8> Mask;
|
||||
int NumElts = VT.getVectorNumElements();
|
||||
for (int i = 0; i < NumElts; ++i) {
|
||||
int Elt = cast<ShuffleVectorSDNode>(N)->getMaskElt(i);
|
||||
if (Elt < NumElts)
|
||||
Mask.push_back(Elt);
|
||||
else
|
||||
Mask.push_back(Elt - NumElts / 2);
|
||||
}
|
||||
|
||||
ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(N);
|
||||
for (int Elt : SVOp->getMask())
|
||||
Mask.push_back(Elt < NumElts ? Elt : (Elt - NumElts / 2));
|
||||
|
||||
SDLoc DL(N);
|
||||
SDValue Concat = DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, N0.getOperand(0),
|
||||
|
Loading…
Reference in New Issue
Block a user