On Thu, Oct 23, 2014 at 11:40 PM, Yangfei (Felix) <felix.y...@huawei.com> wrote: > 1. The original xtensa port never generates "loop" instruction at all. > 2. A port doesn't need to implement hwloop_pattern_reg hook if it has no > zero-cost loop instruction. > > Is that clear?
We are talking in circles. I understand very well what goes on here. My point is: 1. Right now, today, GCC generates loops with branch instructions even when the trip count is spilled. 2. Branch instructions and loop instructions have identical register requirements. Therefore: 3. loop instructions should be generatable when the trip count is spilled.