Hi!

This param allows minimum of 0, which doesn't make much sense.
On the i386/pr83620.c test (when used with the =0 value) we ICE
because ix86_adjust_priority which has code to prevent moving of likely
spilled hard regs doesn't have a chance to do anything, since we don't
consider any other insns as ready.

This patch bumps the minimum to 1, so that there is at least something
considered.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2018-01-15  Jakub Jelinek  <ja...@redhat.com>

        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.

--- gcc/params.def.jj   2018-01-14 17:16:57.471836055 +0100
+++ gcc/params.def      2018-01-15 18:53:24.122124325 +0100
@@ -744,7 +744,7 @@ DEFPARAM (PARAM_MAX_FIELDS_FOR_FIELD_SEN
 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,
--- gcc/testsuite/gcc.dg/pr64935-2.c.jj 2017-06-19 08:27:46.126467108 +0200
+++ gcc/testsuite/gcc.dg/pr64935-2.c    2018-01-15 18:52:23.987124863 +0100
@@ -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* } } */
 
--- gcc/testsuite/gcc.target/i386/pr83620.c.jj  2018-01-15 18:53:43.267124153 
+0100
+++ gcc/testsuite/gcc.target/i386/pr83620.c     2018-01-15 19:17:31.053208498 
+0100
@@ -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;
+}
--- gcc/testsuite/gcc.dg/pr83620.c.jj   2018-01-15 19:16:31.953190203 +0100
+++ gcc/testsuite/gcc.dg/pr83620.c      2018-01-15 19:16:16.499185414 +0100
@@ -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)
+{
+}

        Jakub

Reply via email to