public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Tobias Burnus <tobias@codesourcery.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch] + [nvptx RFH/RFC]: OpenMP: Fix SIMT for complex/float reduction with && and ||
Date: Thu, 6 May 2021 15:22:20 +0200	[thread overview]
Message-ID: <20210506132220.GA1179226@tucnak> (raw)
In-Reply-To: <5d23ae62-4812-e80b-2f4b-95be9603bcee@suse.de>

On Thu, May 06, 2021 at 03:12:59PM +0200, Tom de Vries wrote:
> +	      if (truth_value_p (OMP_CLAUSE_REDUCTION_CODE (c))
> +		  && TREE_CODE (TREE_TYPE (new_var)) != BOOLEAN_TYPE)

I would use && !INTEGRAL_TYPE_P (TREE_TYPE (new_var))
Especially in C code using || or && with int or other non-_Bool types
will pretty frequent.
Of course, if that doesn't work for SIMT either, it needs further work
and punting on those could be a temporary workaround.  But it would be
a preexisting issue, not something introduced with accepting &&/|| for
floating/complex types - we've accepted &&/|| for integral types forever.

	Jakub


  reply	other threads:[~2021-05-06 13:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 10:17 Tobias Burnus
2021-05-06 10:30 ` Jakub Jelinek
2021-05-06 13:12   ` Tom de Vries
2021-05-06 13:22     ` Jakub Jelinek [this message]
2021-05-06 14:05     ` Tom de Vries
2021-05-06 14:21     ` Tobias Burnus
2021-05-06 14:32       ` Jakub Jelinek
2021-05-07 10:05         ` Tobias Burnus
2021-05-07 10:06           ` Jakub Jelinek
2021-05-07 10:08           ` Tom de Vries
2021-05-18 11:07           ` Thomas Schwinge

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=20210506132220.GA1179226@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tdevries@suse.de \
    --cc=tobias@codesourcery.com \
    /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).