mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-18 17:17:49 +00:00
Optimize mask generation for one of the DAG combiner shufflevector cases.
llvm-svn: 187961
This commit is contained in:
parent
e76170ce53
commit
8a5e83ba97
@ -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