https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125646

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we get a reduction path doing

  # a_lsm.3_1 = PHI <_2(5), _14(6)>
  _5 = a_lsm.3_1 * -2;
  _2 = _5 * 2;

first we're trying a reduction chain, but that fails due to costing.  Then,
with single-lane SLP, we're pattern recognizing a_lsm.3_1 * -2 to

patt_18 = (unsigned int) a_lsm.3_1;
patt_4 = -patt_18;
patt_12 = patt_4 << 1;
operand a_lsm.3_1 * -2;

but with odd (signed) vector types.  Similar for the multiplication by two.
This is because with a reduction chain we get V4SI but without we have to
use V2SI.

I think we should never get a signed NEGATE_EXPR as part of a reduction,
so fixing the signedness of the pattern stmts is what's needed.

Reply via email to