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/111770] predicated loads inactive lane values not modelled
Date: Thu, 22 Feb 2024 08:10:29 +0000	[thread overview]
Message-ID: <bug-111770-4-tIK4qYwgiB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111770-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
As said X + 0. -> X is an invalid transform with FP unless there are no signed
zeros (maybe also problematic with sign-dependent rounding).

I think we agree to define .MASK_LOAD to zero masked elements.  When we need
something else we need to add an explicit ELSE value.  That needs documenting
of course and also possibly testsuite coverage - I _think_ you should be able
to do a GIMPLE frontend testcase for this.

Note this behavior would extend to .MASK_GATHER_LOAD as well as
the load-lanes and -len variants.

Unfortunately we do not have _any_ internals manual documentation for
internal functions - but you can backtrack to the optabs documentation
where this would need documenting.

Now, if-conversion could indeed elide the .COND_ADD for integers.  It's
problematic there only because of signed overflow undefinedness, so
you shouldn't see it for 'unsigned' already, and adding zero is safe.
if-conversion would need to have an idea of all the ranges involved here
so it might be a bit sophisticated to get it right.

  parent reply	other threads:[~2024-02-22  8:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 12:38 [Bug tree-optimization/111770] New: " tnfchris at gcc dot gnu.org
2023-10-11 12:58 ` [Bug tree-optimization/111770] " rguenth at gcc dot gnu.org
2024-02-21 17:14 ` acoplan at gcc dot gnu.org
2024-02-22  8:10 ` rguenth at gcc dot gnu.org [this message]
2024-02-22 11:10 ` acoplan at gcc dot gnu.org
2024-02-22 13:16 ` rguenth at gcc dot gnu.org
2024-02-22 17:11 ` jsm28 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-111770-4-tIK4qYwgiB@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).