re PR target/65161 (ICE: in vec<_haifa_insn_data, va_heap, vl_embed>::operator[]...
authorYuri Rumyantsev <ysrumyan@gmail.com>
Thu, 26 Feb 2015 11:30:03 +0000 (11:30 +0000)
committerIlya Enkovich <ienkovich@gcc.gnu.org>
Thu, 26 Feb 2015 11:30:03 +0000 (11:30 +0000)
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

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr65161.c [new file with mode: 0644]

index 1ff9ac6f2c54ea7d54e3efcdde6e7d93e8818baa..95d7beb375864fee5ef14361658d2d25d04aa6e7 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-26  Yuri Rumyantsev  <ysrumyan@gmail.com>
+
+       PR target/65161
+       * config/i386/i386.c (ix86_sched_reorder): Skip instruction
+       reordering for selective scheduling.
+
 2015-02-26  Terry Guo  <terry.guo@arm.com>
 
        * config/arm/arm-cores.def (cortex-m7): Add flag FL_NO_VOLATILE_CE.
index a1cb5dade380782523ef7bc896de12fb5167a3ce..bec132499015d65618a7e414d424ed64d7b0ce20 100644 (file)
@@ -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",
index faece1f1dacf1c9070661b314dc05ca55c430f25..8f88646341cdf932e01610a27051f50a7d1888d9 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-26  Yuri Rumyantsev  <ysrumyan@gmail.com>
+
+       PR target/65161
+       * gcc.target/i386/pr65161.c: New test.
+
 2015-02-26  Terry Guo  <terry.guo@arm.com>
 
        * 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 (file)
index 0000000..3118e94
--- /dev/null
@@ -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;
+}