In D86074, we discussed sanity checks for intrinsic get.active.lane.mask's second argument, the element count. @efriedma summarised our steps as:
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
are straightforward.
Maybe add a comment clarifying why we want to bail out here?