[VPlan] VPPredInstPHIRecipe does not read from memory.

VPPredInstPHIRecipe just merges the incoming values and does not write
to memory.
This commit is contained in:
Florian Hahn 2023-01-31 21:51:03 +00:00
parent b875defc55
commit cf2d436b31
No known key found for this signature in database
GPG Key ID: CF59919C6547A668
2 changed files with 3 additions and 2 deletions

View File

@ -83,6 +83,7 @@ bool VPRecipeBase::mayReadFromMemory() const {
->mayReadFromMemory();
case VPBranchOnMaskSC:
case VPScalarIVStepsSC:
case VPPredInstPHISC:
return false;
case VPWidenIntOrFpInductionSC:
case VPWidenCanonicalIVSC:

View File

@ -1165,9 +1165,9 @@ TEST(VPRecipeTest, MayHaveSideEffectsAndMayReadWriteMemory) {
VPValue Op1;
VPPredInstPHIRecipe Recipe(&Op1);
EXPECT_FALSE(Recipe.mayHaveSideEffects());
EXPECT_TRUE(Recipe.mayReadFromMemory());
EXPECT_FALSE(Recipe.mayReadFromMemory());
EXPECT_FALSE(Recipe.mayWriteToMemory());
EXPECT_TRUE(Recipe.mayReadOrWriteMemory());
EXPECT_FALSE(Recipe.mayReadOrWriteMemory());
}
}