On 06/12/13 14:17, Marc Glisse wrote:
On Wed, 12 Jun 2013, Marc Glisse wrote:

I suppose it's explicitely not allowing complex integer constants?

Hmm... Thanks, I keep forgetting complex :-(

And complex is even more of a pain than vector to handle.

Testing for CONSTANT_CLASS_P seems sufficient here. Some
transformations also seem valid for complex, and the others are
already restricted by the fact that they involve operators like AND or
XOR, or because we exit early for FLOAT_TYPE_P and FIXED_POINT_TYPE_P.
I'll test that (no new macro for now then).

Here is a new version. I added a build_all_ones_cst helper which
currently only handles integer-like (complex, vector) types.

Bootstrap+testsuite on x86_64-unknown-linux-gnu as usual.

2013-06-13  Marc Glisse  <marc.gli...@inria.fr>

     * tree-ssa-forwprop.c (simplify_bitwise_binary, associate_plusminus):
     Generalize to complex and vector.
     * tree.c (build_all_ones_cst): New function.
     * tree.h (build_all_ones_cst): Declare it.
This is OK.

Extra credit if you create some testcases.


Thanks,
Jeff

Reply via email to