------- Comment #1 from rakdver at gcc dot gnu dot org 2006-02-13 01:32 -------
This should fix the problem:
Index: loop-invariant.c
===================================================================
*** loop-invariant.c (revision 110898)
--- loop-invariant.c (working copy)
*************** invariant_for_use (struct df_ref *use)
*** 232,237 ****
--- 232,240 ----
struct df_ref *def;
basic_block bb = BLOCK_FOR_INSN (use->insn), def_bb;
+ if (use->flags & DF_REF_READ_WRITE)
+ return NULL;
+
defs = DF_REF_CHAIN (use);
if (!defs || defs->next)
return NULL;
*************** find_exits (struct loop *loop, basic_blo
*** 582,589 ****
static bool
may_assign_reg_p (rtx x)
{
! return (can_copy_p (GET_MODE (x))
&& GET_MODE (x) != BLKmode
&& (!REG_P (x)
|| !HARD_REGISTER_P (x)
|| REGNO_REG_CLASS (REGNO (x)) != NO_REGS));
--- 585,593 ----
static bool
may_assign_reg_p (rtx x)
{
! return (GET_MODE (x) != VOIDmode
&& GET_MODE (x) != BLKmode
+ && can_copy_p (GET_MODE (x))
&& (!REG_P (x)
|| !HARD_REGISTER_P (x)
|| REGNO_REG_CLASS (REGNO (x)) != NO_REGS));
*************** check_dependencies (rtx insn, bitmap dep
*** 683,688 ****
--- 687,695 ----
for (use = DF_INSN_GET (df, insn)->uses; use; use = use->next_ref)
{
+ if (use->flags & DF_REF_READ_WRITE)
+ return false;
+
defs = DF_REF_CHAIN (use);
if (!defs)
continue;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26247