[PATCH] D78054: [VFDatabase] Scalar functions are vector functions with VF =1
Francesco Petrogalli via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 15:07:16 PDT 2020
fpetrogalli added a comment.
One last thing!
================
Comment at: llvm/unittests/Analysis/VectorUtilsTest.cpp:549-554
+ buildShape(/*VF*/ 1, /*IsScalable*/ true, /*HasGlobalPred*/ false);
+ EXPECT_EQ((new VFDatabase(*CI))->getVectorizedFunction(Shape), nullptr);
+ buildShape(/*VF*/ 1, /*IsScalable*/ false, /*HasGlobalPred*/ true);
+ EXPECT_EQ((new VFDatabase(*CI))->getVectorizedFunction(Shape), nullptr);
+ buildShape(/*VF*/ 1, /*IsScalable*/ true, /*HasGlobalPred*/ true);
+ EXPECT_EQ((new VFDatabase(*CI))->getVectorizedFunction(Shape), nullptr);
----------------
Same here as for the first `EXPECT_EQ`, I think you don't want to use operator `new`.
You could actually extract the `VFDatabase(CI)` in a variable, right before using it in any of the checks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78054/new/
https://reviews.llvm.org/D78054
More information about the llvm-commits
mailing list