[llvm] Revert "Avoid maxnum(sNaN, x) optimizations / folds (#170181)" (PR #184125)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 06:28:50 PST 2026
================
@@ -6744,27 +6743,29 @@ static MinMaxOptResult OptimizeConstMinMax(const Constant *RHSConst,
// minnum(x, qnan) -> x
// maxnum(x, qnan) -> x
+ // minnum(x, snan) -> qnan
+ // maxnum(x, snan) -> qnan
----------------
phoebewang wrote:
Why don't simplify to x? Seems contradiction with rule in line 6761.
https://github.com/llvm/llvm-project/pull/184125
More information about the llvm-commits
mailing list