This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/71690] absence of integer conversion defeats memcpy optimizaton
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 Jun 2016 22:30:59 +0000
- Subject: [Bug middle-end/71690] absence of integer conversion defeats memcpy optimizaton
- Auto-submitted: auto-generated
- References: <bug-71690-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71690
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #1)
> See also C++ bug 71654 for the "inverse" of the problem where VRP
> successfully provides range information in the absence of a conversion but
> fails with it.
That is a totally different issue.
The issue here is that range information has to be correct for all places where
the name is used. Without a cast the name is used in both the comparison and
in the memcpy so the range needs to be empty so the comparison is not removed.