aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-12-12 14:31:18 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-12-12 14:31:18 +0000
commit77fec971c15551081d6eccb41275dd1c4e10e73c (patch)
treea1a513e215c058b87308a64dad0cf5d62797e70d /gcc/loop.c
parent90d46c28f20ebc52d770c179d39bb429a0a6f55a (diff)
downloadgcc-77fec971c15551081d6eccb41275dd1c4e10e73c.zip
gcc-77fec971c15551081d6eccb41275dd1c4e10e73c.tar.gz
gcc-77fec971c15551081d6eccb41275dd1c4e10e73c.tar.bz2
re PR rtl-optimization/13037 ([gcse-lm] g77 generates incorrect code)
PR optimization/13037 * loop.c (update_giv_derive): Ignore redundant sets of a biv when calculating how to derive a giv from a biv. * g77.f-torture/execute/13037.f: New test case. From-SVN: r74572
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index e1e85e8..8deb398 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -6095,6 +6095,10 @@ update_giv_derive (const struct loop *loop, rtx p)
if (GET_CODE (p) == CODE_LABEL || GET_CODE (p) == JUMP_INSN
|| biv->insn == p)
{
+ /* Skip if location is the same as a previous one. */
+ if (biv->same)
+ continue;
+
for (giv = bl->giv; giv; giv = giv->next_iv)
{
/* If cant_derive is already true, there is no point in