[all-commits] [llvm/llvm-project] fa6eef: Revert "Avoid maxnum(sNaN, x) optimizations / fold...

Lewis Crawford via All-commits all-commits at lists.llvm.org
Tue Mar 3 04:45:48 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fa6eef837831ee6744e6baf0398104f374070470
      https://github.com/llvm/llvm-project/commit/fa6eef837831ee6744e6baf0398104f374070470
  Author: Lewis Crawford <lcrawford at nvidia.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/lib/CodeGen/GlobalISel/Utils.cpp
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/test/CodeGen/AMDGPU/fcanonicalize-elimination.ll
    M llvm/test/CodeGen/ARM/fminmax-folds.ll
    M llvm/test/CodeGen/X86/fmaxnum.ll
    M llvm/test/CodeGen/X86/fminnum.ll
    M llvm/test/Transforms/InstCombine/simplify-demanded-fpclass.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/min-max.ll
    M llvm/test/Transforms/InstSimplify/fminmax-folds.ll

  Log Message:
  -----------
  Revert "Avoid maxnum(sNaN, x) optimizations / folds (#170181)" (#184125)

This reverts commit ea3fdc5972db7f2d459e543307af05c357f2be26.

Re-enable const-folding for maxnum/minnum in the middle-end, GlobalISel,
and SelectionDAG.

Re-enable optimizations that depend on maxnum/minnum sNaN semantics in
InstCombine and DAGCombiner.

Now that maxnum(x, sNaN) is specified to non-deterministically produce
either NaN or x, these constant-foldings and optimizations are now valid
again according to the newly clarified semantics in #172012 .



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list