[llvm] [TLI] Use tryDemangleForVFABI when declaring vector variants. (PR #76753)

Maciej Gabka via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 00:46:12 PST 2024


================
@@ -37,20 +37,39 @@ STATISTIC(NumCompUsedAdded,
 /// vectorizes the CallInst CI with a vectorization factor of VF
 /// lanes. The TLI assumes that all parameters and the return type of
 /// CI (other than void) need to be widened to a VectorType of VF
-/// lanes.
+/// lanes unless the VFABI says otherwise.
 static void addVariantDeclaration(CallInst &CI, const ElementCount &VF,
-                                  bool Predicate, const StringRef VFName) {
+                                  const VecDesc *VD) {
   Module *M = CI.getModule();
 
   // Add function declaration.
   Type *RetTy = ToVectorTy(CI.getType(), VF);
----------------
mgabka wrote:

is this going to work if function returns void?

it may also be worth to move it below the call to "tryDemangleForVFABI" which will ensure that all the VFABI rules are applied

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


More information about the llvm-commits mailing list