[llvm] [LLVM][LangRef] Remove "n > 0" restriction from get.active.lanes.mask. (PR #152140)
Sam Parker via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 02:40:53 PDT 2025
sparker-arm wrote:
I thought this trauma was behind me!
`get.active.lane.mask` maps to the `VCTP` instruction and, although I'm awful at reading the manual, I'm unable to reason why it couldn't take a zero value. And I'm struggling to parse the lang ref too.
> With n=0, the loop wouldn't be executed, but incorrectly INT_MAX times, or something like that.
Yeah, this sounds very familiar. Don't we need to be able to convert this to back into an equivalent `icmp ule` and we need to perform a minus one during the reconstruction? So, with a zero value input we wrap to UINT_MAX?
https://github.com/llvm/llvm-project/pull/152140
More information about the llvm-commits
mailing list