From 9064759767c96c221038fc5998596d425a18622d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 16 Jan 2018 09:55:14 +0100 Subject: [PATCH] re PR rtl-optimization/83620 (ICE: in assign_by_spills, at lra-assigns.c:1470: unable to find a register to spill with -flive-range-shrinkage --param=max-sched-ready-insns=0) PR rtl-optimization/86620 * params.def (max-sched-ready-insns): Bump minimum value to 1. * gcc.dg/pr64935-2.c: Use --param=max-sched-ready-insns=1 instead of --param=max-sched-ready-insns=0. * gcc.target/i386/pr83620.c: New test. * gcc.dg/pr83620.c: New test. From-SVN: r256729 --- gcc/ChangeLog | 3 +++ gcc/params.def | 2 +- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/pr64935-2.c | 2 +- gcc/testsuite/gcc.dg/pr83620.c | 9 +++++++++ gcc/testsuite/gcc.target/i386/pr83620.c | 15 +++++++++++++++ 6 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr83620.c create mode 100644 gcc/testsuite/gcc.target/i386/pr83620.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 026e8a89d0c..9cf937b2714 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2018-01-16 Jakub Jelinek + PR rtl-optimization/86620 + * params.def (max-sched-ready-insns): Bump minimum value to 1. + PR rtl-optimization/83213 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn to last if both are JUMP_INSNs. diff --git a/gcc/params.def b/gcc/params.def index a0aa5765ff6..930b31820be 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -744,7 +744,7 @@ DEFPARAM (PARAM_MAX_FIELDS_FOR_FIELD_SENSITIVE, DEFPARAM(PARAM_MAX_SCHED_READY_INSNS, "max-sched-ready-insns", "The maximum number of instructions ready to be issued to be considered by the scheduler during the first scheduling pass.", - 100, 0, 0) + 100, 1, 0) /* This is the maximum number of active local stores RTL DSE will consider. */ DEFPARAM (PARAM_MAX_DSE_ACTIVE_LOCAL_STORES, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 506113a4e61..b4f38370f78 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2018-01-16 Jakub Jelinek + PR rtl-optimization/86620 + * gcc.dg/pr64935-2.c: Use --param=max-sched-ready-insns=1 + instead of --param=max-sched-ready-insns=0. + * gcc.target/i386/pr83620.c: New test. + * gcc.dg/pr83620.c: New test. + PR tree-optimization/83843 * gcc.dg/store_merging_18.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr64935-2.c b/gcc/testsuite/gcc.dg/pr64935-2.c index bde658d4456..33d96303699 100644 --- a/gcc/testsuite/gcc.dg/pr64935-2.c +++ b/gcc/testsuite/gcc.dg/pr64935-2.c @@ -1,6 +1,6 @@ /* PR rtl-optimization/64935 */ /* { dg-do compile } */ -/* { dg-options "-O -fschedule-insns --param=max-sched-ready-insns=0 -fcompare-debug" } */ +/* { dg-options "-O -fschedule-insns --param=max-sched-ready-insns=1 -fcompare-debug" } */ /* { dg-require-effective-target scheduling } */ /* { dg-xfail-if "" { powerpc-ibm-aix* } } */ diff --git a/gcc/testsuite/gcc.dg/pr83620.c b/gcc/testsuite/gcc.dg/pr83620.c new file mode 100644 index 00000000000..e0e44a3b421 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr83620.c @@ -0,0 +1,9 @@ +/* PR rtl-optimization/86620 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -flive-range-shrinkage --param=max-sched-ready-insns=0" } */ +/* { dg-error "minimum value of parameter 'max-sched-ready-insns' is 1" "" { target *-*-* } 0 } */ + +void +foo (void) +{ +} diff --git a/gcc/testsuite/gcc.target/i386/pr83620.c b/gcc/testsuite/gcc.target/i386/pr83620.c new file mode 100644 index 00000000000..996f20477d2 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr83620.c @@ -0,0 +1,15 @@ +/* PR rtl-optimization/86620 */ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O2 -flive-range-shrinkage --param=max-sched-ready-insns=1 -Wno-psabi -mno-avx" } */ + +typedef unsigned __int128 V __attribute__ ((vector_size (64))); + +V u, v; + +V +foo (char c, short d, int e, long f, __int128 g) +{ + f >>= c & 63; + v = (V){f} == u; + return e + g + v; +} -- 2.30.2