On Thu, Sep 26, 2019 at 1:42 PM augustine.sterl...@gmail.com <augustine.sterl...@gmail.com> wrote: > > On Tue, Sep 24, 2019 at 5:41 PM Max Filippov <jcmvb...@gmail.com> wrote: > > > > Xtensa hwloop_optimize segfaults when zero overhead loop is about to be > > inserted as the first instruction of the function. > > Insert zero overhead loop instruction into new basic block before the > > loop when basic block that precedes the loop is empty. > > > > 2019-09-24 Max Filippov <jcmvb...@gmail.com> > > gcc/ > > * config/xtensa/xtensa.c (hwloop_optimize): Insert zero overhead > > loop instruction into new basic block before the loop when basic > > block that precedes the loop is empty. > > > > gcc/testsuite/ > > * gcc.target/xtensa/pr91880.c: New test case. > > * gcc.target/xtensa/xtensa.exp: New test suite. > > --- > > gcc/config/xtensa/xtensa.c | 5 ++-- > > gcc/testsuite/gcc.target/xtensa/pr91880.c | 10 ++++++++ > > gcc/testsuite/gcc.target/xtensa/xtensa.exp | 41 > > ++++++++++++++++++++++++++++++ > > 3 files changed, 54 insertions(+), 2 deletions(-) > > create mode 100644 gcc/testsuite/gcc.target/xtensa/pr91880.c > > create mode 100644 gcc/testsuite/gcc.target/xtensa/xtensa.exp > > Approved. Thanks.
Thanks. Applied to trunk. I'll backport it later to gcc-7..9 branches. -- Max