From 9f1112095c7ac4989e19db95602027681c698050 Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Tue, 3 May 2011 15:09:19 +0000 Subject: [PATCH] re PR target/39768 (internal compiler error: RTL check: expected code 'const_int', have 'reg' in gen_rotlsi3, at config/bfin/bfin.md:1616) 2011-05-03 Stuart Henderson 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 | 6 ++++++ gcc/config/bfin/bfin.md | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b2404b904d6..28f35e76adf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-05-03 Stuart Henderson + + 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 From Jie Zhang: diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md index 4d22df5d20f..6f2c7a6ee04 100644 --- a/gcc/config/bfin/bfin.md +++ b/gcc/config/bfin/bfin.md @@ -1688,20 +1688,20 @@ (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; -- 2.30.2