[all-commits] [llvm/llvm-project] 5c6ff3: [DAGCombine] Move setcc of freeze fold to brcond

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jun 12 03:01:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c6ff3a6025570479da5b72fcd02ca93b470683b
      https://github.com/llvm/llvm-project/commit/5c6ff3a6025570479da5b72fcd02ca93b470683b
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-06-12 (Mon, 12 Jun 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

  Log Message:
  -----------
  [DAGCombine] Move setcc of freeze fold to brcond

This fold goes against the usual approach of pushing freeze into
operands. The idea behind the fold is that if the setcc feeds into
a brcond, the freeze can be dropped entirely.

Move the fold to brcond, where we can remove the freeze directly.
This ensures that there can be no infinite combine loops due to
conflicting transforms.

Differential Revision: https://reviews.llvm.org/D152544




More information about the All-commits mailing list