HomePhabricator

[LCSSA] Do not remove used PHI nodes in formLCSSAForInstructions

Authored by bjope on May 7 2018, 11:59 PM.

Description

[LCSSA] Do not remove used PHI nodes in formLCSSAForInstructions

Summary:
In formLCSSAForInstructions we speculatively add new PHI
nodes, that sometimes ends up without having any uses. It
has been discovered that sometimes an added PHI node can
appear as being unused in one iteration of the Worklist,
although it can end up being used by a PHI node added in
a later iteration. We now check, a second time, that the
PHI node still is unused before we remove it. This avoids
an assert about "Trying to remove a phi with uses." for the
added test case.

Reviewers: davide, mzolotukhin, mattd, dberlin

Reviewed By: mzolotukhin, dberlin

Subscribers: dberlin, mzolotukhin, davide, bjope, uabelho, llvm-commits

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

llvm-svn: 331741

Details

Committed
bjopeMay 7 2018, 11:59 PM
Reviewer
mzolotukhin
Differential Revision
D46422: [LCSSA] Do not remove used PHI nodes in formLCSSAForInstructions
Parents
rGb0f310d51dd9: [x86] Introduce the pconfig intrinsic
Branches
Unknown
Tags
Unknown