public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/59209] builtin memcpy in inlined function is not optimized away if count is derived from src pointer difference
[not found] <bug-59209-4@http.gcc.gnu.org/bugzilla/>
@ 2013-11-20 10:37 ` glisse at gcc dot gnu.org
2013-11-20 10:40 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-11-20 10:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59209
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
In test_copy2, we get:
_2 = x_1(D) + 1;
src_end.1_8 = (long int) _2;
src_start.2_9 = (long int) x_1(D);
_10 = src_end.1_8 - src_start.2_9;
_11 = (long unsigned int) _10;
This reminds me of PR 58742: we are failing to simplify basic arithmetic on
pointers.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug tree-optimization/59209] builtin memcpy in inlined function is not optimized away if count is derived from src pointer difference
[not found] <bug-59209-4@http.gcc.gnu.org/bugzilla/>
2013-11-20 10:37 ` [Bug tree-optimization/59209] builtin memcpy in inlined function is not optimized away if count is derived from src pointer difference glisse at gcc dot gnu.org
@ 2013-11-20 10:40 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-20 10:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59209
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
We simply are not able to optimize x + 1 - x to 1. See also PR58742
for which I think this is a dup.
_2 = x_1(D) + 1;
src_end.1_8 = (long int) _2;
src_start.2_9 = (long int) x_1(D);
_10 = src_end.1_8 - src_start.2_9;
_11 = (long unsigned int) _10;
__builtin_memcpy (&r, x_1(D), _11);
later on RTL we optimize the size argument to 1 but that's too late.
*** This bug has been marked as a duplicate of bug 58742 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-20 10:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-59209-4@http.gcc.gnu.org/bugzilla/>
2013-11-20 10:37 ` [Bug tree-optimization/59209] builtin memcpy in inlined function is not optimized away if count is derived from src pointer difference glisse at gcc dot gnu.org
2013-11-20 10:40 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).