re PR target/39768 (internal compiler error: RTL check: expected code 'const_int...
authorStuart Henderson <shenders@gcc.gnu.org>
Tue, 3 May 2011 15:09:19 +0000 (15:09 +0000)
committerStuart Henderson <shenders@gcc.gnu.org>
Tue, 3 May 2011 15:09:19 +0000 (15:09 +0000)
2011-05-03  Stuart Henderson  <shenders@gcc.gnu.org>

        From Bernd Schmidt
        * config/bfin/bfin.md (rotrsi, rotlsi): Don't take INTVAL of anything
        that's not CONST_INT.  Seemingly redundant check is due to PR39768.

From-SVN: r173310

gcc/ChangeLog
gcc/config/bfin/bfin.md

index b2404b904d634ece528fede72606a016e7f17c0a..28f35e76adf9d4f506806c9387fe378e78a23630 100644 (file)
@@ -1,3 +1,9 @@
+2011-05-03  Stuart Henderson  <shenders@gcc.gnu.org>
+
+       From Bernd Schmidt
+       * config/bfin/bfin.md (rotrsi, rotlsi): Don't take INTVAL of anything
+       that's not CONST_INT.  Seemingly redundant check is due to PR39768.
+
 2011-05-03  Stuart Henderson  <shenders@gcc.gnu.org>
 
        From Jie Zhang:
index 4d22df5d20f5d6324260873c6c5bff4501516bb5..6f2c7a6ee048b7795e8f636bff722cc4622241e8 100644 (file)
 (define_expand "rotlsi3"
   [(set (match_operand:SI 0 "register_operand" "")
        (rotate:SI (match_operand:SI 1 "register_operand" "")
-                  (match_operand:SI 2 "immediate_operand" "")))]
+                  (match_operand:SI 2 "const_int_operand" "")))]
   ""
 {
-  if (INTVAL (operands[2]) != 16)
+  if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 16)
     FAIL;
 })
 
 (define_expand "rotrsi3"
   [(set (match_operand:SI 0 "register_operand" "")
        (rotatert:SI (match_operand:SI 1 "register_operand" "")
-                    (match_operand:SI 2 "immediate_operand" "")))]
+                    (match_operand:SI 2 "const_int_operand" "")))]
   ""
 {
-  if (INTVAL (operands[2]) != 16)
+  if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 16)
     FAIL;
   emit_insn (gen_rotl16 (operands[0], operands[1]));
   DONE;