[all-commits] [llvm/llvm-project] 846fbb: [DAGCombiner][RISCV] Return SDValue(N, 0) instead ...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Aug 17 15:17:35 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 846fbb06b8bf154a6c39d6b95a09b42ecd871811
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    A llvm/test/CodeGen/RISCV/pr64772.ll

  Log Message:
  [DAGCombiner][RISCV] Return SDValue(N, 0) instead of SDValue() after 2 calls to CombineTo in visitSTORE.

RISC-V found a case where the CombineTo caused N to be CSEd with
an existing node and then deleted. The top level DAGCombiner loop
was surprised to find a node was deleted, but SDValue() was returned
from the visit function.

We need to return SDValue(N, 0) to tell the top level loop that
a change was made, but the worklist updates were already handled.

Fixes #64772.

Reviewed By: arsenm

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

More information about the All-commits mailing list