diff options
author | Jeffrey A Law <law@cygnus.com> | 1998-08-20 18:45:48 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-08-20 12:45:48 -0600 |
commit | 8fc001f9a2a7e33d30abef625c9245995dcfe9f0 (patch) | |
tree | 8cae2b477317a966b90608c23007462fc9862e68 /gcc | |
parent | 5e3848f5e307afb2fe6b5cc6392e582eae64b364 (diff) | |
download | gcc-8fc001f9a2a7e33d30abef625c9245995dcfe9f0.zip gcc-8fc001f9a2a7e33d30abef625c9245995dcfe9f0.tar.gz gcc-8fc001f9a2a7e33d30abef625c9245995dcfe9f0.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/jump.c | 17 |
2 files changed, 18 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 38c0254..5b659e3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 @@ -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)) |