On Mon, 13 Jun 2016, Richard Biener wrote:
On Sun, Jun 12, 2016 at 11:19 AM, Marc Glisse <marc.gli...@inria.fr> wrote:
Hello,
canonicalizing x+x to x*2 made us regress some vectorization tests on sparc.
As suggested by Richard, this lets the vectorizer handle x*2 as x+x if that
helps. Let me copy a few remarks I had in the PR:
« We could probably also handle x*3 as x+x+x, but where to stop?
I don't understand why the optab test for LSHIFT_EXPR was using
optab_vector, as far as I understand we are creating vec<<3, so optab_scalar
makes more sense.
I think it should test both (ok if either one is available) and the
I was hoping there would already be some magic in place so that asking for
the scalar one would answer yes if there is only a vector version :-(
current optab_vector makes more sense since it is more generic.
On the other hand, some platforms can only handle the optab_scalar
version I believe.
Ok with either not changing optab_vector to optab_scalar or testing both with ||
Actually, I just noticed vect_supportable_shift which does "both", I'll
see if I can call that function instead of redoing things manually.
Thanks,
--
Marc Glisse