[llvm-bugs] [Bug 35909] static_cast<T*>(this) does not propagate non-null invariant of 'this'
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 19 07:37:06 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=35909
Sanjay Patel <spatel+llvm at rotateright.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Sanjay Patel <spatel+llvm at rotateright.com> ---
Should be fixed with:
https://reviews.llvm.org/rL322950
With that change, everything proceeds as before until after inlining. When we
run instcombine after that, we kill the null check because the GEP is now known
to be inbounds:
IC: Visiting: %sub.ptr2.i = getelementptr inbounds %class.B, %class.B* %b,
i64 -1
IC: Visiting: %1 = bitcast %class.B* %sub.ptr2.i to %class.A*
IC: Visiting: %tobool1 = icmp eq %class.A* %1, null
IC: Replacing %tobool1 = icmp eq %class.A* %1, null
with i1 false
--
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/20180119/8ebf6478/attachment.html>
More information about the llvm-bugs
mailing list