summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-05-19 23:06:30 +0000
committerHans Wennborg <hans@hanshq.net>2015-05-19 23:06:30 +0000
commit2f21b8760e895242e6827a03e4641e0886dbd385 (patch)
treed549dba43863f39366d7fccc0e9b47029a52d046 /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
parent3de417f40836c6302449ca0eaafbf05a5c863e33 (diff)
downloadbcm5719-llvm-2f21b8760e895242e6827a03e4641e0886dbd385.tar.gz
bcm5719-llvm-2f21b8760e895242e6827a03e4641e0886dbd385.zip
Revert r237539: "Reapply r237520 with another fix for infinite looping"
This caused PR23583. llvm-svn: 237739
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index e979d76c1d0..ce5755fa66b 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -3970,19 +3970,6 @@ Instruction *InstCombiner::visitFCmpInst(FCmpInst &I) {
}
}
- // Test if the FCmpInst instruction is used exclusively by a select as
- // part of a minimum or maximum operation. If so, refrain from doing
- // any other folding. This helps out other analyses which understand
- // non-obfuscated minimum and maximum idioms, such as ScalarEvolution
- // and CodeGen. And in this case, at least one of the comparison
- // operands has at least one user besides the compare (the select),
- // which would often largely negate the benefit of folding anyway.
- if (I.hasOneUse())
- if (SelectInst *SI = dyn_cast<SelectInst>(*I.user_begin()))
- if ((SI->getOperand(1) == Op0 && SI->getOperand(2) == Op1) ||
- (SI->getOperand(2) == Op0 && SI->getOperand(1) == Op1))
- return nullptr;
-
// Handle fcmp with constant RHS
if (Constant *RHSC = dyn_cast<Constant>(Op1)) {
if (Instruction *LHSI = dyn_cast<Instruction>(Op0))
OpenPOWER on IntegriCloud