public inbox for
 help / color / mirror / Atom feed
From: Segher Boessenkool <>
To: "Kewen.Lin" <>
Cc: GCC Patches <>,
	Richard Biener <>,
	David Edelsohn <>,
	Richard Sandiford <>
Subject: Re: [PATCH] rs6000/test: Adjust pr104992.c with vect_int_mod [PR106516]
Date: Wed, 28 Sep 2022 09:55:18 -0500	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>


On Wed, Aug 24, 2022 at 04:17:55PM +0800, Kewen.Lin wrote:
> As PR106516 shows, we can get unexpected gimple outputs for
> function thud on some target which supports modulus operation
> for vector int.  This patch introduces one effective target
> vect_int_mod for it, then adjusts the test case with it.

> +# Return 1 if the target supports vector int modulus, 0 otherwise.
> +
> +proc check_effective_target_vect_int_mod { } {
> +    return [check_cached_effective_target_indexed vect_int_mod {
> +      expr { [istarget powerpc*-*-*]
> +	     && [check_effective_target_power10_ok] }}]
> +}

power10_ok does not mean the vmod[su][wdq] instructions will be
generated.  You need to test if we have -mcpu=power10 or such, so,
check_effective_target_has_arch_pwr10 .

<X>_ok tests if it is okay to enable <X>.  <X>_hw tests if the hardware
can do <X>.  has_arch_<X> tests if the compiler is asked to generate
code for <X> (which is reflected in the _ARCH_* preprocessor symbols,
hence the name).

Okay for trunk with the correct check_effective_target_* .  Thanks!


  parent reply	other threads:[~2022-09-28 14:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  8:17 Kewen.Lin
2022-09-28  5:35 ` PING^1 " Kewen.Lin
2022-09-28 15:00   ` Segher Boessenkool
2022-09-28 14:55 ` Segher Boessenkool [this message]
2022-09-30 12:25   ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* 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).