Page MenuHomePhabricator

[WinEH] Ignore lifetime.end PHI nodes in empty cleanuppads

Authored by andrew.w.kaylor on Jan 10 2020, 2:06 PM.



This fixes a bug where a PHI node that is only referenced by a lifetime.end intrinsic in an otherwise empty cleanuppad can cause SimplyCFG to create an SSA violation while removing the empty cleanuppad. Theoretically the same problem can occur with debug intrinsics.

We were already deleting cleanup pads that contain lifetime.end intrinsics, and thus deleting the lifetime.end in the process. This patch just allows us to continue doing that correctly when the lifetime.end takes a local PHI as its pointer operand.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJan 10 2020, 2:06 PM
rnk accepted this revision.Jan 14 2020, 3:49 PM


This revision is now accepted and ready to land.Jan 14 2020, 3:49 PM
This revision was automatically updated to reflect the committed changes.