[Bug target/92175] x86 backend claims V4SI multiplication support, preventing more optimal pattern

2020-01-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92175

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-01-29
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug target/92175] x86 backend claims V4SI multiplication support, preventing more optimal pattern

2019-10-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92175

--- Comment #2 from Jakub Jelinek  ---
Something should compare the costs.  Either vect_recog_mult_pattern should move
the mul_optab != unknown_optab etc. check after vect_synth_mult_by_constant,
compare the costs of the pattern recognized sequence vs. of the multiplication
and if vector multiplication is beneficial, undo whatever
vect_synth_mult_by_constant added.
Or the cost function for vector multiplication should special case
multiplication by constant and also expansion of vector multiplication should
do the same plus compare costs.
I bet the first option would be easier.
As for v << 1 vs. v + v, there is already synth_lshift_by_additions, so we
could force using it for LSHIFT_EXPR by 1 even for !synth_shift_p (would that
be unconditionally a win?).
OT, the indentation introduced in r238340 has quite a lot of issues, many
functions calls have misindented arguments.

[Bug target/92175] x86 backend claims V4SI multiplication support, preventing more optimal pattern

2019-10-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92175

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 CC||jakub at gcc dot gnu.org

--- Comment #1 from Richard Biener  ---
Jakub, you did the mult pattern recog - any opinions?  (also why do I see
a << 1 instead of a + a?)