mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-08 13:00:50 +00:00
Convert to for-range loop. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294610 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e22db94a8f
commit
06f2b29f82
@ -6701,6 +6701,7 @@ static SDValue buildFromShuffleMostly(SDValue Op, SelectionDAG &DAG) {
|
||||
|
||||
SDValue ExtractedFromVec = Op.getOperand(i).getOperand(0);
|
||||
SDValue ExtIdx = Op.getOperand(i).getOperand(1);
|
||||
|
||||
// Quit if non-constant index.
|
||||
if (!isa<ConstantSDNode>(ExtIdx))
|
||||
return SDValue();
|
||||
@ -6731,11 +6732,10 @@ static SDValue buildFromShuffleMostly(SDValue Op, SelectionDAG &DAG) {
|
||||
|
||||
VecIn2 = VecIn2.getNode() ? VecIn2 : DAG.getUNDEF(VT);
|
||||
SDValue NV = DAG.getVectorShuffle(VT, DL, VecIn1, VecIn2, Mask);
|
||||
for (unsigned i = 0, e = InsertIndices.size(); i != e; ++i) {
|
||||
unsigned Idx = InsertIndices[i];
|
||||
|
||||
for (unsigned Idx : InsertIndices)
|
||||
NV = DAG.getNode(ISD::INSERT_VECTOR_ELT, DL, VT, NV, Op.getOperand(Idx),
|
||||
DAG.getIntPtrConstant(Idx, DL));
|
||||
}
|
||||
|
||||
return NV;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user