public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bergner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/108348] ICE in gen_movoo, at config/rs6000/mma.md:292
Date: Tue, 10 Jan 2023 17:08:42 +0000	[thread overview]
Message-ID: <bug-108348-4-H2Ig9sdeM2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108348-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Kewen Lin from comment #1)
> diff --git a/gcc/config/rs6000/rs6000-call.cc
> b/gcc/config/rs6000/rs6000-call.cc
> index 59c51fa3579..6767a1f541c 100644
> --- a/gcc/config/rs6000/rs6000-call.cc
> +++ b/gcc/config/rs6000/rs6000-call.cc
> @@ -2013,6 +2013,11 @@ rs6000_pass_by_reference (cumulative_args_t, const
> function_arg_info &arg)
>      {
>        if (TARGET_DEBUG_ARG)
>          fprintf (stderr, "function_arg_pass_by_reference: AltiVec\n");
> +      /* We do not allow MMA types being used as function arguments,
> +         return false to avoid the ICE on the copying for passing by
> +         reference.  */
> +      if (TYPE_MODE (arg.type) == OOmode || TYPE_MODE (arg.type) == XOmode)
> +        return 0;
>        return 1;
>      }

This doesn't seem right.  The function comment for rs6000_pass_by_reference is:

   A C expression that indicates when an argument must be passed by
   reference.  If nonzero for an argument, a copy of that argument is
   made in memory and a pointer to the argument is passed instead of
   the argument itself.  The pointer is passed in whatever way is
   appropriate for passing a pointer to that type.

By returning false here, that seems to imply that MMA types don't have to be
passed by reference.  Does that imply they can be passed by value?  If so,
that's not correct, since if we have a MMA type as a function argument/return
type, it must be via a pointer to that type, so pass-by-referernce.

  parent reply	other threads:[~2023-01-10 17:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10  2:59 [Bug target/108348] New: " asolokha at gmx dot com
2023-01-10  3:22 ` [Bug target/108348] " linkw at gcc dot gnu.org
2023-01-10  7:55 ` linkw at gcc dot gnu.org
2023-01-10  8:24 ` linkw at gcc dot gnu.org
2023-01-10  8:34 ` linkw at gcc dot gnu.org
2023-01-10 17:08 ` bergner at gcc dot gnu.org [this message]
2023-01-11  2:51 ` linkw at gcc dot gnu.org
2023-01-18  8:35 ` cvs-commit at gcc dot gnu.org
2023-02-13  2:03 ` cvs-commit at gcc dot gnu.org
2023-02-13  2:09 ` cvs-commit at gcc dot gnu.org
2023-02-13  2:18 ` cvs-commit at gcc dot gnu.org
2023-02-13  2:22 ` linkw 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-108348-4-H2Ig9sdeM2@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).