diff options
author | James Molloy <james.molloy@arm.com> | 2015-05-15 17:45:09 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2015-05-15 17:45:09 +0000 |
commit | 1675b4a57f21b01e5b78f2ba95fb37945acff831 (patch) | |
tree | f4261e4659c4cb941e9a11c7a5e3cdd4011d1dd9 /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | |
parent | 7307cd57c550cbf4f2b7e01317a72c7f9ad52c9e (diff) | |
download | bcm5719-llvm-1675b4a57f21b01e5b78f2ba95fb37945acff831.tar.gz bcm5719-llvm-1675b4a57f21b01e5b78f2ba95fb37945acff831.zip |
Revert "Canonicalize min/max expressions correctly."
This reverts r237453 - it was causing timeouts on some bots. Reverting
while I investigate (it's probably InstCombine fighting itself...)
llvm-svn: 237458
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 482768655bd..223bba03507 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)) |