[all-commits] [llvm/llvm-project] b78e5d: [SelectionDAG] Check any use of negation result be...

Qiu Chaofan via All-commits all-commits at lists.llvm.org
Thu Sep 17 04:40:49 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: b78e5de029c26c309f541ab883fa5d6d953b073d
      https://github.com/llvm/llvm-project/commit/b78e5de029c26c309f541ab883fa5d6d953b073d
  Author: Qiu Chaofan <qiucofan at cn.ibm.com>
  Date:   2020-09-17 (Thu, 17 Sep 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    A llvm/test/CodeGen/X86/pr47517.ll

  Log Message:
  -----------
  [SelectionDAG] Check any use of negation result before removal

2508ef01 fixed a bug about constant removal in negation. But after
sanitizing check I found there's still some issue about it so it's
reverted.

Temporary nodes will be removed if useless in negation. Before the
removal, they'd be checked if any other nodes used it. So the removal
was moved after getNode. However in rare cases the node to be removed is
the same as result of getNode. We missed that and will be fixed by this
patch.

Reviewed By: steven.zhang

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

(cherry picked from commit a2fb5446be960ad164060b3c05fc268f7f72d67a)




More information about the All-commits mailing list