On Sun, Oct 11, 2015 at 4:56 AM, Kugan
wrote:
>
>
> On 09/10/15 21:29, Richard Biener wrote:
>> + unsigned int prec = tree_to_uhwi (vr1.min);
>>
>> this should use unsigned HOST_WIDE_INT
>>
>> + wide_int sign_bit = wi::shwi (1ULL << (prec - 1),
>> + TYPE
wi::set_bit_in_zero to
> produce the sign-bit wide_int (also above).
Thanks Ricahrd. Does the attached patch looks better ?
Thanks,
Kugan
>From cf5f75f5c96d30cdd968e71035a398cb0d5fcff7 Mon Sep 17 00:00:00 2001
From: Kugan Vivekanandarajah
Date: Mon, 17 Aug 2015 13:45:52 +1000
Subject: [PATCH 3/7] Opti
On Thu, Oct 8, 2015 at 1:40 AM, Kugan wrote:
>
>
> On 07/10/15 19:20, Richard Biener wrote:
>> On Wed, Oct 7, 2015 at 1:12 AM, kugan
>> wrote:
>>>
>>> Hi Richard,
>>>
>>> Thanks for the review.
>>>
>>> On 15/09/15 23:08, Richard Biener wrote:
On Mon, Sep 7, 2015 at 4:58 AM, Kugan
e_max = wi::max_value (prec, SIGNED);
>
Thanks for the comments. Is the attached patch looks better. It is based
on the above. I am still assuming the position of sign-bit in SEXT_EXPR
will be less than 64bit (for calculating sign_bit in wide_int format). I
think this will always be the case but p
On Wed, Oct 7, 2015 at 1:12 AM, kugan wrote:
>
> Hi Richard,
>
> Thanks for the review.
>
> On 15/09/15 23:08, Richard Biener wrote:
>>
>> On Mon, Sep 7, 2015 at 4:58 AM, Kugan
>> wrote:
>>>
>>> This patch tree-vrp handling and optimization for ZEXT_EXPR.
>>
>>
>> + else if (code == SEXT_EXPR)
>
n Sep 17 00:00:00 2001
From: Kugan Vivekanandarajah
Date: Mon, 17 Aug 2015 13:45:52 +1000
Subject: [PATCH 3/7] Optimize ZEXT_EXPR with tree-vrp
---
gcc/tree-vrp.c | 73 ++
1 file changed, 73 insertions(+)
diff --git a/gcc/tree-vrp.c b/gcc
On Mon, Sep 7, 2015 at 4:58 AM, Kugan wrote:
> This patch tree-vrp handling and optimization for ZEXT_EXPR.
+ else if (code == SEXT_EXPR)
+{
+ gcc_assert (range_int_cst_p (&vr1));
+ unsigned int prec = tree_to_uhwi (vr1.min);
+ type = vr0.type;
+ wide_int tmin, tmax;
+
This patch tree-vrp handling and optimization for ZEXT_EXPR.
gcc/ChangeLog:
2015-09-07 Kugan Vivekanandarajah
* tree-vrp.c (extract_range_from_binary_expr_1): Handle SEXT_EXPR.
(simplify_bit_ops_using_ranges): Likewise.
(simplify_stmt_using_ranges): Likewise.
>From 7