xtensa: fix PR target/91880
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-26 Max Filippov <jcmvbkbc@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. From-SVN: r276166
Showing
- gcc/ChangeLog 6 additions, 0 deletionsgcc/ChangeLog
- gcc/config/xtensa/xtensa.c 3 additions, 2 deletionsgcc/config/xtensa/xtensa.c
- gcc/testsuite/ChangeLog 5 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gcc.target/xtensa/pr91880.c 10 additions, 0 deletionsgcc/testsuite/gcc.target/xtensa/pr91880.c
- gcc/testsuite/gcc.target/xtensa/xtensa.exp 41 additions, 0 deletionsgcc/testsuite/gcc.target/xtensa/xtensa.exp
Loading
Please register or sign in to comment