]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/26515 (peephole2 causes unrecognized insn, zero_extending non-general...
authorHans-Peter Nilsson <hp@axis.com>
Mon, 12 Oct 2009 17:19:56 +0000 (17:19 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Mon, 12 Oct 2009 17:19:56 +0000 (17:19 +0000)
PR target/26515
* config/cris/cris.md (andu): Check that operand 1 is one of the
general registers.  Fix typo in head comment.

From-SVN: r152673

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

index d5b36a7ca5f79452c3322e9a195c4b12f703588a..8a5b067772273d6eb27c4fca8672e907f9ca0989 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-12  Hans-Peter Nilsson  <hp@axis.com>
+
+       PR target/26515
+       * config/cris/cris.md (andu): Check that operand 1 is one of the
+       general registers.  Fix typo in head comment.
+
 2009-10-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
        * config/s390/tpf.h (TARGET_DEFAULT): Remove MASK_HARD_FLOAT and
index 298f3c40ff03fe44346c7e475b62636f06870346..85783f84db3d6b310d274693a65cfeda2298b70a 100644 (file)
 ;; It should be:
 ;;   movu.b some_byte,reg_32
 ;;   and.b const,reg_32
-;; but is turns into:
+;; but it turns into:
 ;;   move.b some_byte,reg_32
 ;;   and.d const,reg_32
 ;; Fix it here.
   "REGNO (operands[2]) == REGNO (operands[0])
    && INTVAL (operands[3]) <= 65535 && INTVAL (operands[3]) >= 0
    && !CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'I')
-   && !side_effects_p (operands[1])"
+   && !side_effects_p (operands[1])
+   && (!REG_P (operands[1])
+       || REGNO (operands[1]) <= CRIS_LAST_GENERAL_REGISTER)"
   ;; 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))]