public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Alexandre Oliva <oliva@adacore.com>
Cc: gcc-patches@gcc.gnu.org, ebotcazou@libertysurf.fr,
	vmakarov@redhat.com, dje.gcc@gmail.com
Subject: Re: [PATCH] [PR100106] Reject unaligned subregs when strict alignment is required
Date: Thu, 5 May 2022 09:33:08 -0500	[thread overview]
Message-ID: <20220505143308.GC25951@gate.crashing.org> (raw)
In-Reply-To: <or1qx8h3ou.fsf@lxoliva.fsfla.org>

On Thu, May 05, 2022 at 03:52:01AM -0300, Alexandre Oliva wrote:
> The testcase for pr100106, compiled with optimization for 32-bit
> powerpc -mcpu=604 with -mstrict-align expands the initialization of a
> union from a float _Complex value into a load from an SCmode
> constant pool entry, aligned to 4 bytes, into a DImode pseudo,
> requiring 8-byte alignment.

> +  else if (reg && MEM_P (reg)
> +	   && STRICT_ALIGNMENT && MEM_ALIGN (reg) < GET_MODE_ALIGNMENT (omode))
> +    return false;

Please fix the line breaks?  Either do a break before every &&, or put
as many things as possible on one line?

Note that you should never have paradoxical subregs of mem on rs6000 or
any other target with INSN_SCHEDULING.

> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/pr100106-sa.c
> @@ -0,0 +1,4 @@
> +/* { dg-do compile { target { ilp32 } } } */
> +/* { dg-options "-mcpu=604 -O -mstrict-align" } */
> +
> +#include "../../gcc.c-torture/compile/pr100106.c"

It is better to copy the 11 lines of code.

Please comment what the ilp32 is for (namely, the -mcpu= will barf
without it)..  The testcase is okay with those changes, thanks!


Seghr

  parent reply	other threads:[~2022-05-05 14:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05  6:52 Alexandre Oliva
2022-05-05  7:59 ` Richard Sandiford
2022-05-05 13:50   ` Segher Boessenkool
2022-05-06 10:57     ` [PATCH v2 2/2] " Alexandre Oliva
2022-05-09  8:09       ` Richard Sandiford
2022-05-05 14:33 ` Segher Boessenkool [this message]
2022-05-06  2:41   ` [PATCH v2] " Alexandre Oliva
2022-07-09 17:14     ` Jeff Law
2023-05-24  5:39     ` Alexandre Oliva
2023-05-24  9:04       ` Richard Biener
2022-05-06 18:04 ` [PATCH] " Vladimir Makarov

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=20220505143308.GC25951@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=ebotcazou@libertysurf.fr \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=oliva@adacore.com \
    --cc=vmakarov@redhat.com \
    /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).