Hi,
We've a target which has hardware support for zero-overhead loops. Currently, we cannot detect them because the loop unroller is unrolling them before entering into the codegen. Looking at its implementation, it seems that it checks if it is profitable to unroll it or not based on certain parameters.
Given that zero cost loops building is based more or less on the same constraints that loop unroll pass, I wonder if it is reasonable to add yet another target hook to prevent loop unrolling (something like hasZeroOverheadLooping or hasZeroCostLooping) for targets that support zero-cost looping.
Does Hexagon provides the same loop support? How have you addressed this?
Ivan