[llvm-bugs] [Bug 44329] New: SimplifyCFG of empty WinEH cleanup pads doesn't handle lifetime.end correctly

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 17 16:32:48 PST 2019


            Bug ID: 44329
           Summary: SimplifyCFG of empty WinEH cleanup pads doesn't handle
                    lifetime.end correctly
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Transformation Utilities
          Assignee: unassignedbugs at nondot.org
          Reporter: andrew.kaylor at intel.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22942
  --> https://bugs.llvm.org/attachment.cgi?id=22942&action=edit
Reproducer for SSA problem

The SimplifyCFG utility doesn't correctly handle lifetime.end intrinsics when
deleting empty WinEH cleanup pads. There are at least two issues.

1. The lifetime.end intrinsic is simply deleted with the empty cleanup pad.
This leaves a path through the control graph in which a pointer appears to be
alive longer than it should.

2. If the lifetime.end is the only user of a PHI node in the cleanup pad we
will attempt to sink the PHI node into the cleanup pad's successor, which might
not be dominated by the cleanup pad. If the PHI node had non-PHI users outside
the cleanup pad this would be safe, but when the only user of the PHI node is a
lifetime.end marker inside the cleanup pad it causes an SSA violation.

The attached IR file reproduces the second problem. The first problem can be
seen in the existing (as of 12/17/2019) SimplifyCFG/empty-cleanuppad.ll test
(in f9).

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191218/d991465d/attachment.html>

More information about the llvm-bugs mailing list