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

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Zdenek Sojka from comment #12)
> Interesting, all the gcc's starting from gcc-6 up to gcc-13 at -O0 to -O3
> (including 32bit and 64bit targets) seem to "PASS" on this testcase.
> 
> ... wait, no, (unsigned)0 <= 0 is TRUE ...

Oh you are correct I read it incorrectly.
Anyways it is definitely a bug in veclower; looking into it.
  _1 = { -1 };
  _9 = VIEW_CONVERT_EXPR<<signed-boolean:64>>(_1);
  _10 = _9 != 0;
  _11 = _9 == 0;
  _12 = (unsigned long) _11;
  _13 = (unsigned long) _9;
  _14 = _13 + 18446744073709551615;
  _2 = {_14};

That produces:
_14 = _13 - 1; or rather _9 - 1 .
I suspect there is a missing check somewhere in match.pd really ...

Reply via email to