public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: gcc-patches@gcc.gnu.org, Xionghu Luo <luoxhu@linux.ibm.com>,
	David Edelsohn <dje.gcc@gmail.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	Kewen Lin <linkw@gcc.gnu.org>
Subject: Re: [PATCH] powerpc: Fix up *branch_anddi3_dot for -m32 -mpowerpc64 [PR109566]
Date: Tue, 25 Apr 2023 10:06:53 +0200	[thread overview]
Message-ID: <ZEeKHX36XMaxYink@tucnak> (raw)
In-Reply-To: <5df85739-c065-a32e-b725-4a301c6e3b0e@linux.ibm.com>

On Tue, Apr 25, 2023 at 01:33:18PM +0800, Kewen.Lin via Gcc-patches wrote:
> For the associated test case, it looks it's valid to make use of rldicr.
> (rolt with dot), so an alternative seems to relax the condition of
> *rotldi3_mask_dot.  Considering this is also targeted for 13.1, I think
> this proposed fix is much more conservative, thus this looks good to me!
> I also expect Segher/David can give a final say. :)

I admit I couldn't find the reason for that condition (it appears on
multiple patterns), but for release branches I think we need to stay as
conservative as possible.
> > +      /* *rotldi3_mask_dot requires for -m32 -mpowerpc64 that the mask is
> > +	 <= 0x7ffffff.  */
> 
> typo, a "f" is missing in "0x7ffffff".

Thanks for catching this.  Added to my patch copy.

> > +      return (UINTVAL (mask) << (63 - nb)) <= 0x7fffffff;
> > +    }
> > +  else
> > +    return false;
> >  }
> > 
> >  /* Return whether MASK (a CONST_INT) is a valid mask for any rlwinm, rldicl,
> > --- gcc/testsuite/gcc.target/powerpc/pr109566.c.jj	2023-04-24 12:54:48.293266468 +0200
> > +++ gcc/testsuite/gcc.target/powerpc/pr109566.c	2023-04-24 12:34:34.306006418 +0200
> > @@ -0,0 +1,15 @@
> > +/* PR target/109566 */
> > +/* { dg-do compile } */
> > +/* { dg-options "-O2 -mpowerpc64" } */
> 
> /* { dg-skip-if "" { powerpc*-*-aix* } { "*" } { "" } } */
> 
> Like 749140af5d072a, we have to exclude this to be tested on aix, otherwise the
> -maix32 and -mpowerpc64 can cause an error message on aix like:
> 
> error: '-maix64' required: 64-bit computation with 32-bit addressing not yet supported

Added
+/* Skip this on aix, otherwise it emits the error message like "64-bit
+   computation with 32-bit addressing not yet supported" on aix.  */
+/* { dg-skip-if "" { powerpc*-*-aix* } } */
to my copy from another testcase.

	Jakub


  reply	other threads:[~2023-04-25  8:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 15:54 Jakub Jelinek
2023-04-25  5:33 ` Kewen.Lin
2023-04-25  8:06   ` Jakub Jelinek [this message]
2023-04-25 12:00 ` Segher Boessenkool

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=ZEeKHX36XMaxYink@tucnak \
    --to=jakub@redhat.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@gcc.gnu.org \
    --cc=linkw@linux.ibm.com \
    --cc=luoxhu@linux.ibm.com \
    --cc=segher@kernel.crashing.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).