HomePhabricator

[DAGCombine] Don't delete the node if it has uses immediately
defbc77a7c95Unpublished

Authored by steven.zhang on Aug 28 2020, 8:21 AM.

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

[DAGCombine] Don't delete the node if it has uses immediately

This is the follow up patch for https://reviews.llvm.org/D86183 as we miss to delete the node if NegX == NegY, which has use after we create the node.

if (NegX && (CostX <= CostY)) {
  Cost = std::min(CostX, CostZ);
  RemoveDeadNode(NegY);
  return DAG.getNode(Opcode, DL, VT, NegX, Y, NegZ, Flags);  #<-- NegY is used here if NegY == NegX.
}

Reviewed By: spatel

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

(cherry picked from commit deb4b2580715810ecd5cb7eefa5ffbe65e5eedc8)

Details

Committed
hansMon, Aug 31, 5:17 AM
Parents
rGd98e4c0d9a35: Add a few more release notes for ARM and AArch64.
Branches
Unknown
Tags
Unknown