summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2017-08-24 02:43:17 +0000
committerDaniel Berlin <dberlin@dberlin.org>2017-08-24 02:43:17 +0000
commitf948603a15850e8cdfe233a17ce2ba49f29d5478 (patch)
tree17fc3ddc1e5700b982d5db4b7679a1bdc5f57e29 /llvm/lib/Transforms
parentb85172f6ff393aa601847f39e39d4d9b93acf653 (diff)
downloadbcm5719-llvm-f948603a15850e8cdfe233a17ce2ba49f29d5478.tar.gz
bcm5719-llvm-f948603a15850e8cdfe233a17ce2ba49f29d5478.zip
NewGVN: We weren't properly simplifying selects with equal arguments due to a thinko.
llvm-svn: 311626
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/NewGVN.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp
index e545163c96c..475ee67f531 100644
--- a/llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp
@@ -1025,7 +1025,7 @@ const Expression *NewGVN::createExpression(Instruction *I) const {
return SimplifiedE;
} else if (isa<SelectInst>(I)) {
if (isa<Constant>(E->getOperand(0)) ||
- E->getOperand(0) == E->getOperand(1)) {
+ E->getOperand(1) == E->getOperand(2)) {
assert(E->getOperand(1)->getType() == I->getOperand(1)->getType() &&
E->getOperand(2)->getType() == I->getOperand(2)->getType());
Value *V = SimplifySelectInst(E->getOperand(0), E->getOperand(1),
OpenPOWER on IntegriCloud