+2002-04-02 David S. Miller <davem@redhat.com>
+
+ * config/sparc/sparc.md (ldd peephole2s): Fix final arg to
+ mems_ok_for_ldd_peep when the order of the loads being examined
+ is reversed.
+ * config/sparc/sparc.c (mems_ok_for_ldd_peep): Expand upon
+ existing comment to increase comprehension of this situation.
+
2002-04-02 Zack Weinberg <zack@codesourcery.com>
* config/sh/sh.md: Don't use union real_extract.
ld [%o0 + 4], %o1
to
ldd [%o0], %o0
+ nor:
+ ld [%g3 + 4], %g3
+ ld [%g3], %g2
+ to
+ ldd [%g3], %g2
+
+ But, note that the transformation from:
+ ld [%g2 + 4], %g3
+ ld [%g2], %g2
+ to
+ ldd [%g2], %g2
+ is perfectly fine. Thus, the peephole2 patterns always pass us
+ the destination register of the first load, never the second one.
+
For stores we don't have a similar problem, so dependent_reg_rtx is
NULL_RTX. */
(set (match_operand:SI 2 "register_operand" "")
(match_operand:SI 3 "memory_operand" ""))]
"registers_ok_for_ldd_peep (operands[2], operands[0])
- && mems_ok_for_ldd_peep (operands[3], operands[1], operands[2])"
+ && mems_ok_for_ldd_peep (operands[3], operands[1], operands[0])"
[(set (match_dup 2)
(match_dup 3))]
"operands[3] = change_address (operands[3], DImode, NULL);
(set (match_operand:SF 2 "register_operand" "")
(match_operand:SF 3 "memory_operand" ""))]
"registers_ok_for_ldd_peep (operands[2], operands[0])
- && mems_ok_for_ldd_peep (operands[3], operands[1], operands[2])"
+ && mems_ok_for_ldd_peep (operands[3], operands[1], operands[0])"
[(set (match_dup 2)
(match_dup 3))]
"operands[3] = change_address (operands[3], DFmode, NULL);