This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/52578] Fails to fold another size difference
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 14 Mar 2012 10:51:38 +0000
- Subject: [Bug middle-end/52578] Fails to fold another size difference
- Auto-submitted: auto-generated
- References: <bug-52578-4@http.gcc.gnu.org/bugzilla/>
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