On Fri, Jan 4, 2019 at 1:44 PM Richard Sandiford
wrote:
>
> Jakub Jelinek writes:
> > On Fri, Jan 04, 2019 at 12:13:13PM +, Richard Sandiford wrote:
> >> > Can we avoid the gratuitous use of template here? We were told that C++
> >> > would
> >> > be used only when it makes things more
Jakub Jelinek writes:
> On Fri, Jan 04, 2019 at 12:13:13PM +, Richard Sandiford wrote:
>> > Can we avoid the gratuitous use of template here? We were told that C++
>> > would
>> > be used only when it makes things more straightforward and it's the
>> > contrary
>> > in this case, to wit
> I did it that way so that it would be easy to add things like
> zero_or_minus_onep without cut-&-pasting the whole structure.
Yes, I inferred that, but people can still templatize afterward if need be.
Following this line of reasoning, why to limit yourself to this arbitrary
number of 2
On Fri, Jan 04, 2019 at 12:13:13PM +, Richard Sandiford wrote:
> > Can we avoid the gratuitous use of template here? We were told that C++
> > would
> > be used only when it makes things more straightforward and it's the
> > contrary
> > in this case, to wit the need for the ugly RECURSE
Eric Botcazou writes:
>> Index: gcc/tree.c
>> ===
>> --- gcc/tree.c 2019-01-04 11:39:24.810266962 +
>> +++ gcc/tree.c 2019-01-04 11:40:33.141683783 +
>> @@ -11229,6 +11229,60 @@ initializer_zerop (const_tree init,
> Index: gcc/tree.c
> ===
> --- gcc/tree.c2019-01-04 11:39:24.810266962 +
> +++ gcc/tree.c2019-01-04 11:40:33.141683783 +
> @@ -11229,6 +11229,60 @@ initializer_zerop (const_tree init, bool
> }
> }
>
>
The PR has:
vect__6.24_42 = vect__5.23_41 * { 0.0, 1.0e+0, 0.0, 0.0 };
which for -fno-signed-zeros -fno-signaling-nans can be simplified to:
vect__6.24_42 = vect__5.23_41 & { 0, -1, 0, 0 };
I deliberately didn't handle COMPLEX_CST or CONSTRUCTOR in
initializer_each_zero_or_onep since