[llvm] [SelectionDAG] Avoid illegal wide vectors expanding get.active.lane.mask (PR #213670)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 06:33:51 PDT 2026
================
@@ -505,6 +505,15 @@ class LLVM_ABI TargetLoweringBase {
return true;
}
+ /// Return the vector type that the generic expansion of
+ /// @llvm.get.active.lane.mask in SelectionDAGBuilder builds its step and
+ /// splat vectors at, for a mask of type \p ResVT and scalar operands of type
+ /// \p OpVT. This is a vector of \p OpVT, except when that vector is a
+ /// scalable vector the type legalizer would have to scalarize, in which case
+ /// the expansion falls back to a narrower element type.
+ EVT getGetActiveLaneMaskExpansionVT(LLVMContext &Context, EVT ResVT,
+ EVT OpVT) const;
----------------
lukel97 wrote:
Can we reuse `getBitWidthForCttzElements` instead of adding a new hook? Its used for a similar purpose for expanding cttz.elts etc.
https://github.com/llvm/llvm-project/pull/213670
More information about the llvm-commits
mailing list