mmix.md ("*cmpcc_folded"): In condition, gate with REG_P tests before REGNO access.
authorHans-Peter Nilsson <hp@bitrange.com>
Tue, 25 Sep 2007 02:01:24 +0000 (02:01 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Tue, 25 Sep 2007 02:01:24 +0000 (02:01 +0000)
* config/mmix/mmix.md ("*cmpcc_folded"): In condition, gate
with REG_P tests before REGNO access.

From-SVN: r128743

gcc/ChangeLog
gcc/config/mmix/mmix.md

index d21eb1eaab174097084767b82ca85e21980aa485..b46d9373a41a937308bc441d9135a35c020bd9f5 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-25  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * config/mmix/mmix.md ("*cmpcc_folded"): In condition, gate
+       with REG_P tests before REGNO access.
+
 2007-09-24  DJ Delorie  <dj@redhat.com>
 
        PR target/31482
index 44ab5667ac39d1e63a7787422ac0603247367e24..aa878af0f825e983f9c711f430fcdef2f586d6da 100644 (file)
@@ -481,7 +481,8 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
         (const_int 0)))]
   ;; FIXME: Can we test equivalence any other way?
   ;; FIXME: Can we fold any other way?
-  "REGNO (operands[1]) == REGNO (operands[0])"
+  "REG_P (operands[0]) && REG_P (operands[1])
+   && REGNO (operands[1]) == REGNO (operands[0])"
   "%% folded: cmp %0,%1,0")
 
 (define_insn "*cmpcc"