From: Yuri Rumyantsev Date: Thu, 26 Feb 2015 11:30:03 +0000 (+0000) Subject: re PR target/65161 (ICE: in vec<_haifa_insn_data, va_heap, vl_embed>::operator[]... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b24b326283f936111a47350db174620aa1d6115d;p=gcc.git re PR target/65161 (ICE: in vec<_haifa_insn_data, va_heap, vl_embed>::operator[], at vec.h:736 with -O3 -fselective-scheduling2 -mtune=slm) gcc/ PR target/65161 * config/i386/i386.c (ix86_sched_reorder): Skip instruction reordering for selective scheduling. gcc/testsuite/ PR target/65161 * gcc.target/i386/pr65161.c: New test. From-SVN: r221002 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ff9ac6f2c5..95d7beb3758 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-26 Yuri Rumyantsev + + PR target/65161 + * config/i386/i386.c (ix86_sched_reorder): Skip instruction + reordering for selective scheduling. + 2015-02-26 Terry Guo * config/arm/arm-cores.def (cortex-m7): Add flag FL_NO_VOLATILE_CE. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a1cb5dade38..bec13249901 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -26792,7 +26792,11 @@ ix86_sched_reorder (FILE *dump, int sched_verbose, rtx_insn **ready, ready[n_ready - 1] = insn; return issue_rate; } - if (clock_var != 0 && swap_top_of_ready_list (ready, n_ready)) + + /* Skip selective scheduling since HID is not populated in it. */ + if (clock_var != 0 + && !sel_sched_p () + && swap_top_of_ready_list (ready, n_ready)) { if (sched_verbose > 1) fprintf (dump, ";;\tslm sched_reorder: swap %d and %d insns\n", diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index faece1f1dac..8f88646341c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-02-26 Yuri Rumyantsev + + PR target/65161 + * gcc.target/i386/pr65161.c: New test. + 2015-02-26 Terry Guo * gcc.target/arm/no-volatile-in-it.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr65161.c b/gcc/testsuite/gcc.target/i386/pr65161.c new file mode 100644 index 00000000000..3118e94587a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr65161.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -fselective-scheduling2 -mtune=slm" } */ + +extern char data_ch[]; + +short +foo () +{ + int i; + short shortsum = 0; + for (i = 0; i < 16; i++) + shortsum += data_ch[i]; + return shortsum; +}