[llvm] [VFABI] Improve VFABI unit tests (PR #73907)

Maciej Gabka via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 3 07:38:31 PST 2023


================
@@ -40,61 +38,45 @@ class VFABIParserTest : public ::testing::Test {
   LLVMContext Ctx;
   SMDiagnostic Err;
   std::unique_ptr<Module> M;
-  FunctionType *FTy;
+  FunctionType *ScalarFTy = nullptr;
   FunctionCallee F;
 
 protected:
-  // Referencies to the parser output field.
+  // References to the parser output field.
   ElementCount &VF = Info.Shape.VF;
   VFISAKind &ISA = Info.ISA;
-  SmallVector<VFParameter, 8> &Parameters = Info.Shape.Parameters;
+  SmallVector<VFParameter, 8> &VecFuncParameters = Info.Shape.Parameters;
   std::string &ScalarName = Info.ScalarName;
   std::string &VectorName = Info.VectorName;
-  // Invoke the parser. We need to make sure that a function exist in
-  // the module because the parser fails if such function don't
-  // exists. Every time this method is invoked the state of the test
-  // is reset.
-  //
-  // \p MangledName -> the string the parser has to demangle.
-  //
-  // \p VectorName -> optional vector name that the method needs to
-  // use to create the function in the module if it differs from the
-  // standard mangled name.
-  //
-  // \p IRType -> FunctionType string to be used for the signature of
-  // the vector function.  The correct signature is needed by the
-  // parser only for scalable functions. For the sake of testing, the
-  // generic fixed-length case can use as signature `void()`.
-  //
+
+  /// Invoke the parser. We need to make sure that a function exist in the
+  /// module because the parser fails if such function don't exists. Every time
----------------
mgabka wrote:

I think that is not true anymore, as we moved away from computing scalable VF from the function declaration in the module, look at https://github.com/llvm/llvm-project/pull/72260

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


More information about the llvm-commits mailing list