summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2015-08-21 07:46:07 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2015-08-21 07:46:07 +0000
commit6a6232818d778daba8a8d38bb17722bde5f95e06 (patch)
tree249eb8408daba06724d24d3bfbb2151978b70031 /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
parent6a883b086e46e9ffb05c874505dfec2d6f663bbe (diff)
downloadbcm5719-llvm-6a6232818d778daba8a8d38bb17722bde5f95e06.tar.gz
bcm5719-llvm-6a6232818d778daba8a8d38bb17722bde5f95e06.zip
Revert r245635, "[InstCombine] Transform A & (L - 1) u< L --> L != 0"
It caused miscompilation in clang. llvm-svn: 245678
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 dbf43f7769c..9ce1c3fc41b 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -3490,19 +3490,6 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
}
}
}
-
- if (BO0) {
- // Transform A & (L - 1) `ult` L --> L != 0
- Value *L;
- auto LSubOne = m_Add(m_Value(L), m_AllOnes());
- auto BitwiseAnd =
- m_CombineOr(m_And(m_Value(), LSubOne), m_And(LSubOne, m_Value()));
-
- if (match(BO0, BitwiseAnd) && I.getPredicate() == ICmpInst::ICMP_ULT) {
- auto *Zero = Constant::getNullValue(BO0->getType());
- return new ICmpInst(ICmpInst::ICMP_NE, L, Zero);
- }
- }
}
{ Value *A, *B;
OpenPOWER on IntegriCloud