public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gjl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/50417] regression: memcpy with known alignment
Date: Wed, 09 Oct 2013 09:25:00 -0000 [thread overview]
Message-ID: <bug-50417-4-i410VXlPrp@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50417-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50417
Georg-Johann Lay <gjl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Target|sh*-*-* arm*-*-* avr*-*-* |sh*-*-* arm*-*-*
CC| |gjl at gcc dot gnu.org
--- Comment #4 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> The middle-end does not know anything about the parameters alignment.
But the following code will use SImode load / store, even on strict-alignment
backends
void test (const int* a, int* b)
{
*b = *a;
}
If SImode operations are in order here, why not in memcpy et al. provided it is
feeded with int*?
In the case where an unaligned pointer is used in *b = *a and this causes, e.g.
a trap, this is in order. Similar should apply for memcpy on strict-alignment
machines if it gets an unaligned int* for example and the size is a multiple of
the alignment requirement.
BTW: AVR is an 8-bit machine that copies in chunks of 1 byte, this applies also
for 4.5 and older. avr-gcc is /not/ a strict alignment backend. Thul removed
from the targets.
next prev parent reply other threads:[~2013-10-09 9:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 8:57 [Bug tree-optimization/50417] New: " wouter.vermaelen at scarlet dot be
2011-09-25 10:13 ` [Bug tree-optimization/50417] " rguenth at gcc dot gnu.org
2012-06-06 11:01 ` rguenth at gcc dot gnu.org
2013-07-14 10:31 ` olegendo at gcc dot gnu.org
2013-10-09 9:25 ` gjl at gcc dot gnu.org [this message]
2014-04-02 8:39 ` rguenth at gcc dot gnu.org
2015-09-22 8:04 ` rguenth at gcc dot gnu.org
2021-05-14 9:46 ` [Bug tree-optimization/50417] [9/10/11/12 regression]: " jakub at gcc dot gnu.org
2021-06-01 8:05 ` rguenth at gcc dot gnu.org
2021-08-15 9:13 ` pinskia at gcc dot gnu.org
2022-05-27 9:34 ` [Bug tree-optimization/50417] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-07-07 10:29 ` [Bug tree-optimization/50417] [11/12/13/14 " rguenth at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-50417-4-i410VXlPrp@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).