[llvm] [VFABI] Create FunctionType for vector functions (PR #75058)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 15 05:53:19 PST 2023
================
@@ -1477,6 +1480,32 @@ void VFABI::getVectorVariantNames(
}
}
+FunctionType *VFABI::createFunctionType(const VFInfo &Info,
+ const FunctionType *ScalarFTy) {
+ ElementCount VF = Info.Shape.VF;
+ // Create vector parameter types
+ SmallVector<Type *, 8> VecTypes;
+ for (auto [STy, VFParam] : zip(ScalarFTy->params(), Info.Shape.Parameters)) {
+ if (VFParam.ParamKind == VFParamKind::Vector)
+ VecTypes.push_back(VectorType::get(STy, VF));
+ else
+ VecTypes.push_back(STy);
+ }
+
+ // Get mask's position mask and append one if not present in the Instruction.
----------------
paulwalker-arm wrote:
I'm struggling to parse the comment. How about "Insert mask operand if required."?
https://github.com/llvm/llvm-project/pull/75058
More information about the llvm-commits
mailing list