On Wed, 5 Jul 2017, Robin Dapp wrote:
While the initialization value doesn't matter (wi::add will overwrite it)
better initialize both to false ;) Ah, you mean because we want to
transform only if get_range_info returned VR_RANGE. Indeed somewhat
unintuitive (but still the best variant for now
[3/3] Tests
--
gcc/testsuite/ChangeLog:
2017-07-05 Robin Dapp
* gcc.dg/wrapped-binop-simplify-signed-1.c: New test.
* gcc.dg/wrapped-binop-simplify-signed-2.c: New test.
* gcc.dg/wrapped-binop-simplify-unsigned-1.c: New test.
* gcc.dg/wrapped-binop-simplify-un
> While the initialization value doesn't matter (wi::add will overwrite it)
> better initialize both to false ;) Ah, you mean because we want to
> transform only if get_range_info returned VR_RANGE. Indeed somewhat
> unintuitive (but still the best variant for now).
> so I'm still missing a comm
On Wed, Jun 28, 2017 at 4:34 PM, Robin Dapp wrote
>> ideally you'd use a wide-int here and defer the tree allocation to the result
>
> Did that in the attached version.
>
>> So I guess we never run into the outer_op == minus case as the above is
>> clearly wrong for that?
>
> Right, damn, not only
> ideally you'd use a wide-int here and defer the tree allocation to the result
Did that in the attached version.
> So I guess we never run into the outer_op == minus case as the above is
> clearly wrong for that?
Right, damn, not only was the treatment for this missing but it was
bogus in the o
On Wed, Jun 21, 2017 at 1:44 PM, Robin Dapp wrote:
>> use INTEGRAL_TYPE_P.
>
> Done.
>
>> but you do not actually _use_ vr_outer. Do you think that if
>> vr_outer is a VR_RANGE then the outer operation may not
>> possibly have wrapped? That's a false conclusion.
>
> These were remains of a previ
Ping.
> use INTEGRAL_TYPE_P.
Done.
> but you do not actually _use_ vr_outer. Do you think that if
> vr_outer is a VR_RANGE then the outer operation may not
> possibly have wrapped? That's a false conclusion.
These were remains of a previous version. vr_outer is indeed not needed
anymore; removed.
On Tue, Jun 20, 2017 at 3:08 PM, Robin Dapp wrote:
>>> Currently, extract_... () does that all that for me, is it really too
>>> expensive to call? I guess, using get_range_info first and calling
>>> extract when get_range_info returns a VR_RANGE is not really a favorable
>>> thing to do either? :
>> Currently, extract_... () does that all that for me, is it really too
>> expensive to call? I guess, using get_range_info first and calling
>> extract when get_range_info returns a VR_RANGE is not really a favorable
>> thing to do either? :)
> Not only the cost, we should avoid introducing more
On Fri, May 19, 2017 at 12:13 PM, Bin.Cheng wrote:
> On Fri, May 19, 2017 at 11:09 AM, Robin Dapp wrote:
>>> I can guess what is happening here. It's a 40 bits unsigned long long
>>> field, (s.b-8) will be like:
>>> _1 = s.b
>>> _2 = _1 + 0xf8
>>> Also get_range_info returns value range
On Fri, May 19, 2017 at 11:09 AM, Robin Dapp wrote:
>> I can guess what is happening here. It's a 40 bits unsigned long long
>> field, (s.b-8) will be like:
>> _1 = s.b
>> _2 = _1 + 0xf8
>> Also get_range_info returns value range [0, 0xFF] for _1.
>> You'd need to check if _1(with
> I can guess what is happening here. It's a 40 bits unsigned long long
> field, (s.b-8) will be like:
> _1 = s.b
> _2 = _1 + 0xf8
> Also get_range_info returns value range [0, 0xFF] for _1.
> You'd need to check if _1(with range [0, 0xFF]) + 0xf8
> overflows agains
On Thu, May 18, 2017 at 5:08 PM, Robin Dapp wrote:
>> Any reason to expose tree-vrp.c internal interface here? The function
>> looks quite expensive. Overflow check can be done by get_range_info
>> and simple wi::cmp calls. Existing code like in
>> tree-ssa-loop-niters.c already does that. Als
> Any reason to expose tree-vrp.c internal interface here? The function
> looks quite expensive. Overflow check can be done by get_range_info
> and simple wi::cmp calls. Existing code like in
> tree-ssa-loop-niters.c already does that. Also could you avoid using
> comma expressions in condition
On Thu, May 18, 2017 at 3:47 PM, Robin Dapp wrote:
> match.pd part of the patch.
>
> gcc/ChangeLog:
>
> 2017-05-18 Robin Dapp
>
> * match.pd: Simplify wrapped binary operations.
> * tree-vrp.c (extract_range_from_binary_expr_1): Add overflow
> parameter.
> (extra
match.pd part of the patch.
gcc/ChangeLog:
2017-05-18 Robin Dapp
* match.pd: Simplify wrapped binary operations.
* tree-vrp.c (extract_range_from_binary_expr_1): Add overflow
parameter.
(extract_range_from_binary_expr): Likewise.
* tree-vrp.h: Export.
d
17 matches
Mail list logo