public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/94703] Small-sized memcpy leading to unnecessary register spillage unless done through a dummy union Date: Fri, 08 May 2020 11:19:07 +0000 [thread overview] Message-ID: <bug-94703-4-pcdlDuW1IH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94703-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94703 --- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Rainer Orth from comment #7) > Created attachment 48483 [details] > 32-bit sparc-sun-solaris2.11 pr94703.c.021t.ssa > > The new testcase FAILs on sparc-sun-solaris2.11 (both 32 and 64-bit): > > +FAIL: gcc.dg/tree-ssa/pr94703.c scan-tree-dump ssa "No longer having > address taken: r" Hmm, OK looks like memcpy is not folded, likely because the source is not known to be appropriately aligned. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr94703.c b/gcc/testsuite/gcc.dg/tree-ssa/pr94703.c index 7209fa0a4d4..eadea45a32f 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr94703.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr94703.c @@ -4,6 +4,7 @@ unsigned int set_lowpart (unsigned int const *X) { unsigned int r = 0; + X = __builtin_assume_aligned (X, sizeof (unsigned int) / 2); __builtin_memcpy(&r,X,sizeof (unsigned int) / 2); return r; } should fix this. Can you verify and if so, commit? Thx.
next prev parent reply other threads:[~2020-05-08 11:19 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-21 21:07 [Bug c/94703] New: " pskocik at gmail dot com 2020-04-22 7:28 ` [Bug middle-end/94703] " rguenth at gcc dot gnu.org 2020-04-22 7:34 ` rguenth at gcc dot gnu.org 2020-04-22 7:59 ` rguenth at gcc dot gnu.org 2020-04-22 8:46 ` rguenth at gcc dot gnu.org 2020-05-07 13:39 ` cvs-commit at gcc dot gnu.org 2020-05-07 13:41 ` rguenth at gcc dot gnu.org 2020-05-08 11:03 ` ro at gcc dot gnu.org 2020-05-08 11:03 ` ro at gcc dot gnu.org 2020-05-08 11:19 ` rguenth at gcc dot gnu.org [this message] 2020-05-13 14:43 ` ro at CeBiTec dot Uni-Bielefeld.DE 2020-05-13 16:00 ` pskocik at gmail dot com 2020-05-14 9:10 ` rguenth at gcc dot gnu.org 2020-05-14 9:49 ` rguenth at gcc dot gnu.org 2020-05-14 9:54 ` cvs-commit at gcc dot gnu.org 2020-05-14 9:55 ` 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-94703-4-pcdlDuW1IH@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: linkBe 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).