re PR tree-optimization/40921 (missed optimization: x + (-y * z * z) => x - y * z...
authorKugan Vivekanandarajah <kuganv@linaro.org>
Sun, 22 May 2016 08:13:13 +0000 (08:13 +0000)
committerKugan Vivekanandarajah <kugan@gcc.gnu.org>
Sun, 22 May 2016 08:13:13 +0000 (08:13 +0000)
commit8a85cee26eabf5cfec4e3d93b2516b84b1cca34f
treea3b4034ab957a646e9f4478c69e4c8f6e434e2b2
parenta078110a89141ce42f2655933cd2c4f13fd022ba
re PR tree-optimization/40921 (missed optimization: x + (-y * z * z) => x - y * z * z)

gcc/testsuite/ChangeLog:

2016-05-22  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR middle-end/40921
* gcc.dg/tree-ssa/pr40921.c: New test.

gcc/ChangeLog:

2016-05-22  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR middle-end/40921
        * tree-ssa-reassoc.c (try_special_add_to_ops): New.
        (linearize_expr_tree): Call try_special_add_to_ops.
        (reassociate_bb): Convert MULT_EXPR by (-1) to NEGATE_EXPR.

From-SVN: r236564
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr40921.c [new file with mode: 0644]
gcc/tree-ssa-reassoc.c