On Sun, May 21, 2017 at 11:21 PM, Marc Glisse <marc.gli...@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.gli...@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