public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Andrew Pinski (QUIC)" <quic_apinski@quicinc.com>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: COND_EXPR (?:) and its first operand in gimple
Date: Wed, 10 Apr 2024 07:37:07 +0200	[thread overview]
Message-ID: <CAFiYyc1mmwpmDZNwVACpJ49ibHJsoYU=DLcSy0ZNfNhmXRjCDA@mail.gmail.com> (raw)
In-Reply-To: <DM6PR02MB40583582F80FCFE781709F4EB8072@DM6PR02MB4058.namprd02.prod.outlook.com>

On Tue, Apr 9, 2024 at 11:02 PM Andrew Pinski (QUIC)
<quic_apinski@quicinc.com> wrote:
>
> While looking into PR 114666, I noticed that we don't verify COND_EXPR's first operand. In most of my recent patches to match.pd, I was assuming that it would be a boolean (or a type which would contain
> [0,1]) but this PR shows we could end up with an 1-bit signed integer in there.

Yeah, I guess we never had verification for is_gimple_val operands in
there.  I think we want
a boolean there, anything that's valid as a scalar result of a
tcc_comparison.  Note that
there we do allow a signed 1-bit result ...

> We could fix most of the match patterns which assume we would get a boolean like type or we could fix the patterns which would create this.
> Both are not hard to do but it would be useful for GCC 15 at least to add a verifier if we decide the type should not be a signed 1bit integer.
>
> Thoughts?
>
> Thanks,
> Andrew
>
> PS sorry about the duplicated emails, I had a typo in the email address.

      reply	other threads:[~2024-04-10  5:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 21:02 Andrew Pinski (QUIC)
2024-04-10  5:37 ` Richard Biener [this message]

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='CAFiYyc1mmwpmDZNwVACpJ49ibHJsoYU=DLcSy0ZNfNhmXRjCDA@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=quic_apinski@quicinc.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).