mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-04 02:40:42 +00:00
Optimize mask generation for one of the DAG combiner shufflevector cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187961 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
05a4d2642b
commit
01d22aaa78
@ -9358,10 +9358,10 @@ SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
|
||||
for (unsigned i = 0; i != NumElts; ++i) {
|
||||
int Idx = SVN->getMaskElt(i);
|
||||
if (Idx >= 0) {
|
||||
if (Idx < (int)NumElts)
|
||||
Idx += NumElts;
|
||||
else
|
||||
if (Idx >= (int)NumElts)
|
||||
Idx -= NumElts;
|
||||
else
|
||||
Idx = -1; // remove reference to lhs
|
||||
}
|
||||
NewMask.push_back(Idx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user