[llvm] b52d328 - [VPlan] Remove unnecessary casts from tests after 32f1c5531b.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 14:21:34 PST 2022
Author: Florian Hahn
Date: 2022-11-16T22:17:08Z
New Revision: b52d328ee8aab5afe15e701f269edb0da55f7f0c
URL: https://github.com/llvm/llvm-project/commit/b52d328ee8aab5afe15e701f269edb0da55f7f0c
DIFF: https://github.com/llvm/llvm-project/commit/b52d328ee8aab5afe15e701f269edb0da55f7f0c.diff
LOG: [VPlan] Remove unnecessary casts from tests after 32f1c5531b.
After 32f1c5531b, getDefiningRecipe returns a VPRecipeBase* so there's
no need to cast to VPRecipeBase.
Suggested by @Ayal during review of D136068, thanks!
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 693713ab7e36f..ff9eee0115dfb 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
@@ -813,8 +813,8 @@ TEST(VPRecipeTest, CastVPWidenCallRecipeToVPUserAndVPDef) {
EXPECT_EQ(&Recipe, BaseR);
VPValue *VPV = &Recipe;
- EXPECT_TRUE(isa<VPRecipeBase>(VPV->getDefiningRecipe()));
- EXPECT_EQ(&Recipe, dyn_cast<VPRecipeBase>(VPV->getDefiningRecipe()));
+ EXPECT_TRUE(VPV->getDefiningRecipe());
+ EXPECT_EQ(&Recipe, VPV->getDefiningRecipe());
delete Call;
}
@@ -842,7 +842,7 @@ TEST(VPRecipeTest, CastVPWidenSelectRecipeToVPUserAndVPDef) {
VPValue *VPV = &WidenSelectR;
EXPECT_TRUE(isa<VPRecipeBase>(VPV->getDefiningRecipe()));
- EXPECT_EQ(&WidenSelectR, dyn_cast<VPRecipeBase>(VPV->getDefiningRecipe()));
+ EXPECT_EQ(&WidenSelectR, VPV->getDefiningRecipe());
delete SelectI;
}
@@ -867,7 +867,7 @@ TEST(VPRecipeTest, CastVPWidenGEPRecipeToVPUserAndVPDef) {
VPValue *VPV = &Recipe;
EXPECT_TRUE(isa<VPRecipeBase>(VPV->getDefiningRecipe()));
- EXPECT_EQ(&Recipe, dyn_cast<VPRecipeBase>(VPV->getDefiningRecipe()));
+ EXPECT_EQ(&Recipe, VPV->getDefiningRecipe());
delete GEP;
}
@@ -946,7 +946,7 @@ TEST(VPRecipeTest, CastVPWidenMemoryInstructionRecipeToVPUserAndVPDef) {
VPValue *VPV = Recipe.getVPSingleValue();
EXPECT_TRUE(isa<VPRecipeBase>(VPV->getDefiningRecipe()));
- EXPECT_EQ(&Recipe, dyn_cast<VPRecipeBase>(VPV->getDefiningRecipe()));
+ EXPECT_EQ(&Recipe, VPV->getDefiningRecipe());
delete Load;
}
More information about the llvm-commits
mailing list