[llvm-bugs] [Bug 48036] [DeadStoreElimination w/ MemSSA] wrong code
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Nov 1 03:12:34 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48036
Florian Hahn <florian_hahn at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Fixed By Commit(s)| |aab71d44431e
Resolution|--- |FIXED
--- Comment #1 from Florian Hahn <florian_hahn at apple.com> ---
(In reply to Jonas Paulsson from comment #0)
>
> I can't see any other store to that address/element, and I have no idea why
> DSE removes it...
Thanks for reducing the issue!
I had a look yesterday and the store was killed by the free call. DSE +
MemorySSA used to quite aggressive, it considered a free to kill the whole
underlying object.
In the example attached here, it looks like the free is used to release part of
an underlying object. What is even odder is that the underlying object appears
to be a alloca (I might be missing something though, as it goes through
multiple GEPs/casts/types).
I also checked the logic legacy DSE used, which only considers the region
starting at the freed pointer as freed when it is part of a larger object.
I updated MemorySSA DSE to use the same logic and I think this should have
fixed the obj copy issue on the bot. The first build with the patch is
http://lab.llvm.org:8011/#/builders/8/builds/25 and the only failed tests seem
fixed-point related.
The patch is https://reviews.llvm.org/rGaab71d44431e
Please re-open the issue, if the problem still persists.
--
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/20201101/209ac928/attachment.html>
More information about the llvm-bugs
mailing list