On Mon, Sep 25, 2017 at 7:14 PM, Prathamesh Kulkarni
<prathamesh.kulka...@linaro.org> wrote:
> On 18 September 2017 at 15:40, Prathamesh Kulkarni
> <prathamesh.kulka...@linaro.org> wrote:
>> On 15 September 2017 at 22:09, Marc Glisse <marc.gli...@inria.fr> wrote:
>>> On Fri, 15 Sep 2017, Wilco Dijkstra wrote:
>>>
>>>> Marc Glisse wrote:
>>>>
>>>>> The question is whether, having computed c=a/b, it is cheaper to test a<b
>>>>> or c!=0.
>>>>> I think it is usually the second one, but not for all types on all
>>>>> targets. Although since
>>>>> you mention VRP, it is easier to do further optimizations using the
>>>>> information a<b.
>>>>
>>>>
>>>> No, a<b is always better. Division does have high latency and low
>>>> throughput on
>>>> all modern cores, so rather than having to wait until the division
>>>> finishes, you can
>>>> execute whatever depends on the comparison many cycles earlier.
>>>>
>>>> Generally you want to avoid division as much as possible and when that
>>>> fails
>>>> reduce any dependencies on the result of divisions.
>>>
>>>
>>> This would indicate that we do not need to check for single-use, makes the
>>> patch simpler, thanks.
>>> (let's ignore -Os)
>> Hi,
>> Thanks for the suggestions, I have updated the patch.
>> Is this OK ?
>> Bootstrap+test in progress on x86_64-unknown-linux-gnu.
>> I will try address the right shift by 4 case in follow up patch.
>>
> ping https://gcc.gnu.org/ml/gcc-patches/2017-09/msg01145.html

Ok.

Thanks,
Richard.

> Thanks,
> Prathamesh
>> Thanks,
>> Prathamesh
>>>
>>> --
>>> Marc Glisse

Reply via email to