projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5acee7d
)
[VPlan] Add sideeffect/memory unit test for VPScalarIVStepsRecipe. (NFC)
author
Florian Hahn
<flo@fhahn.com>
Sun, 4 Dec 2022 12:50:09 +0000
(12:50 +0000)
committer
Florian Hahn
<flo@fhahn.com>
Sun, 4 Dec 2022 12:50:09 +0000
(12:50 +0000)
llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
patch
|
blob
|
history
diff --git
a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
index
ff9eee0
..
34522ad
100644
(file)
--- 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;