------- Comment #9 from rakdver at gcc dot gnu dot org 2006-02-12 21:12 -------
This should fix the problem (could you please verify it?). I am really
surprised this problem did not show on other architectures.
Index: loop-invariant.c
===================================================================
*** loop-invariant.c (revision 110850)
--- loop-invariant.c (working copy)
*************** hash_invariant_expr_1 (rtx insn, rtx x)
*** 292,297 ****
--- 292,299 ----
for (j = 0; j < XVECLEN (x, i); j++)
val ^= hash_invariant_expr_1 (insn, XVECEXP (x, i, j));
}
+ else if (fmt[i] == 'i' || fmt[i] == 'n')
+ val ^= XINT (x, i);
}
return val;
*************** invariant_expr_equal_p (rtx insn1, rtx e
*** 373,378 ****
--- 375,388 ----
return false;
}
}
+ else if (fmt[i] == 'i' || fmt[i] == 'n')
+ {
+ if (XINT (e1, i) != XINT (e2, i))
+ return false;
+ }
+ /* Unhandled type of subexpression, we fail conservatively. */
+ else
+ return false;
}
return true;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26235