Hi Jakub,

On 10/08/16 07:46, Jakub Jelinek wrote:
On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote:
There was no new regression while testing. I also moved the testcase from
gcc.dg/torture/pr72835.c to gcc.dg/tree-ssa/pr72835.c. Is this OK for trunk?

This looks strange.  The tree-ssa-reassoc.c code has been trying to never
reuse SSA_NAMEs if they would hold a different value.
So there should be no resetting of flow sensitive info needed.

We are not reusing but, if you see the example change in reassoc:

-  _5 = -_4;
-  _6 = _2 * _5;
+  _5 = _4;
+  _6 = _5 * _2;

_5 and _6 will now have different value ranges because they compute different values. Therefore I think we should reset (?).

Thanks,
Kugan



gcc/testsuite/ChangeLog:

2016-08-10  Kugan Vivekanandarajah  <kug...@linaro.org>

        PR tree-optimization/72835
        * gcc.dg/tree-ssa/pr72835.c: New test.

gcc/ChangeLog:

2016-08-10  Kugan Vivekanandarajah  <kug...@linaro.org>

        PR tree-optimization/72835
        * tree-ssa-reassoc.c (rewrite_expr_tree): Reset value_range of LHS when
        operands are changed.
        (rewrite_expr_tree_parallel): Likewise.

        Jakub

Reply via email to