[PATCH] D87700: [SVE] Replace / operator in TypeSize/ElementCount with coefficientDiv

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 03:41:48 PDT 2020


paulwalker-arm added a comment.

@david-arm The main priority is to remove the operator overloads so if universally using divideCoefficientBy pleases the most people then let's just do that.



================
Comment at: llvm/unittests/CodeGen/ScalableVectorMVTsTest.cpp:66
   EXPECT_EQ(EVT::getVectorVT(Ctx, MVT::i64, EltCnt * 2), MVT::nxv4i64);
-  EXPECT_EQ(EVT::getVectorVT(Ctx, MVT::i64, EltCnt / 2), MVT::nxv1i64);
+  EXPECT_EQ(EVT::getVectorVT(Ctx, MVT::i64, EltCnt.coefficientDiv(2)),
+            MVT::nxv1i64);
----------------
If `halve` is kept then it makes sense to add an explicit test for it here.


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

https://reviews.llvm.org/D87700



More information about the llvm-commits mailing list