[PATCH] D78831: [SVE] Upgrade VectorType tests to test new types

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 13:29:12 PDT 2020


sdesmalen accepted this revision.
sdesmalen added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: llvm/unittests/IR/VectorTypesTest.cpp:160
+  EXPECT_VTY_NE(ScV8Int32Ty, ScV8Int8Ty);
+  EXPECT_EQ(ScV8Int8Ty->getMinNumElements(), ScV8Int32Ty->getMinNumElements());
+  EXPECT_EQ(ScV8Int8Ty->getElementType()->getScalarSizeInBits(), 8U);
----------------
ctetreau wrote:
> sdesmalen wrote:
> > Do you not want to test for getElementCount here?
> I chose not to because both types are instances of ScalableVectorType, and by definition that means that EC.Scalable is true. But then again, I suppose the purpose of tests is to ensure that stays true. I'll make the change.
Right, I misread this as `getNumElements`. In that case both are indeed fine though.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78831/new/

https://reviews.llvm.org/D78831





More information about the llvm-commits mailing list