cris.md ("*andsi_movu", [...]): For size-changed operand where memory is allowed...
authorHans-Peter Nilsson <hp@axis.com>
Mon, 5 Feb 2007 21:21:50 +0000 (21:21 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Mon, 5 Feb 2007 21:21:50 +0000 (21:21 +0000)
* config/cris/cris.md ("*andsi_movu", "*andsi_clear", "*andhi_movu")
("*andhi_clear", andu (casesi+45)): For size-changed operand where
memory is allowed, require !side_effects_p, not just !MEM_VOLATILE_P.

From-SVN: r121612

gcc/ChangeLog
gcc/config/cris/cris.md

index a7124292faac3ce27632c8afaba5b5d68b31c6b0..9f62c7eb53ce9ebfd5e7801e10b34a4c2a79f1fc 100644 (file)
@@ -1,3 +1,9 @@
+2007-02-05  Hans-Peter Nilsson  <hp@axis.com>
+
+       * config/cris/cris.md ("*andsi_movu", "*andsi_clear", "*andhi_movu")
+       ("*andhi_clear", andu (casesi+45)): For size-changed operand where
+       memory is allowed, require !side_effects_p, not just !MEM_VOLATILE_P.
+
 2007-02-05  Roger Sayle  <roger@eyesopen.com>
 
        * fold-const.c (fold_unary) <REAL_PART>: Test for availability of
index 30248776887f46a4a16fc7453c5ddfcd5c5c3dc3..00af2e6155d98ad51b5b24ebb2cb0f5e38340d42 100644 (file)
@@ -1,5 +1,5 @@
 ;; GCC machine description for CRIS cpu cores.
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
 ;; Free Software Foundation, Inc.
 ;; Contributed by Axis Communications.
 
        (and:SI (match_operand:SI 1 "nonimmediate_operand" "%r,Q,To")
                (match_operand:SI 2 "const_int_operand" "n,n,n")))]
   "(INTVAL (operands[2]) == 255 || INTVAL (operands[2]) == 65535)
-   && (GET_CODE (operands[1]) != MEM || ! MEM_VOLATILE_P (operands[1]))"
+   && !side_effects_p (operands[1])"
   "movu.%z2 %1,%0"
   [(set_attr "slottable" "yes,yes,no")])
 
        (and:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,0,0,0,0")
                (match_operand:SI 2 "const_int_operand" "P,n,P,n,P,n")))]
   "(INTVAL (operands[2]) == -65536 || INTVAL (operands[2]) == -256)
-   && (GET_CODE (operands[0]) != MEM || ! MEM_VOLATILE_P (operands[0]))"
+   && !side_effects_p (operands[0])"
   "@
    cLear.b %0
    cLear.w %0
   [(set (match_operand:HI 0 "register_operand" "=r,r,r")
        (and:HI (match_operand:HI 1 "nonimmediate_operand" "r,Q,To")
                (const_int 255)))]
-  "GET_CODE (operands[1]) != MEM || ! MEM_VOLATILE_P (operands[1])"
+  "!side_effects_p (operands[1])"
   "mOvu.b %1,%0"
   [(set_attr "slottable" "yes,yes,no")])
 
   [(set (match_operand:HI 0 "nonimmediate_operand" "=r,Q,To")
        (and:HI (match_operand:HI 1 "nonimmediate_operand" "0,0,0")
                (const_int -256)))]
-  "GET_CODE (operands[0]) != MEM || ! MEM_VOLATILE_P (operands[0])"
+  "!side_effects_p (operands[0])"
   "cLear.b %0"
   [(set_attr "slottable" "yes,yes,no")
    (set_attr "cc" "none")])
    ;; don't do this for a mem-volatile access.
   "REGNO (operands[2]) == REGNO (operands[0])
    && INTVAL (operands[3]) <= 65535 && INTVAL (operands[3]) >= 0
-   && ! CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'I')
-   && (GET_CODE (operands[1]) != MEM || ! MEM_VOLATILE_P (operands[1]))"
+   && !CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'I')
+   && !side_effects_p (operands[1])"
   ;; FIXME: CC0 valid except for M (i.e. CC_NOT_NEGATIVE).
   [(set (match_dup 0) (match_dup 4))
    (set (match_dup 5) (match_dup 6))]