On 6/23/19 5:50 AM, Segher Boessenkool wrote:
> On Sat, Jun 22, 2019 at 03:30:15PM -0600, Jeff Law wrote:
>> On 6/22/19 12:44 PM, Segher Boessenkool wrote:
>>> On Sat, Jun 22, 2019 at 09:46:52AM -0600, Jeff Law wrote:
On 6/22/19 7:55 AM, Jason Duerstock wrote:
> More generally, we can rewr
On Sat, Jun 22, 2019 at 03:30:15PM -0600, Jeff Law wrote:
> On 6/22/19 12:44 PM, Segher Boessenkool wrote:
> > On Sat, Jun 22, 2019 at 09:46:52AM -0600, Jeff Law wrote:
> >> On 6/22/19 7:55 AM, Jason Duerstock wrote:
> >>> More generally, we can rewrite
> >>>
> >>> if ( x > ((1 << z) -1)) { ...}
>
On 6/22/19 12:44 PM, Segher Boessenkool wrote:
> On Sat, Jun 22, 2019 at 09:46:52AM -0600, Jeff Law wrote:
>> On 6/22/19 7:55 AM, Jason Duerstock wrote:
>>> More generally, we can rewrite
>>>
>>> if ( x > ((1 << z) -1)) { ...}
>>>
>>> as
>>>
>>> if ( x >> z ) { ... }
>>>
>>> This does not appear to
On Sat, Jun 22, 2019 at 09:46:52AM -0600, Jeff Law wrote:
> On 6/22/19 7:55 AM, Jason Duerstock wrote:
> > More generally, we can rewrite
> >
> > if ( x > ((1 << z) -1)) { ...}
> >
> > as
> >
> > if ( x >> z ) { ... }
> >
> > This does not appear to currently be a gcc optimization. What is
> >
On 6/22/19 7:55 AM, Jason Duerstock wrote:
> I was starting at the assembly from some of the Python source, and
> came across this (simplified) comparison:
>
> if (x > 2305843009213693951) {...}
>
> This is the same as:
>
> if (x > 0x1fff) {...}
>
> This is equivalent to:
>
> if (x
I was starting at the assembly from some of the Python source, and
came across this (simplified) comparison:
if (x > 2305843009213693951) {...}
This is the same as:
if (x > 0x1fff) {...}
This is equivalent to:
if (x >> 61) {...}
More generally, we can rewrite
if ( x > ((1 << z) -