[all-commits] [llvm/llvm-project] 38200e: [DAG] visitFREEZE - always allow freezing multiple...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Jul 2 03:28:58 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 38200e94f1428b586dc1778133120541e65c20b5
      https://github.com/llvm/llvm-project/commit/38200e94f1428b586dc1778133120541e65c20b5
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2025-07-02 (Wed, 02 Jul 2025)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/AArch64/vecreduce-propagate-sd-flags.ll
    M llvm/test/CodeGen/AMDGPU/div_i128.ll
    M llvm/test/CodeGen/AMDGPU/rem_i128.ll
    M llvm/test/CodeGen/NVPTX/i1-select.ll
    M llvm/test/CodeGen/NVPTX/i128.ll
    M llvm/test/CodeGen/PowerPC/ppc64-P9-vabsd.ll
    M llvm/test/CodeGen/RISCV/fpclamptosat.ll
    M llvm/test/CodeGen/RISCV/intrinsic-cttz-elts-vscale.ll
    M llvm/test/CodeGen/RISCV/wide-scalar-shift-legalization.ll
    M llvm/test/CodeGen/SystemZ/pr60413.ll
    M llvm/test/CodeGen/X86/abds-neg.ll
    M llvm/test/CodeGen/X86/avg.ll
    M llvm/test/CodeGen/X86/div-rem-pair-recomposition-signed.ll
    M llvm/test/CodeGen/X86/div-rem-pair-recomposition-unsigned.ll
    M llvm/test/CodeGen/X86/freeze-vector.ll
    M llvm/test/CodeGen/X86/setcc-non-simple-type.ll

  Log Message:
  -----------
  [DAG] visitFREEZE - always allow freezing multiple operands (#145939)

Always try to fold freeze(op(....)) -> op(freeze(),freeze(),freeze(),...).

This patch proposes we drop the opt-in limit for opcodes that are allowed to push a freeze through the op to freeze all its operands, through the tree towards the roots.

I'm struggling to find a strong reason for this limit apart from the DAG freeze handling being immature for so long - as we've improved coverage in canCreateUndefOrPoison/isGuaranteedNotToBeUndefOrPoison it looks like the regressions are not as severe.

Hopefully this will help some of the regression issues in #143102 etc.



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