From a0802144bb4c0e60a110c6d5d8af22cb035da9c9 Mon Sep 17 00:00:00 2001 From: Andrey Belevantsev Date: Mon, 1 Apr 2019 18:20:13 +0300 Subject: [PATCH] sel-sched: remove assert in merge_fences (PR 87273) 2019-04-01 Andrey Belevantsev PR rtl-optimization/87273 * sel-sched-ir.c (merge_fences): Remove assert. * gcc.dg/pr87273.c: New test. From-SVN: r270059 --- gcc/ChangeLog | 5 +++++ gcc/sel-sched-ir.c | 5 ----- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr87273.c | 20 ++++++++++++++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr87273.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b0a73afd58..2f55f595f3f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-04-01 Andrey Belevantsev + + PR rtl-optimization/87273 + * sel-sched-ir.c (merge_fences): Remove assert. + 2019-04-01 Richard Biener PR tree-optimization/46590 diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index e8e508ef692..a6583017c9d 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -703,11 +703,6 @@ merge_fences (fence_t f, insn_t insn, else if (candidate->src == BLOCK_FOR_INSN (last_scheduled_insn)) { - /* Would be weird if same insn is successor of several fallthrough - edges. */ - gcc_assert (BLOCK_FOR_INSN (insn)->prev_bb - != BLOCK_FOR_INSN (last_scheduled_insn_old)); - state_free (FENCE_STATE (f)); FENCE_STATE (f) = state; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 15b32a254d1..6fd174640d3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-04-01 Andrey Belevantsev + + PR rtl-optimization/87273 + * gcc.dg/pr87273.c: New test. + 2019-04-01 Martin Liska PR driver/89861 diff --git a/gcc/testsuite/gcc.dg/pr87273.c b/gcc/testsuite/gcc.dg/pr87273.c new file mode 100644 index 00000000000..43662f0241c --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87273.c @@ -0,0 +1,20 @@ +/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */ +/* { dg-options "-Os -fschedule-insns -fsel-sched-pipelining -fselective-scheduling -fno-ssa-phiopt -fno-tree-loop-im" } */ +/* { dg-additional-options "-march=core2" { target i?86-*-* x86_64-*-* } } */ + +int sd; + +void +w5 (int n4) +{ + long int *vq = (long int *) &n4; + + while (n4 < 1) + { + int ks; + + ks = !!(n4 + 1) ? ((++sd) == *vq) : 0; + if (ks == 1 / *vq) + *vq *= sd; + } +} -- 2.30.2