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:
2725499
)
[VPlan] Add sideffect/read or write test for VPPredInstPHIRecipe. (NFC)
author
Florian Hahn
<flo@fhahn.com>
Sun, 29 Jan 2023 22:46:17 +0000
(22:46 +0000)
committer
Florian Hahn
<flo@fhahn.com>
Sun, 29 Jan 2023 22:46:17 +0000
(22:46 +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
495ce19
..
377d607
100644
(file)
--- 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)