From: Chung-Lin Tang Date: Thu, 24 Mar 2011 02:47:55 +0000 (+0000) Subject: re PR target/46934 (gcc ICE: error: unrecognizable insn: in extract_insn, at recog... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4908b0bf1ccac0b7c738ca107be86ca77bf10c4a;p=gcc.git re PR target/46934 (gcc ICE: error: unrecognizable insn: in extract_insn, at recog.c:2109) 2011-03-23 Chung-Lin Tang PR target/46934 * config/arm/arm.md (casesi): Use the gen_int_mode() function to subtract lower bound instead of GEN_INT(). testsuite/ * gcc.target/arm/pr46934.c: New. From-SVN: r171379 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a7bed9093ae..95de501a87a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-23 Chung-Lin Tang + + PR target/46934 + * config/arm/arm.md (casesi): Use the gen_int_mode() function + to subtract lower bound instead of GEN_INT(). + 2011-03-23 Jonathan Wakely PR other/48179 diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index b0f31f51934..7a3e4f968cd 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -8354,7 +8354,8 @@ rtx reg = gen_reg_rtx (SImode); emit_insn (gen_addsi3 (reg, operands[0], - GEN_INT (-INTVAL (operands[1])))); + gen_int_mode (-INTVAL (operands[1]), + SImode))); operands[0] = reg; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cff3e4977bf..3b9eaac3b02 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-03-23 Chung-Lin Tang + + * gcc.target/arm/pr46934.c: New. + 2011-03-23 Ian Lance Taylor * go.test/go-test.exp (errchk): Ignore lines containing ////. diff --git a/gcc/testsuite/gcc.target/arm/pr46934.c b/gcc/testsuite/gcc.target/arm/pr46934.c new file mode 100644 index 00000000000..22b8aa83846 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr46934.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-march=armv5te -mthumb -Os" } */ +/* { dg-require-effective-target arm_thumb1_ok } */ + +int caller (unsigned int reg_type) +{ + switch (reg_type) + { + case 0x80000000: + return (int)foo(); + + case 0x80000003: + return (int) bar(); + + case 0x80000001: + return (int) baz(); + + case 0x80000004: + return (int) fooz(); + } +}