[all-commits] [llvm/llvm-project] 03e848: [DAGCombiner] `visitFREEZE()`: fix cycle breaking

Roman Lebedev via All-commits all-commits at lists.llvm.org
Fri Dec 23 07:16:44 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03e848293e1ce91dee049b5ef6afdfdbdb6fe51b
      https://github.com/llvm/llvm-project/commit/03e848293e1ce91dee049b5ef6afdfdbdb6fe51b
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2022-12-23 (Fri, 23 Dec 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/freeze-vector.ll

  Log Message:
  -----------
  [DAGCombiner] `visitFREEZE()`: fix cycle breaking

Depending on the particular DAG, we might either create a `freeze`,
or not. And only in the former case, the cycle would be formed.
It would be nicer to have `ReplaceAllUsesOfValueWithIf()`,
like we have in IR, but we don't have that.

Fixes https://github.com/llvm/llvm-project/issues/59677




More information about the All-commits mailing list