On 07/26/2015 07:05 PM, Kugan wrote:
I thought that when !gimple_assign_cast_p (stmt), RHS will always
boolean. I have now added this check in the attached patch.
Thanks.
I also noticed that in maybe_optimize_range_tests, GIMPLE_COND can
have non compatible types when new_op is updated
(bool
On 24/07/15 05:05, Jeff Law wrote:
> On 07/15/2015 11:52 PM, Kugan wrote:
>>
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 932c83a..3058eb5 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
>>>
return false;
bb = g
On 07/15/2015 11:52 PM, Kugan wrote:
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 932c83a..3058eb5 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
return false;
bb = gimple_bb (stmt);
if (!single_succ_p (bb))
@@ -2729,9 +2743,8 @@ fina
>>
>> diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
>> index 932c83a..3058eb5 100644
>> --- a/gcc/tree-ssa-reassoc.c
>> +++ b/gcc/tree-ssa-reassoc.c
>
>> return false;
>> bb = gimple_bb (stmt);
>> if (!single_succ_p (bb))
>> @@ -2729,9 +2743,8 @@ final_range_test_p (g
On 07/15/2015 01:09 AM, Kugan wrote:
2015-07-15 Kugan Vivekanandarajah
PR middle-end/66726
* tree-ssa-reassoc.c (optimize_range_tests): Handle sinking the cast
after PHI.
(final_range_test_p): Detect sinking the cast after PHI.
(maybe_optimize_range_tests): Hand
Here is a patch to fix to teach tree-ssa-reassoc the sinking the cast.
Bootstrapped and regression tested on x86-64-none-linux-gnu with no new
regressions. Also regression tested on qemu arm.
I also verified the issue Andreas Schwab raised is fixed on arm
cortex-a5 where the same issue was presen
On 11/07/15 06:40, Jeff Law wrote:
> On 07/09/2015 05:08 PM, Kugan wrote:
>
>> Done. Bootstrapped and regression tested on x86-64-none-linux-gnu with
>> no new regressions. Is this OK for trunk?
> Thanks for the additional testcases.
>
>
>
>> + else
>> +{
>> + /* If arg1 is an INTEG
On 07/09/2015 05:08 PM, Kugan wrote:
Done. Bootstrapped and regression tested on x86-64-none-linux-gnu with
no new regressions. Is this OK for trunk?
Thanks for the additional testcases.
+ else
+{
+ /* If arg1 is an INTEGER_CST, fold it to new type. */
+ if (INTEGRAL_TYPE_P
Something like this perhaps:
>
> /* factor_out_conditional_conversion may create a new PHI in BB2 and
>eliminate an existing PHI in BB2. Recompute values that may be
>affected by that change. */
>
>
> Or something along those lines.
Done.
>
>
>> /*
tional_replacement (bb, bb1, e1, e2, phi, arg0, arg1))
cfgchanged = true;
@@ -410,6 +422,133 @@ replace_phi_edge_with_variable (basic_block cond_block,
bb->index);
}
+/* PR66726: Factor conversion out of COND_EXPR. If the arguments of the PHI
+ stmt are CONVERT_STMT, fact
ional_replacement, abs_replacement and minmax_replacement.
>
>
>> }
>> }
>>
>> @@ -410,6 +413,108 @@ replace_phi_edge_with_variable (basic_block
>> cond_block,
>> bb->index);
>> }
>>
>> +/* PR66726: Factor conversion
lacement, abs_replacement and minmax_replacement.
}
}
@@ -410,6 +413,108 @@ replace_phi_edge_with_variable (basic_block cond_block,
bb->index);
}
+/* PR66726: Factor conversion out of COND_EXPR. If the arguments of the PHI
+ stmt are CONVERT_STMT, factor out t
conditional_conversion.
>>
>>> diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
>>> index d2a5cee..e8af086 100644
>>> --- a/gcc/tree-ssa-phiopt.c
>>> +++ b/gcc/tree-ssa-phiopt.c
>>
>>> @@ -410,6 +413,108 @@ replace_phi_edge_with_variable (basic_block
>
>
>> diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
>> index d2a5cee..e8af086 100644
>> --- a/gcc/tree-ssa-phiopt.c
>> +++ b/gcc/tree-ssa-phiopt.c
>
>> @@ -410,6 +413,108 @@ replace_phi_edge_with_variable (basic_block cond_block,
>>bb->ind
pt_worker): Call factor_out_conditional_conversion.
> diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
> index d2a5cee..e8af086 100644
> --- a/gcc/tree-ssa-phiopt.c
> +++ b/gcc/tree-ssa-phiopt.c
> @@ -410,6 +413,108 @@ replace_phi_edge_with_variable (basic_block cond_block,
nditional_conversion (e1, e2, phi, arg0, arg1))
+ cfgchanged = true;
}
}
@@ -410,6 +413,108 @@ replace_phi_edge_with_variable (basic_block cond_block,
bb->index);
}
+/* PR66726: Factor conversion out of COND_EXPR. If the argument of the PHI
+ stmt are CON
16 matches
Mail list logo