diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-12-12 14:31:18 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-12-12 14:31:18 +0000 |
commit | 77fec971c15551081d6eccb41275dd1c4e10e73c (patch) | |
tree | a1a513e215c058b87308a64dad0cf5d62797e70d /gcc/loop.c | |
parent | 90d46c28f20ebc52d770c179d39bb429a0a6f55a (diff) | |
download | gcc-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |