jump.c (rtx_renumbered_equal_p): Do not consider PLUS commutative.

* jump.c (rtx_renumbered_equal_p): Do not consider PLUS commutative.
Because it isn't inside a MEM on the PA.  Fixes 930628-1.c on the mainline
branch.

From-SVN: r21886
This commit is contained in:
Jeffrey A Law 1998-08-20 18:45:48 +00:00 committed by Jeff Law
parent 5e3848f5e3
commit 8fc001f9a2
2 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,7 @@
Thu Aug 20 19:43:44 1998 Jeffrey A Law (law@cygnus.com)
* jump.c (rtx_renumbered_equal_p): Do not consider PLUS commutative.
Thu Aug 20 17:35:20 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sparc.md (movtf_insn_sp32): All memory operands

View File

@ -4234,7 +4234,15 @@ delete_labelref_insn (insn, label, delete_this)
/* Like rtx_equal_p except that it considers two REGs as equal
if they renumber to the same value and considers two commutative
operations to be the same if the order of the operands has been
reversed. */
reversed.
??? Addition is not commutative on the PA due to the weird implicit
space register selection rules for memory addresses. Therefore, we
don't consider a + b == b + a.
We could/should make this test a little tighter. Possibly only
disabling it on the PA via some backend macro or only disabling this
case when the PLUS is inside a MEM. */
int
rtx_renumbered_equal_p (x, y)
@ -4342,8 +4350,11 @@ rtx_renumbered_equal_p (x, y)
return 0;
/* For commutative operations, the RTX match if the operand match in any
order. Also handle the simple binary and unary cases without a loop. */
if (code == EQ || code == NE || GET_RTX_CLASS (code) == 'c')
order. Also handle the simple binary and unary cases without a loop.
??? Don't consider PLUS a commutative operator; see comments above. */
if ((code == EQ || code == NE || GET_RTX_CLASS (code) == 'c')
&& code != PLUS)
return ((rtx_renumbered_equal_p (XEXP (x, 0), XEXP (y, 0))
&& rtx_renumbered_equal_p (XEXP (x, 1), XEXP (y, 1)))
|| (rtx_renumbered_equal_p (XEXP (x, 0), XEXP (y, 1))