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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
As for the wrong-code, we used to emit:
...
  vect_cst_.23_105 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
  vect_cst_.24_106 = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
  vect_cst_.25_107 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
...
  vect_patt_37.22_108 = VEC_COND_EXPR <vect__5.20_102 != vect_cst_.23_105,
vect_cst_.24_106, vect_cst_.25_107>;
  vect_patt_37.22_109 = VEC_COND_EXPR <vect__5.21_104 != vect_cst_.23_105,
vect_cst_.24_106, vect_cst_.25_107>;
...
  vect__35.26_110 = VIEW_CONVERT_EXPR<vector(16) short unsigned
int>(vect_patt_37.22_108);
  vect__35.26_111 = VIEW_CONVERT_EXPR<vector(16) short unsigned
int>(vect_patt_37.22_109);
but now we emit incorrect:
  vect_cst__103 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
...
  mask__7.22_104 = vect__5.20_100 != vect_cst__103;
  mask__7.22_105 = vect__5.21_102 != vect_cst__103;
  vect__35.23_106 = VIEW_CONVERT_EXPR<vector(16) short unsigned
int>(mask__7.22_104);
  vect__35.23_107 = VIEW_CONVERT_EXPR<vector(16) short unsigned
int>(mask__7.22_105);
The reason why the latter is wrong is that for non-zero short values it yields
0xffff instead of 1.

Reply via email to