[llvm] [LLVM][LangRef] Remove "n > 0" restriction from get.active.lanes.mask. (PR #152140)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 6 02:58:56 PDT 2025


paulwalker-arm wrote:

I looked at `VCTP` and also could not see a reason to restrict `get.active.lane.mask` given it does the correct thing with a zero input.  This is making me think the intrinsic was restricted so that an MVE transformation didn't need to perform the relevant (SCEV? ValueTracking?) analysis.  Does this sounds believable?

If true and not fixable then I guess an alternative route is to add a bool to `get.active.lane.mask` to define the behaviour for the n==0 case, similar to the cttz intrinsics.

https://github.com/llvm/llvm-project/pull/152140


More information about the llvm-commits mailing list