projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05a4d26
)
Optimize mask generation for one of the DAG combiner shufflevector cases.
author
Craig Topper
<craig.topper@gmail.com>
Thu, 8 Aug 2013 07:38:55 +0000
(07:38 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Thu, 8 Aug 2013 07:38:55 +0000
(07:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187961
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index cb8894105b15087f4b03527ba32dc2297515e1e6..0d71761fd0f6fe0d61e4bca8aebb1fcfc5be9043 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@
-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);
}