mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Use range based for loop. NFCI.
llvm-svn: 288671
This commit is contained in:
parent
835cb289ef
commit
82645af80c
@ -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…
x
Reference in New Issue
Block a user