On Mon, May 22, 2023 at 5:21 PM Andrew Pinski wrote:
>
> On Mon, May 22, 2023 at 4:56 AM Richard Biener via Gcc-patches
> wrote:
> >
> > On Fri, May 19, 2023 at 4:15 AM Andrew Pinski via Gcc-patches
> > wrote:
> > >
> > > While working something else, I noticed we could improve
> > > the followi
On Mon, May 22, 2023 at 4:56 AM Richard Biener via Gcc-patches
wrote:
>
> On Fri, May 19, 2023 at 4:15 AM Andrew Pinski via Gcc-patches
> wrote:
> >
> > While working something else, I noticed we could improve
> > the following function code generation:
> > ```
> > unsigned f(unsigned t)
> > {
>
On Fri, May 19, 2023 at 4:15 AM Andrew Pinski via Gcc-patches
wrote:
>
> While working something else, I noticed we could improve
> the following function code generation:
> ```
> unsigned f(unsigned t)
> {
> if (t & ~(1<<30)) __builtin_unreachable();
> return t != 0;
> }
> ```
> Right know we
On Fri, May 19, 2023 at 9:40 AM Jeff Law via Gcc-patches
wrote:
>
>
>
> On 5/18/23 20:14, Andrew Pinski via Gcc-patches wrote:
> > While working something else, I noticed we could improve
> > the following function code generation:
> > ```
> > unsigned f(unsigned t)
> > {
> >if (t & ~(1<<30))
On 5/18/23 20:14, Andrew Pinski via Gcc-patches wrote:
While working something else, I noticed we could improve
the following function code generation:
```
unsigned f(unsigned t)
{
if (t & ~(1<<30)) __builtin_unreachable();
return t != 0;
}
```
Right know we just emit a comparison agains
While working something else, I noticed we could improve
the following function code generation:
```
unsigned f(unsigned t)
{
if (t & ~(1<<30)) __builtin_unreachable();
return t != 0;
}
```
Right know we just emit a comparison against 0 instead
of just a shift right by 30.
There is code in do_s