This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PTR-PLUS] Fix up forwprop testcase
- From: Andrew_Pinski at PlayStation dot Sony dot Com
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 May 2007 17:46:50 -0700
- Subject: [PTR-PLUS] Fix up forwprop testcase
Hi,
This fixes up the new forwprop testcase which I added to the trunk. The
problem here was that we were checking for PLUS_EXPR and then also
checking for a cast which is no longer there.
Committed after a bootstrap/test on i686-linux-gnu with 2 regressions (the
2 regressions are due to forwprop doing a better job and data-ref not
understanding the IR any more, see PR 31995 and 31996 for more details and
a testcase for the mainline).
Thanks,
Andrew Pinski
ChangeLog:
* tree-ssa-forwprop.c
(forward_propagate_addr_into_variable_array_index):
Don't expect there to be a cast for the index as that does not
exist anymore.
(forward_propagate_addr_expr_1): Check for
POINTER_PLUS_EXPR instead of PLUS_EXPR.
Don't check for the first operand of the
POINTER_PLUS_EXPR was the index as it
cannot be.
* gcc.dg/tree-ssa/forwprop-1.c: New testcase.