[llvm] cf28e6b - [VPlan] Add sideeffect/memory unit test for VPScalarIVStepsRecipe. (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 4 04:50:24 PST 2022
Author: Florian Hahn
Date: 2022-12-04T12:50:09Z
New Revision: cf28e6b2f1176356c6a6fa6749acda7f78035d1a
URL: https://github.com/llvm/llvm-project/commit/cf28e6b2f1176356c6a6fa6749acda7f78035d1a
DIFF: https://github.com/llvm/llvm-project/commit/cf28e6b2f1176356c6a6fa6749acda7f78035d1a.diff
LOG: [VPlan] Add sideeffect/memory unit test for VPScalarIVStepsRecipe. (NFC)
Added:
Modified:
llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
index ff9eee0115dfb..34522ad607d71 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
@@ -1074,6 +1074,17 @@ TEST(VPRecipeTest, MayHaveSideEffectsAndMayReadWriteMemory) {
delete Call;
}
+ {
+ VPValue Op1;
+ VPValue Op2;
+ InductionDescriptor IndDesc;
+ VPScalarIVStepsRecipe Recipe(IndDesc, &Op1, &Op2);
+ EXPECT_FALSE(Recipe.mayHaveSideEffects());
+ EXPECT_TRUE(Recipe.mayReadFromMemory());
+ EXPECT_TRUE(Recipe.mayWriteToMemory());
+ EXPECT_TRUE(Recipe.mayReadOrWriteMemory());
+ }
+
// The initial implementation is conservative with respect to VPInstructions.
{
VPValue Op1;
More information about the llvm-commits
mailing list