[Bug middle-end/52578] Fails to fold another size difference

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 14 10:52:00 GMT 2012


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

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-14 10:51:38 UTC ---
Author: rguenth
Date: Wed Mar 14 10:51:34 2012
New Revision: 185378

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185378
Log:
2012-03-14  Richard Guenther  <rguenther@suse.de>

    PR middle-end/52578
    * fold-const.c (fold_unary_loc): Fold (T1)(T2)x to (T1)x if
    the outermost conversion is a sign-change only.
    (fold_binary_loc): Disregard widening and sign-changing
    conversions when we determine if two variables are equal
    for reassociation.
    * tree-ssa-forwprop.c (combine_conversions): Fold (T1)(T2)x to
    (T1)x if the outermost conversion is a sign-change only.

    * gcc.dg/pr52578.c: New testcase.

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



More information about the Gcc-bugs mailing list