public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: Christophe Lyon <christophe.lyon.oss@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] tree-optimization/101756 - avoid vectorizing boolean MAX reductions
Date: Thu, 5 Aug 2021 11:42:21 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.2108051141590.11781@zhemvz.fhfr.qr> (raw)
In-Reply-To: <CAKhMtSJteDiwz9PM+Dba7+QVcy7MSLH7e_2D0PARgvWkGurciw@mail.gmail.com>

On Thu, 5 Aug 2021, Christophe Lyon wrote:

> On Wed, Aug 4, 2021 at 12:33 PM Richard Biener <rguenther@suse.de> wrote:
> 
> > The following avoids vectorizing MIN/MAX reductions on bools which,
> > when ending up as vector(2) <signed-boolean:64> would need to be
> > adjusted because of the sign change.  The fix instead avoids any
> > reduction vectorization where the result isn't compatible
> > to the original scalar type since we don't compensate for that
> > either.
> >
> > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
> >
> > 2021-08-04  Richard Biener  <rguenther@suse.de>
> >
> >         PR tree-optimization/101756
> >         * tree-vect-slp.c (vectorizable_bb_reduc_epilogue): Make sure
> >         the result of the reduction epilogue is compatible to the original
> >         scalar result.
> >
> >         * gcc.dg/vect/bb-slp-pr101756.c: New testcase.
> >
> 
> Hi,
> 
> The new testcase fails on aarch64 because:
>  FAIL: gcc.dg/vect/bb-slp-pr101756.c (test for excess errors)
> Excess errors:
> /gcc/testsuite/gcc.dg/vect/bb-slp-pr101756.c:4:1: warning: GCC does not
> currently support mixed size types for 'simd' functions
> 
> Can you check?

I have pushed

From 425fce297da1696b4b5178e533d823f13fb250a5 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Thu, 5 Aug 2021 11:39:50 +0200
Subject: [PATCH] Adjust gcc.dg/vect/bb-slp-pr101756.c
To: gcc-patches@gcc.gnu.org

This adjusts the testcase for excess diagnostics emitted by some
targets because of the attribute simd usage like

warning: GCC does not currently support mixed size types for 'simd' functions

on aarch64.

2021-08-05  Richard Biener  <rguenther@suse.de>

	* gcc.dg/vect/bb-slp-pr101756.c: Add -w.
---
 gcc/testsuite/gcc.dg/vect/bb-slp-pr101756.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr101756.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr101756.c
index 9420e77f64e..de7f1806926 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-pr101756.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr101756.c
@@ -1,4 +1,6 @@
 /* { dg-do compile } */
+/* SIMD support can emit additional diagnostics.  */
+/* { dg-additional-options "-w" } */
 
 __attribute__ ((simd)) int
 tq (long int ea, int of, int kk)
-- 
2.31.1


      reply	other threads:[~2021-08-05  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 10:33 Richard Biener
2021-08-05  9:36 ` Christophe Lyon
2021-08-05  9:42   ` Richard Biener [this message]

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=nycvar.YFH.7.76.2108051141590.11781@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=christophe.lyon.oss@gmail.com \
    --cc=gcc-patches@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).