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/112830] internal compiler error: in convert_memory_address_addr_space_1, at explow.cc:302
Date: Wed, 06 Dec 2023 07:33:43 +0000	[thread overview]
Message-ID: <bug-112830-4-7FcoLSLbnZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112830-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112830

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Georg-Johann Lay from comment #15)
> (In reply to Richard Biener from comment #13)
> > The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
> > 
> > https://gcc.gnu.org/g:68d32d02035fc081384ec6d6fd275e49ffa5d016
> > 
> > commit r14-6182-g68d32d02035fc081384ec6d6fd275e49ffa5d016
> > Author: Richard Biener <rguenther@suse.de>
> > Date:   Mon Dec 4 10:35:38 2023 +0100
> > 
> >     middle-end/112830 - avoid gimplifying non-default addr-space assign to
> > memcpy
> >     
> >     The following avoids turning aggregate copy involving non-default
> >     address-spaces to memcpy since that is not prepared for that.
> 
> avr.md cpymemhi currently only accepts const_int sizes.  Does your change
> mean it's not possible (or unsafe) to implement that insn with variable
> sizes for better code?
> 
> The middle end still tries to expand cpymemhi for variable sizes (but
> currently the expander FAILs), so I think I don't understand that part of
> the commit message.

It specifically avoids expanding __builtin_memcpy since that goes off
rails, losing address-space info.  And a user using memcpy () himself
for copying between address-spaces is doing invalid things anyway.

The middle-end should still try to use cpymem and as fallback will emit
a loop IIRC.  Tuning from within the backend should be still possible,
also for variable-size.  It might be the middle-end needs improvements
as well, feel free to open new bugreports with testcases where things
do not work as expected from the middle-end side.

      parent reply	other threads:[~2023-12-06  7:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-03 12:22 [Bug middle-end/112830] New: " gjl at gcc dot gnu.org
2023-12-03 12:37 ` [Bug middle-end/112830] " gjl at gcc dot gnu.org
2023-12-03 22:17 ` pinskia at gcc dot gnu.org
2023-12-04  7:06 ` rguenth at gcc dot gnu.org
2023-12-04  8:40 ` rguenth at gcc dot gnu.org
2023-12-04  9:07 ` rguenth at gcc dot gnu.org
2023-12-04  9:08 ` rguenth at gcc dot gnu.org
2023-12-04  9:27 ` rguenth at gcc dot gnu.org
2023-12-04 11:56 ` rguenth at gcc dot gnu.org
2023-12-04 19:19 ` gjl at gcc dot gnu.org
2023-12-05  9:48 ` rguenth at gcc dot gnu.org
2023-12-05 10:54 ` rguenth at gcc dot gnu.org
2023-12-05 11:31 ` ebotcazou at gcc dot gnu.org
2023-12-05 13:55 ` cvs-commit at gcc dot gnu.org
2023-12-05 13:56 ` rguenth at gcc dot gnu.org
2023-12-05 20:46 ` gjl at gcc dot gnu.org
2023-12-06  7:33 ` rguenth at gcc dot gnu.org [this message]

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-112830-4-7FcoLSLbnZ@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).