]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR middle-end/52578 (Fails to fold another size difference)
authorRichard Guenther <rguenther@suse.de>
Wed, 14 Mar 2012 10:51:34 +0000 (10:51 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 14 Mar 2012 10:51:34 +0000 (10:51 +0000)
commit1caf8dd66c44ca5e25574be4cde0fd1ed7581584
tree66df900ef28ae410bf4318c9859d7595727e851a
parenta1d3d84bdf44215b8445af6693501747917519bd
re PR middle-end/52578 (Fails to fold another size difference)

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.

From-SVN: r185378
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr52578.c [new file with mode: 0644]
gcc/tree-ssa-forwprop.c