[all-commits] [llvm/llvm-project] 545aff: [DAGCombiner] Use HandleSDNode to keep node alive ...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Sep 9 22:13:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 545affbf79bfbc19659a0f442f22558791aa4404
      https://github.com/llvm/llvm-project/commit/545affbf79bfbc19659a0f442f22558791aa4404
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-09-09 (Fri, 09 Sep 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    A llvm/test/CodeGen/X86/pr57658.ll

  Log Message:
  -----------
  [DAGCombiner] Use HandleSDNode to keep node alive across call to getNegatedExpression.

getNegatedExpression can delete nodes. If the first call to
getNegatedExpression produced a node that the second call also
manages to create, it might get deleted. Use a HandleSDNode to
ensure it has a use to prevent it from being deleted.

Fixes PR57658.

Reviewed By: RKSimon

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




More information about the All-commits mailing list