When regrename is enabled, it makes new copies of its replacement
registers, which means that pointer equality tests can't be used
afterwards to check whether two regs are equal.
sched_insn_conditions_mutex_p has one such test, and it causes
pessimized code in some situations on C6X.
The following patch fixes it. Regression tested with a 4.5 c6x-elf
compiler. I tried to bootstrap ia64, but that has PR48496. Ok?
Bernd
* sched-deps.c (conditions_mutex_p): Use rtx_equal_p to compare
registers.
Index: gcc/sched-deps.c
===================================================================
--- gcc/sched-deps.c (revision 325327)
+++ gcc/sched-deps.c (working copy)
@@ -563,7 +563,7 @@ conditions_mutex_p (const_rtx cond1, con
(rev1==rev2
? reversed_comparison_code (cond2, NULL)
: GET_CODE (cond2))
- && XEXP (cond1, 0) == XEXP (cond2, 0)
+ && rtx_equal_p (XEXP (cond1, 0), XEXP (cond2, 0))
&& XEXP (cond1, 1) == XEXP (cond2, 1))
return 1;
return 0;