On 06/13/13 12:06, Marc Glisse wrote:
Hello,
an incredibly suprising patch: I am adapting yet more fold-const
transformations to vectors... (it varies, the last patch was in forwprop)
I was quite conservative with respect to complex: I didn't want to
create a BIT_NOT_EXPR of a complex.
As an aside, while writing this patch, I noticed the following:
double f(double x){ return -2*x; }
double g(double x){ return 2*-x; }
generates mulsd for f and xorpd+addsd for g, I should probably file a PR
about that, the running time may be similar but it is better to
canonicalize.
2013-06-14 Marc Glisse <marc.gli...@inria.fr>
gcc/
* fold-const.c (negate_expr_p): Handle VECTOR_CST.
(fold_negate_expr): Likewise.
(fold_real_zero_addition_p): Handle vectors.
(fold_binary_loc) <PLUS_EXPR, MINUS_EXPR>: Likewise.
gcc/testsuite/
* gcc.dg/fold-minus-1.c: New testcase.
This is good. Please install.
Thanks,
Jeff