mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
Optimize code slightly. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154307 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3029a0c56a
commit
4b206bdfd0
@ -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…
x
Reference in New Issue
Block a user