[Bug tree-optimization/98774] gcc -O3 does not vectorize some operations

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 14 18:28:40 GMT 2021


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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For the trunk (without -ffast-math), the perms are done too early:
  vect__5.32_53 = VEC_PERM_EXPR <vect__2.31_52, vect__2.31_52, { 1, 1 }>;
  vect__5.33_54 = VEC_PERM_EXPR <vect__2.31_52, vect__2.31_52, { 1, 0 }>;
  vect__5.34_55 = VEC_PERM_EXPR <vect__2.31_52, vect__2.31_52, { 0, 0 }>;
  _3 = *mag_9(D);
  _58 = {_3, _3};
  vect__4.35_59 = vect__5.32_53 * _58;
  vect__4.35_60 = vect__5.33_54 * _58;
  vect__4.35_61 = vect__5.34_55 * _58;

With -ffast-math:
  a$x_1 = *dpos_10(D).x;
  a$y_11 = *dpos_10(D).y;
  _49 = {a$x_1, a$y_11};
  _35 = _49 * _58;
And the PERM is done too early the same way ..


More information about the Gcc-bugs mailing list