[llvm] [ValueTracking] Compute KnownFP state from recursive select/phi. (PR #113686)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 07:17:31 PDT 2024
================
@@ -6003,6 +6003,13 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts,
if (IncValue == P)
continue;
+ // If the Use is a select of this phi, use the fp class of the other
+ // operand to break the recursion.
+ Value *V;
+ if (match(IncValue, m_Select(m_Value(), m_Specific(P), m_Value(V))) ||
+ match(IncValue, m_Select(m_Value(), m_Value(V), m_Specific(P))))
----------------
goldsteinn wrote:
Just a nit, but maybe this means we should add `m_c_Select` matcher.
https://github.com/llvm/llvm-project/pull/113686
More information about the llvm-commits
mailing list