public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix OMP CAS expansion with separate condition
Date: Thu, 19 May 2022 16:20:17 +0200	[thread overview]
Message-ID: <YoZSIab0O3xxlV+O@tucnak> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2205191409550.4278@jbgna.fhfr.qr>

On Thu, May 19, 2022 at 02:13:33PM +0000, Richard Biener wrote:
> > Though, depending on what exactly you allow or disallow, maybe even
> > the im != 0 might not be acceptable.
> > Oh, and if COND_EXPRs can only use some limited set of comparisons, we might
> > need to adjust e.g. arith_overflow_check_p and various other spots in
> > tree-ssa-math-opts.cc and other passes.
> 
> With the changes I have in the queue the !cond_stmt path should be
> effectively dead code (though I don't remove such immediately).
> 
> Not sure what you think the issue with arith_overflow_check_p would be?
> Note this is only about COND_EXPRs in gimple assignments.

Just that there will be more dead code in the compiler.
At least tree-ssa-math-opts.cc in various spots (but I think phiopt too and
other spots I've touched too) are looking for all 3 kinds of comparisons,
GIMPLE_CONDs, comparisons in COND_EXPR first operand and assignments
with tcc_comparison rhs codes and deal with all 3.  If we restrict what
can appear in COND_EXPR first operand in gimple assignments, perhaps we'll
need to only deal with the first and last case and not the COND_EXPR ones.

	Jakub


  reply	other threads:[~2022-05-19 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 10:23 Richard Biener
2022-05-19 13:25 ` Jakub Jelinek
2022-05-19 14:13   ` Richard Biener
2022-05-19 14:20     ` Jakub Jelinek [this message]
2022-05-19 14:27       ` Richard Biener

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=YoZSIab0O3xxlV+O@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).