From: Vladimir Makarov Date: Thu, 25 Jul 2019 18:36:52 +0000 (+0000) Subject: re PR rtl-optimization/91223 (ICE: in curr_insn_transform, at lra-constraints.c:4459) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f41de41eaf6d30d2b492c1f13d01dd8e90bba81;p=gcc.git re PR rtl-optimization/91223 (ICE: in curr_insn_transform, at lra-constraints.c:4459) 2019-07-25 Vladimir Makarov PR rtl-optimization/91223 * lra-constraints.c (process_alt_operands): Fail for unsuccessful matching with INOUT operand. 2019-07-25 Vladimir Makarov PR rtl-optimization/91223 * gcc.target/i386/pr91223.c: New test. From-SVN: r273810 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 336e9eef2c3..42beda4e643 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-07-25 Vladimir Makarov + + PR rtl-optimization/91223 + * lra-constraints.c (process_alt_operands): Fail for unsuccessful + matching with INOUT operand. + 2019-07-25 Eric Botcazou * stmt.c (expand_case): Try to narrow the index type if it's larger diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 55d8d133d39..bd9f85d33cc 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -2171,6 +2171,14 @@ process_alt_operands (int only_alternative) } else { + /* If the operands do not match and one + operand is INOUT, we can not match them. + Try other possibilities, e.g. other + alternatives or commutative operand + exchange. */ + if (curr_static_id->operand[nop].type == OP_INOUT + || curr_static_id->operand[m].type == OP_INOUT) + break; /* Operands don't match. If the operands are different user defined explicit hard registers, then we cannot make them match diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6fc49316c8a..0ff528b87b3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-25 Vladimir Makarov + + PR rtl-optimization/91223 + * gcc.target/i386/pr91223.c: New test. + 2019-07-25 Iain Sandoe PR gcov-profile/91087 diff --git a/gcc/testsuite/gcc.target/i386/pr91223.c b/gcc/testsuite/gcc.target/i386/pr91223.c new file mode 100644 index 00000000000..1b9e85b2308 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr91223.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-Og -fno-tree-fre" } */ +int a; +void fn2(short, short); + +void fn1(void) { + short b[8]; + b[0] |= a & 3; + b[1] = a; + fn2(b[0], b[1]); +}