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 middle-end/23294] fold does not fold a*C+a to a*(C+1) or a*C-a to a*(C-1)



------- Comment #7 from rguenth at gcc dot gnu dot org  2005-11-19 11:29 -------
Subject: Bug 23294

Author: rguenth
Date: Sat Nov 19 11:29:10 2005
New Revision: 107218

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107218
Log:
2005-11-19  Richard Guenther  <rguenther@suse.de>

        PR middle-end/23294
        * fold-const.c (fold_plusminus_mult_expr): New function.
        (fold_binary): Use to canonicalize PLUS_EXPR and MINUS_EXPR
        cases, remove now unnecessary code.

        * gcc.dg/tree-ssa/pr23294.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr23294.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23294


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