diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2005-11-02 23:06:26 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2005-11-02 23:06:26 +0000 |
commit | f55b94653531277c15fbda2a69b5fa61dccbd589 (patch) | |
tree | 676c9dc6ae244c11a41cdeb64a78997e9e74f62b | |
parent | 3532623302b910ef78cc8eb024d59224e3ada4e5 (diff) | |
download | gcc-f55b94653531277c15fbda2a69b5fa61dccbd589.zip gcc-f55b94653531277c15fbda2a69b5fa61dccbd589.tar.gz gcc-f55b94653531277c15fbda2a69b5fa61dccbd589.tar.bz2 |
re PR target/24600 (unrecognizable instruction)
ChangeLog:
PR target/24600
* loop.c (loop_givs_rescan): Use force_operand to expand
complex GIVs.
testsuite/ChangeLog:
PR target/24600
* gcc.dg/pr24600.c: New test.
From-SVN: r106404
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/loop.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr24600.c | 16 |
4 files changed, 37 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64a4297..e590fff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-11-02 Ulrich Weigand <uweigand@de.ibm.com> + + PR target/24600 + * loop.c (loop_givs_rescan): Use force_operand to expand + complex GIVs. + 2005-11-02 Andrew Pinski <pinskia@physics.uc.edu> PR 22429 @@ -5497,9 +5497,16 @@ loop_givs_rescan (struct loop *loop, struct iv_class *bl, rtx *reg_map) /* Not replaceable; emit an insn to set the original giv reg from the reduced giv. */ else if (REG_P (*v->location)) - loop_insn_emit_before (loop, 0, v->insn, - gen_move_insn (*v->location, - v->new_reg)); + { + rtx tem; + start_sequence (); + tem = force_operand (v->new_reg, *v->location); + if (tem != *v->location) + emit_move_insn (*v->location, tem); + tem = get_insns (); + end_sequence (); + loop_insn_emit_before (loop, 0, v->insn, tem); + } else if (GET_CODE (*v->location) == PLUS && REG_P (XEXP (*v->location, 0)) && CONSTANT_P (XEXP (*v->location, 1))) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index aa01d33..b0e73c3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-11-02 Ulrich Weigand <uweigand@de.ibm.com> + + PR target/24600 + * gcc.dg/pr24600.c: New test. + 2005-11-02 Mark Mitchell <mark@codesourcery.com> PR c++/19253 diff --git a/gcc/testsuite/gcc.dg/pr24600.c b/gcc/testsuite/gcc.dg/pr24600.c new file mode 100644 index 0000000..62bb7ca --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr24600.c @@ -0,0 +1,16 @@ +/* This used to ICE on s390 due to a old-loop bug. */ + +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +char *strcpy (char *dest, const char *src); + +void test (char *Line, int len) +{ + int z; + + for (z = 1; z <= len; z++) + if (Line[z - 1]) + strcpy (Line + z + 1, Line); +} + |