From: Uros Bizjak Date: Fri, 20 Mar 2015 06:07:30 +0000 (+0100) Subject: re PR rtl-optimization/60851 (ICE: in extract_constrain_insn_cached, at recog.c:2117... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=21e357f1f2ecbd7b6ab479d8f2836e251681194b;p=gcc.git re PR rtl-optimization/60851 (ICE: in extract_constrain_insn_cached, at recog.c:2117 with -flive-range-shrinkage -mdispatch-scheduler -march=bdver4) PR rtl-optimization/60851 * recog.c (constrain_operands): Accept a pseudo register before reload for LRA enabled targets. testsuite/ChangeLog: PR rtl-optimization/60851 * gcc.target/i386/pr60851.c: New test. From-SVN: r221529 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b9f9d0e24a..30d6a5e74a2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-03-20 Uros Bizjak + + PR rtl-optimization/60851 + * recog.c (constrain_operands): Accept a pseudo register before reload + for LRA enabled targets. + 2015-03-19 Michael Meissner PR target/65240 diff --git a/gcc/recog.c b/gcc/recog.c index 7b5ca8b9f1e..a9d3b1f779b 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2773,8 +2773,12 @@ constrain_operands (int strict, alternative_mask alternatives) /* Every memory operand can be reloaded to fit. */ && ((strict < 0 && MEM_P (op)) /* Before reload, accept what reload can turn - into mem. */ + into a mem. */ || (strict < 0 && CONSTANT_P (op)) + /* Before reload, accept a pseudo, + since LRA can turn it into a mem. */ + || (strict < 0 && targetm.lra_p () && REG_P (op) + && REGNO (op) >= FIRST_PSEUDO_REGISTER) /* During reload, accept a pseudo */ || (reload_in_progress && REG_P (op) && REGNO (op) >= FIRST_PSEUDO_REGISTER))) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3cf6e024f5b..77649009638 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2015-03-17 Michael Meissner +2015-03-20 Uros Bizjak + + PR rtl-optimization/60851 + * gcc.target/i386/pr60851.c: New test. + +2015-03-19 Michael Meissner PR target/65240 * gcc/testsuite/g++.dg/pr65240.h: Add tests for PR 65240. diff --git a/gcc/testsuite/gcc.target/i386/pr60851.c b/gcc/testsuite/gcc.target/i386/pr60851.c new file mode 100644 index 00000000000..3b8d35d74c4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr60851.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -flive-range-shrinkage -mtune=bdver4 -mdispatch-scheduler" } */ + +long double ld (char c) +{ + return c; +}