[llvm] [InstCombine] Fold select of ordered fcmps of fabs over `isKnownNeverNaN`-selects to a single select (PR #192182)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 19 23:34:32 PDT 2026
================
@@ -3347,6 +3347,106 @@ static Instruction *foldSelectWithFCmpToFabs(SelectInst &SI,
return ChangedFMF ? &SI : nullptr;
}
+static bool matchIsNaNTest(FCmpInst *Cmp, Value *X, bool MatchIsNaN,
+ InstCombinerImpl &IC) {
+ FCmpInst::Predicate ExpectedPred =
----------------
imkiva wrote:
Good point. I dropped the `uno` handling and now only match the canonical `isnotnan(X) ? X : Y` form.
https://github.com/llvm/llvm-project/pull/192182
More information about the llvm-commits
mailing list