[llvm] [CodeGen] Split wide active lane mask into smaller masks if preferred (PR #202909)

Kerry McLaughlin via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 09:04:46 PDT 2026


kmclaughlin-arm wrote:

The reason for adding this to CodeGenPrepare is to make sure that we transform the IR before the get.active.lane.mask intrinsic is expanded. For AArch64, we can choose not to expand it and instead create a get_active_lane_mask node, which could be transformed later by a target DAG combine instead. This would not be as straightforward for other targets which choose to expand the intrinsic.

@lukel97 It looks like with the preferred DataWithEVL tail-folding style for RISC-V that we would not normally create a get.active.lane.mask for control flow. If this is the case, I'm not sure how important it is for RISC-V that we rewrite the intrinsic early in the IR rather than just allowing it to expand?

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


More information about the llvm-commits mailing list