loop-split improvements, part 1
while looking on profile misupdate on hmmer I noticed that loop splitting pass is not able to handle the loop it has as an example it should apply on: One transformation of loops like: for (i = 0; i < 100; i++) { if (i < 50) A; else B; } into: for (i = 0; i < 50; i++) { A; } for (; i < 100; i++) { B; } The problem is that ivcanon turns the test into i != 100 and the pass explicitly gives up on any loops ending with != test. It needs to know the directoin of the induction variable in order to derive right conditions, but that can be done also from step. It turns out that there are no testcases for basic loop splitting. I will add some with the profile update fix. gcc/ChangeLog: * tree-ssa-loop-split.cc (split_loop): Also support NE driven loops when IV test is not overflowing. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/ifc-12.c: Disable loop splitting. * gcc.target/i386/avx2-gather-6.c: Likewise. * gcc.target/i386/avx2-vect-aggressive.c: Likewise.
Showing
- gcc/testsuite/gcc.dg/tree-ssa/ifc-12.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/tree-ssa/ifc-12.c
- gcc/testsuite/gcc.target/i386/avx2-gather-6.c 1 addition, 1 deletiongcc/testsuite/gcc.target/i386/avx2-gather-6.c
- gcc/testsuite/gcc.target/i386/avx2-vect-aggressive.c 1 addition, 1 deletiongcc/testsuite/gcc.target/i386/avx2-vect-aggressive.c
- gcc/tree-ssa-loop-split.cc 10 additions, 3 deletionsgcc/tree-ssa-loop-split.cc
Loading
Please register or sign in to comment