mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Optimize code slightly. No functionality change.
llvm-svn: 154307
This commit is contained in:
parent
adcb1f1d29
commit
ee38217fe4
@ -7723,12 +7723,13 @@ SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
|
||||
SmallVector<int, 8> NewMask;
|
||||
for (unsigned i = 0; i != NumElts; ++i) {
|
||||
int Idx = SVN->getMaskElt(i);
|
||||
if (Idx < 0)
|
||||
NewMask.push_back(Idx);
|
||||
else if (Idx < (int)NumElts)
|
||||
NewMask.push_back(Idx + NumElts);
|
||||
else
|
||||
NewMask.push_back(Idx - NumElts);
|
||||
if (Idx >= 0) {
|
||||
if (Idx < (int)NumElts)
|
||||
Idx += NumElts;
|
||||
else
|
||||
Idx -= NumElts;
|
||||
}
|
||||
NewMask.push_back(Idx);
|
||||
}
|
||||
return DAG.getVectorShuffle(VT, N->getDebugLoc(), N1, DAG.getUNDEF(VT),
|
||||
&NewMask[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user