What you're doing here has two essential steps:
- Convert "llvm.get.active.lane.mask(X, Y)" to "llvm.arm.mve.vctp(Y - X)".
- Convert "Y - X" to a simpler induction variable.
and also that:
The way the code is currently written, I think you're trying to prove more than you actually need to. If the induction variable has the "wrong" base or increment, ARMLowOverheadLoops will ultimately fail to tail-predicate, but I'm not sure that's actually a problem."
That's why I propose to just skip that check here, which is why I have deleted it. I have kept the check when the values are constants, because those checks