[llvm] [ValueTracking] Compute known FPClass from signbit idiom (PR #80740)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 11:05:22 PST 2024
================
@@ -66,6 +66,10 @@ static void findAffectedValues(Value *Cond,
// A > C3 && A < C4.
if (match(A, m_Add(m_Value(X), m_ConstantInt())))
AddAffected(X);
+ // Handle icmp slt/sgt (bitcast X to int), 0/-1
+ if (match(A, m_ElementWiseBitCast(m_Value(X))) &&
+ (Pred == ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SGT))
----------------
arsenm wrote:
```suggestion
if ((Pred == ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SGT) &&
match(A, m_ElementWiseBitCast(m_Value(X))))
```
https://github.com/llvm/llvm-project/pull/80740
More information about the llvm-commits
mailing list