summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-09-13 16:18:12 +0000
committerSanjay Patel <spatel@rotateright.com>2018-09-13 16:18:12 +0000
commit37e464876b1d3912d9726a13a3769fa7a74ea4b9 (patch)
tree84bd0b355f944d3eaa868183e8e2fb2cb449ff47 /llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
parentf3063baa6ecb88a54d0832f2971ffeec28db6312 (diff)
downloadbcm5719-llvm-37e464876b1d3912d9726a13a3769fa7a74ea4b9.tar.gz
bcm5719-llvm-37e464876b1d3912d9726a13a3769fa7a74ea4b9.zip
[InstCombine] remove checks for IsFreeToInvert()
I accidentally committed this diff with rL342147 because I had applied D51964. We probably do need those checks, but D51964 has tests and more discussion/motivation, so they should be re-added with that patch. llvm-svn: 342149
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index aacb38ce06e..a388269d6e6 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -1847,9 +1847,7 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) {
// MIN(~a, ~b) -> ~MAX(a, b)
Value *A, *B;
if (match(LHS, m_Not(m_Value(A))) && match(RHS, m_Not(m_Value(B))) &&
- !IsFreeToInvert(A, A->hasOneUse()) &&
- !IsFreeToInvert(B, B->hasOneUse()) &&
- (!LHS->hasNUsesOrMore(3) || !RHS->hasNUsesOrMore(3))) {
+ (!LHS->hasNUsesOrMore(3) || !RHS->hasNUsesOrMore(3))) {
CmpInst::Predicate InvertedPred = getInverseMinMaxPred(SPF);
Value *InvertedCmp = Builder.CreateICmp(InvertedPred, A, B);
Value *NewSel = Builder.CreateSelect(InvertedCmp, A, B);
OpenPOWER on IntegriCloud