On Wed, May 14, 2014 at 10:57 AM, Andrey Belevantsev <a...@ispras.ru> wrote:

> This ICE comes from the ix86_dependencies_evaluation_hook code assumption
> that any scheduling region will be connected.  This assumption is not
> correct in case of the outer loops pipelining of the selective scheduler as
> explained in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60901#c3.
> Trying to add dependencies between insns from the different scheduling
> regions results in a segfault within the dependency analyzer code.
>
> The fix is to adjust the code to account for the situation when basic
> block's predecessors do not belong to the same scheduling region.
>
> Bootstrapped and tested on x86-64, OK for trunk?  Branches?  The fix is low
> risk as the additional test should always be true for the regular scheduler.

I don't know all scheduler details, so your opinion counts there.
Let's put this fix to mainline first and after a week without
problems, backport it to all release branches.

> gcc/
> 2014-05-14  Andrey Belevantsev  <a...@ispras.ru>
>
>         PR rtl-optimization/60901
>
>         * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
> bb predecessor belongs to the same scheduling region.  Adjust comment.
>
> testsuite/
> 2014-05-14  Andrey Belevantsev  <a...@ispras.ru>
>
>         PR rtl-optimization/60901
>         * gcc.dg/pr60901.c: New test.

+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "-O -fselective-scheduling -fschedule-insns
-fsel-sched-pipelining -fsel-sched-pipelining-outer-loops
-fno-tree-dominator-opts"  } */
+

As this is clearly a target bug, let's put the test in gcc.target/i386
directory. You can remove target selector, and the test will run for
64bit and 32bit targets automatically.

Thanks,
Uros.

Reply via email to