public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/104595] unvectorized loop due to bool condition loaded from memory
Date: Mon, 21 Feb 2022 13:45:02 +0000	[thread overview]
Message-ID: <bug-104595-4-Q8hp47O2XS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104595-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
bool patterns are to distinguish flag uses from data uses since a vectorized
flag true will be -1 while the unvectorized flag is 1 but of course any
data uses have to be retained.  What we are missing here is the reverse,
convert unvectorized flag 1 to vectorized flag -1 for data.  Since there
may be data and non-data uses we have to insert fixups (patterns) at use
sites.  For the bool vs. char case that's the

  iftmp.0_3 = _1 ? iftmp.0_7 : iftmp.0_6;

case.  Since we generally assume a bool LHS will be vectorized to a mask
we don't do our job here since obviously bool loads do not.  Conversions
do not either and the code to handle those is a bit awkward as well,
handling bool source and bool destination differently for some reason
(but not both at the same time?).

This all needs a bit of dis-entangling and probably re-ordering of
vect_recog_bool_pattern and vect_recog_mask_conversion_pattern.

  parent reply	other threads:[~2022-02-21 13:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18 10:05 [Bug tree-optimization/104595] New: " linkw at gcc dot gnu.org
2022-02-18 10:27 ` [Bug tree-optimization/104595] " rguenth at gcc dot gnu.org
2022-02-18 16:26 ` segher at gcc dot gnu.org
2022-02-20  3:52 ` pinskia at gcc dot gnu.org
2022-02-20  3:58 ` pinskia at gcc dot gnu.org
2022-02-21  7:54 ` rguenth at gcc dot gnu.org
2022-02-21 10:01 ` rguenth at gcc dot gnu.org
2022-02-21 13:26 ` rguenth at gcc dot gnu.org
2022-02-21 13:45 ` rguenth at gcc dot gnu.org [this message]
2022-02-23  7:18 ` linkw at gcc dot gnu.org
2022-02-23  7:41 ` rguenther at suse dot de
2022-02-23  8:55 ` linkw at gcc dot gnu.org
2022-05-05  8:37 ` cvs-commit at gcc dot gnu.org
2022-05-05  8:39 ` 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-104595-4-Q8hp47O2XS@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).