This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/40921] missed optimization: x + (-y * z * z) => x - y * z * z


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40921

--- Comment #5 from kugan at gcc dot gnu.org ---
Author: kugan
Date: Sun May 22 08:13:13 2016
New Revision: 236564

URL: https://gcc.gnu.org/viewcvs?rev=236564&root=gcc&view=rev
Log:
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.



Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr40921.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-reassoc.c

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]