[llvm] dde3194 - [VPlan] Add sideffect/read or write test for VPPredInstPHIRecipe. (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 29 14:46:24 PST 2023
Author: Florian Hahn
Date: 2023-01-29T22:46:17Z
New Revision: dde3194876bfc2753e6a98c1b0912e8ce753835f
URL: https://github.com/llvm/llvm-project/commit/dde3194876bfc2753e6a98c1b0912e8ce753835f
DIFF: https://github.com/llvm/llvm-project/commit/dde3194876bfc2753e6a98c1b0912e8ce753835f.diff
LOG: [VPlan] Add sideffect/read or write test for VPPredInstPHIRecipe. (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 495ce1976590..377d607835e1 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
@@ -1161,6 +1161,14 @@ TEST(VPRecipeTest, MayHaveSideEffectsAndMayReadWriteMemory) {
EXPECT_TRUE(Recipe.mayWriteToMemory());
EXPECT_TRUE(Recipe.mayReadOrWriteMemory());
}
+ {
+ VPValue Op1;
+ VPPredInstPHIRecipe Recipe(&Op1);
+ EXPECT_FALSE(Recipe.mayHaveSideEffects());
+ EXPECT_TRUE(Recipe.mayReadFromMemory());
+ EXPECT_TRUE(Recipe.mayWriteToMemory());
+ EXPECT_TRUE(Recipe.mayReadOrWriteMemory());
+ }
}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
More information about the llvm-commits
mailing list