https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100778
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |11.2 Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. It's SLP vectorization placing the vectorized division outside of the if: <bb 2> [local count: 1073741824]: + vectp.9_32 = &(*input_8(D))[0]; + vect__1.10_33 = MEM <vector(2) real(kind=8)> [(real(kind=8) *)vectp.9_32]; + _35 = BIT_FIELD_REF <vect__1.10_33, 64, 64>; + _34 = BIT_FIELD_REF <vect__1.10_33, 64, 0>; _1 = (*input_8(D))[0]; - coordinates.x = _1; _2 = (*input_8(D))[1]; - coordinates.y = _2; - _11 = _1 * _1; - _12 = _2 * _2; + MEM <vector(2) real(kind=8)> [(real(kind=8) *)&coordinates] = vect__1.10_33; + _11 = _34 * _34; + _12 = _35 * _35; _3 = _11 + _12; norm_13 = __builtin_sqrt (_3); + _37 = {norm_13, norm_13}; + vect__4.13_38 = vect__1.10_33 / _37; if (norm_13 > 1.0e+0) goto <bb 3>; [41.48%] else @@ -34,13 +64,11 @@ <bb 3> [local count: 445388112]: _4 = _1 / norm_13; - coordinates.x = _4; _5 = _2 / norm_13; - coordinates.y = _5; + MEM <vector(2) real(kind=8)> [(real(kind=8) *)&coordinates] = vect__4.13_38;