Re: Question on GIMPLE shifts

2023-11-02 Thread Richard Biener via Gcc
On Wed, Nov 1, 2023 at 5:01 PM Andrew Pinski via Gcc wrote: > > On Wed, Nov 1, 2023 at 3:56 AM Daniil Frolov wrote: > > > > Hi! > > > > When investigating bit shifts I got an incomprehensible moment with > > the following example: > > > > int f(int x, int k) > > { > > int tmp = x >> k; > >

Re: Question on GIMPLE shifts

2023-11-01 Thread Andrew Pinski via Gcc
On Wed, Nov 1, 2023 at 3:56 AM Daniil Frolov wrote: > > Hi! > > When investigating bit shifts I got an incomprehensible moment with > the following example: > > int f(int x, int k) > { > int tmp = x >> k; > return (tmp & 1) << 10; > } > > If we would like to take a look into GIMPLE then