+2019-04-02 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/85876
+ * sel-sched.c (code_motion_path_driver): Avoid unwinding first_insn
+ beyond the original fence.
+
2019-04-02 Ulrich Weigand <uweigand@de.ibm.com>
* config.gcc: Mark spu* targets as deprecated/obsolete.
{
expr_t expr = NULL;
basic_block bb = BLOCK_FOR_INSN (insn);
- insn_t first_insn, bb_tail, before_first;
+ insn_t first_insn, original_insn, bb_tail, before_first;
bool removed_last_insn = false;
if (sched_verbose >= 6)
/* It is enough to place only heads and tails of visited basic blocks into
the PATH. */
ilist_add (&path, insn);
- first_insn = insn;
+ first_insn = original_insn = insn;
bb_tail = sel_bb_end (bb);
/* Descend the basic block in search of the original expr; this part
{
insn = sel_bb_end (bb);
first_insn = sel_bb_head (bb);
+ if (first_insn != original_insn)
+ first_insn = original_insn;
}
/* Remove bb tail from path. */
+2019-04-02 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/85876
+ * gcc.dg/pr85876.c: New test.
+
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/zvector/vec-double-compile.c: New test.
--- /dev/null
+/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fschedule-insns -fsel-sched-pipelining -fselective-scheduling -fno-if-conversion -fno-tree-dce" } */
+/* { dg-additional-options "-march=bdver1" { target i?86-*-* x86_64-*-* } } */
+
+int ov, rq, ac;
+
+int
+y2 (int);
+
+void
+f8 (int vn)
+{
+ while (rq < 1)
+ {
+ ov *= y2 (ac);
+ vn += (!!ov && !!ac) + ac;
+ }
+}