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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > part of the problem here is the use of OPTAB_DIRECT when it should use
> > OPTAB_WIDEN instead.
> 
> That fixes short but for char looks like there is still some cost issue
> since there is a removal of the addv there.
> 
> Note the related testcase should have been:
> ```
> int f128(unsigned __int128 a)
> {
>   return __builtin_popcountg(a) == 1;
> }
> ```
> 
> Which is not fixed with the OPTAB_WIDEN change.

That is because we don't emit decent code for:
```
int gtu128(unsigned __int128 a, unsigned __int128 b)
{
  return a > b;
}
```

Let me file a bug for that.

Reply via email to