public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Marc Glisse <marc.glisse@inria.fr>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Relax VIEW_CONVERT_EXPR - CONVERT_EXPR combination
Date: Wed, 24 May 2017 10:17:00 -0000	[thread overview]
Message-ID: <CAFiYyc18=vwRExC=YKE3=rS4pPDBAO3K8TPNd6VjD8poiD3XfQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1705212313230.2140@stedding.saclay.inria.fr>

On Sun, May 21, 2017 at 11:21 PM, Marc Glisse <marc.glisse@inria.fr> 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
precision?

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

Thus OK.

thanks,
Richard.

> Bootstrap+testsuite on powerpc64le-unknown-linux-gnu.
>
> 2017-05-22  Marc Glisse  <marc.glisse@inria.fr>
>
> 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:
  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='CAFiYyc18=vwRExC=YKE3=rS4pPDBAO3K8TPNd6VjD8poiD3XfQ@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marc.glisse@inria.fr \
    /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).