[llvm-branch-commits] [llvm] InstCombine: Implement SimplifyDemandedFPClass for fma (PR #175616)
Yingwei Zheng via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jan 13 09:00:35 PST 2026
================
@@ -2033,21 +2033,25 @@ static Constant *getFPClassConstant(Type *Ty, FPClassTest Mask,
}
}
-/// Try to set an inferred no-nans or no-infs in \p FMF. \p
-/// ValidResults is a mask of known valid results for the operator
-/// (already computed from the result, and the known operand inputs,
-/// \p KnownLHS and \p KnownRHS)
+/// Try to set an inferred no-nans or no-infs in \p FMF. \p ValidResults is a
+/// mask of known valid results for the operator (already computed from the
+/// result, and the known operand inputs in \p Known)
static FastMathFlags
-inferFastMathValueFlagsBinOp(FastMathFlags FMF, FPClassTest ValidResults,
- const KnownFPClass &KnownLHS,
- const KnownFPClass &KnownRHS) {
- if (!FMF.noNaNs() && (ValidResults & fcNan) == fcNone &&
- KnownLHS.isKnownNeverNaN() && KnownRHS.isKnownNeverNaN())
- FMF.setNoNaNs();
+inferFastMathValueFlags(FastMathFlags FMF, FPClassTest ValidResults,
+ std::initializer_list<const KnownFPClass> Known) {
----------------
dtcxzyw wrote:
Use ArrayRef instead.
https://github.com/llvm/llvm-project/pull/175616
More information about the llvm-branch-commits
mailing list