[llvm] InjectTLIMappings: remove incompatible attributes from vector declarations. (PR #173206)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 12 06:22:51 PST 2026
================
@@ -55,6 +57,16 @@ static void addVariantDeclaration(CallInst &CI, const ElementCount &VF,
Function *VecFunc =
Function::Create(VectorFTy, Function::ExternalLinkage, VFName, M);
VecFunc->copyAttributesFrom(CI.getCalledFunction());
+
+ // When mapping scalar functions to vector functions, some attributes
+ // (e.g. signext) are not valid on vector types. Remove attributes that are
+ // incompatible with the vectorized return type and arguments.
+ VecFunc->removeRetAttrs(AttributeFuncs::typeIncompatible(
----------------
arsenm wrote:
Return case untested? Are there any examples for it?
https://github.com/llvm/llvm-project/pull/173206
More information about the llvm-commits
mailing list