aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/AssumptionCache.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-11-17 10:35:53 +0100
committerNikita Popov <npopov@redhat.com>2023-11-17 10:42:18 +0100
commit8775232c49cde288c429e27dd0f4f492fbb0cefa (patch)
tree900a2cb299a1496664d5e6b49a2051d206b79f40 /llvm/lib/Analysis/AssumptionCache.cpp
parentc4fd1fd6d4e0d21b2315fadecbcdc0892f3c6925 (diff)
downloadllvm-8775232c49cde288c429e27dd0f4f492fbb0cefa.zip
llvm-8775232c49cde288c429e27dd0f4f492fbb0cefa.tar.gz
llvm-8775232c49cde288c429e27dd0f4f492fbb0cefa.tar.bz2
[ValueTracking] Remove handling of KnownBits assumptions with invert
For all practical purposes, we only care about comparisons with constant RHS in this code. In that case, an invert will be canonicalized into the constant and it will be handled by other cases. Given the complete lack of test coverage, I'm removing this code.
Diffstat (limited to 'llvm/lib/Analysis/AssumptionCache.cpp')
-rw-r--r--llvm/lib/Analysis/AssumptionCache.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/AssumptionCache.cpp b/llvm/lib/Analysis/AssumptionCache.cpp
index bbcf25e..81b2667 100644
--- a/llvm/lib/Analysis/AssumptionCache.cpp
+++ b/llvm/lib/Analysis/AssumptionCache.cpp
@@ -94,13 +94,7 @@ findAffectedValues(CallBase *CI, TargetTransformInfo *TTI,
if (Pred == ICmpInst::ICMP_EQ) {
// For equality comparisons, we handle the case of bit inversion.
auto AddAffectedFromEq = [&AddAffected](Value *V) {
- Value *A;
- if (match(V, m_Not(m_Value(A)))) {
- AddAffected(A);
- V = A;
- }
-
- Value *B;
+ Value *A, *B;
// (A & B) or (A | B) or (A ^ B).
if (match(V, m_BitwiseLogic(m_Value(A), m_Value(B)))) {
AddAffected(A);