[Bug target/112740] [14 Regression] wrong code with vector compare on riscv64 at -O0
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 30 21:50:32 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112740
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Veclower -O0 produces
c.0_6 = c_5(D);
_2 = (__int128 unsigned) c.0_6;
_1 = {_2};
_10 = VIEW_CONVERT_EXPR<__int128 unsigned>(v_7(D));
_11 = _10 >= _2; // 1 true
_12 = (int128_t) _11; // 1
_13 = -_12; // -1
_14 = (<signed-boolean:128>) _13; // -1 aka true
_3 = {_14}; // {-1} aka true
_4 = ~_3; // 0 aka false
_15 = VIEW_CONVERT_EXPR<<signed-boolean:128>>(_4); // 0 aka false
_16 = _15 != 0; // 0 != 0, 0 false
_17 = (__int128 unsigned) _16; // 0
_18 = -_17; // 0
_8 = {_18};
Which looks correct.
NOTE the ~ there, I am suspecting it is producing the wrong result ...
More information about the Gcc-bugs
mailing list