public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/109502] [12/13 Regression] wrong code with -O -ftree-vectorize -fvect-cost-model=unlimited on aarch64
Date: Fri, 14 Apr 2023 02:04:36 +0000	[thread overview]
Message-ID: <bug-109502-4-qXTN3RBiY3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109502-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109502

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> SLP transforms:
> 
>   g.0_1 = g;
>   _2 = g.0_1 == 0;
>   a_7 = (unsigned int) _2;
>   _3 = a_7 % 6;
>   _4 = _3 == 0;
>   _5 = (unsigned int) _4;
>   a_8 = _5 + a_7;
> 
> To:
> 
>   g.0_1 = g;
>   _2 = g.0_1 == 0;
>   a_7 = (unsigned int) _2;
>   _3 = a_7 % 6;
>   _15 = {_3, g.0_1};
>   mask__4.4_16 = { 0, 0 } == _15;
>   vect__5.5_19 = VIEW_CONVERT_EXPR<vector(2) unsigned int>(mask__4.4_16);
>   _17 = BIT_FIELD_REF <mask__4.4_16, 32, 0>;
>   _18 = (bool) _17;
>   _4 = _3 == 0;
>   _5 = (unsigned int) _18;
>   _20 = .REDUC_PLUS (vect__5.5_19);
>   a_8 = _20;
> 

If anything there is a missing, a negative after the
reduc_plus (or before) when it translates the bools comparisons into vector
comparisons.

  parent reply	other threads:[~2023-04-14  2:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 16:05 [Bug target/109502] New: " zsojka at seznam dot cz
2023-04-14  1:56 ` [Bug target/109502] " pinskia at gcc dot gnu.org
2023-04-14  2:03 ` [Bug tree-optimization/109502] " pinskia at gcc dot gnu.org
2023-04-14  2:04 ` pinskia at gcc dot gnu.org [this message]
2023-04-14  7:28 ` rguenth at gcc dot gnu.org
2023-04-14  7:53 ` rguenth at gcc dot gnu.org
2023-04-14  9:46 ` cvs-commit at gcc dot gnu.org
2023-04-14  9:46 ` [Bug tree-optimization/109502] [12 " rguenth at gcc dot gnu.org
2023-04-17  9:15 ` cvs-commit at gcc dot gnu.org
2023-04-17  9:21 ` [Bug tree-optimization/109502] [11 " rguenth at gcc dot gnu.org
2023-05-02 12:03 ` cvs-commit at gcc dot gnu.org
2023-05-02 12:06 ` rguenth at gcc dot gnu.org

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=bug-109502-4-qXTN3RBiY3@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).