https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109502
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |tree-optimization Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-04-14 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- SLP transforms: g.0_1 = g; _2 = g.0_1 == 0; a_7 = (unsigned int) _2; _3 = a_7 % 6; _4 = _3 == 0; _5 = (unsigned int) _4; a_8 = _5 + a_7; To: g.0_1 = g; _2 = g.0_1 == 0; a_7 = (unsigned int) _2; _3 = a_7 % 6; _15 = {_3, g.0_1}; mask__4.4_16 = { 0, 0 } == _15; vect__5.5_19 = VIEW_CONVERT_EXPR<vector(2) unsigned int>(mask__4.4_16); _17 = BIT_FIELD_REF <mask__4.4_16, 32, 0>; _18 = (bool) _17; _4 = _3 == 0; _5 = (unsigned int) _18; _20 = .REDUC_PLUS (vect__5.5_19); a_8 = _20; Which is wrong. The if anything there is a missing - missing after the reduc_plus (or before) when it translates the bools comparisons into vector comparisons.