public inbox for
 help / color / mirror / Atom feed
From: Richard Biener <>
To: Marc Glisse <>
Cc: GCC Patches <>
Subject: Re: Relax VIEW_CONVERT_EXPR - CONVERT_EXPR combination
Date: Wed, 24 May 2017 10:17:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sun, May 21, 2017 at 11:21 PM, Marc Glisse <> wrote:
> Hello,
> SRA uses char when scalarizing bool, and we end up with
>   _6 = u_1(D) == 0.0;
>   _7 = (unsigned char) _6;
>   _3 = VIEW_CONVERT_EXPR<_Bool>(_7);
> which we currently do not simplify. I am not completely sure what happens
> with types whose precision does not cover their size, I hope this is safe.

Hmm, if zero-extension is safe so should sign-extension, no?  Because
if size != precision then both can actually change bits outside of the

I realize zero-extension is "safer" in some sense as the extended value
is the same for all precisions.

Thus OK.


> Bootstrap+testsuite on powerpc64le-unknown-linux-gnu.
> 2017-05-22  Marc Glisse  <>
> gcc/
>         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
> gcc/testsuite/
>         * gcc.dg/tree-ssa/vce-1.c: New file.
> --
> Marc Glisse

      reply	other threads:[~2017-05-24  8:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21 21:56 Marc Glisse
2017-05-24 10:17 ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \

* 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).