public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	David Edelsohn <dje.gcc@gmail.com>,
	Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH] rs6000: Fix condition of define_expand vec_shr_<mode> [PR100645]
Date: Thu, 22 Sep 2022 16:39:24 -0500	[thread overview]
Message-ID: <20220922213923.GJ25951@gate.crashing.org> (raw)
In-Reply-To: <354edbb1-e0b0-07b3-ceb7-456442781b0b@linux.ibm.com>

Hi!

Heh, I first thought I had mistyped thgew PR #, but it is this one after
all :-)

On Thu, Sep 22, 2022 at 09:41:34AM +0800, Kewen.Lin wrote:
> PR100645 exposes one latent bug in define_expand vec_shr_<mode>
> that the current condition TARGET_ALTIVEC is too loose.  The
> mode iterator VEC_L contains a few modes, they are not always
> supported as vector mode, VECTOR_UNIT_ALTIVEC_OR_VSX_P should
> be used like some other VEC_L usages.

> --- a/gcc/config/rs6000/vector.md
> +++ b/gcc/config/rs6000/vector.md
> @@ -1475,7 +1475,7 @@ (define_expand "vec_shr_<mode>"
>    [(match_operand:VEC_L 0 "vlogical_operand")
>     (match_operand:VEC_L 1 "vlogical_operand")
>     (match_operand:QI 2 "reg_or_short_operand")]
> -  "TARGET_ALTIVEC"
> +  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"

> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/pr100645.c
> @@ -0,0 +1,13 @@
> +/* { dg-require-effective-target powerpc_altivec_ok } */
> +/* { dg-options "-mdejagnu-cpu=power6 -maltivec" } */

This is a strange choice: we normally do not enable VMX on p6.  Just use
p7 instead?  There is no need for altivec_ok in any case, the -mcpu=
guarantees it is satisfied.

> +/* It's to verify no ICE here.  */

"This used to ICE."?

Please commit this now, looks good.  Thanks!


Segher

  reply	other threads:[~2022-09-22 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  1:41 Kewen.Lin
2022-09-22 21:39 ` Segher Boessenkool [this message]
2022-09-26  5:41   ` Kewen.Lin

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=20220922213923.GJ25951@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@linux.ibm.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).