diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/loop.c | 32 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr23233-1.c | 8 |
4 files changed, 22 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db61463..7f74051 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-08-06 Richard Sandiford <richard@codesourcery.com> + + PR rtl-optimization/23233 + * loop.c (combine_movables): Require the modes to be the same. + (move_movables): Remove handling of cases where the replacement + had a different mode to the original. + 2005-08-05 James A. Morrison <phython@gcc.gnu.org> PR tree-optimization/23128 @@ -1881,19 +1881,7 @@ combine_movables (struct loop_movables *movables, struct loop_regs *regs) && !m1->partial && (matched_regs[m1->regno] || - ( - /* Can combine regs with different modes loaded from the - same constant only if the modes are the same or - if both are integer modes with M wider or the same - width as M1. The check for integer is redundant, but - safe, since the only case of differing destination - modes with equal sources is when both sources are - VOIDmode, i.e., CONST_INT. */ - (GET_MODE (m->set_dest) == GET_MODE (m1->set_dest) - || (GET_MODE_CLASS (GET_MODE (m->set_dest)) == MODE_INT - && GET_MODE_CLASS (GET_MODE (m1->set_dest)) == MODE_INT - && (GET_MODE_BITSIZE (GET_MODE (m->set_dest)) - >= GET_MODE_BITSIZE (GET_MODE (m1->set_dest))))) + (GET_MODE (m->set_dest) == GET_MODE (m1->set_dest) /* See if the source of M1 says it matches M. */ && ((REG_P (m1->set_src) && matched_regs[REGNO (m1->set_src)]) @@ -2657,23 +2645,7 @@ move_movables (struct loop *loop, struct loop_movables *movables, { rtx temp; - /* Schedule the reg loaded by M1 - for replacement so that shares the reg of M. - If the modes differ (only possible in restricted - circumstances, make a SUBREG. - - Note this assumes that the target dependent files - treat REG and SUBREG equally, including within - GO_IF_LEGITIMATE_ADDRESS and in all the - predicates since we never verify that replacing the - original register with a SUBREG results in a - recognizable insn. */ - if (GET_MODE (m->set_dest) == GET_MODE (m1->set_dest)) - reg_map[m1->regno] = m->set_dest; - else - reg_map[m1->regno] - = gen_lowpart_common (GET_MODE (m1->set_dest), - m->set_dest); + reg_map[m1->regno] = m->set_dest; /* Get rid of the matching insn and prevent further processing of it. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5f0466a..0097a9d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-08-06 Richard Sandiford <richard@codesourcery.com> + + PR rtl-optimization/23233 + * gcc.c-torture/compile/pr23233-1.c: New test. + 2005-08-06 Jakub Jelinek <jakub@redhat.com> PR fortran/18833 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23233-1.c b/gcc/testsuite/gcc.c-torture/compile/pr23233-1.c new file mode 100644 index 0000000..356c063 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr23233-1.c @@ -0,0 +1,8 @@ +void foo (volatile long long *x) +{ + while (*x) + { + *x = 0; + *((volatile char *) 0) = 0; + } +} |