Skip to content

Commit 2151bb9

Browse files
committed
No need to check PreservesUniformity for cast
1 parent 5dbbd81 commit 2151bb9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Transforms/Vectorize/VPlanUtils.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,12 @@ bool vputils::isSingleScalar(const VPValue *VPV) {
165165
all_of(Rep->operands(), isSingleScalar));
166166
}
167167
if (isa<VPWidenGEPRecipe, VPDerivedIVRecipe, VPBlendRecipe,
168-
VPWidenSelectRecipe>(VPV))
168+
VPWidenSelectRecipe, VPWidenCastRecipe>(VPV))
169169
return all_of(VPV->getDefiningRecipe()->operands(), isSingleScalar);
170170
if (auto *WidenR = dyn_cast<VPWidenRecipe>(VPV)) {
171171
return PreservesUniformity(WidenR->getOpcode()) &&
172172
all_of(WidenR->operands(), isSingleScalar);
173173
}
174-
if (auto *CastR = dyn_cast<VPWidenCastRecipe>(VPV)) {
175-
return PreservesUniformity(CastR->getOpcode()) &&
176-
all_of(CastR->operands(), isSingleScalar);
177-
}
178174
if (auto *VPI = dyn_cast<VPInstruction>(VPV))
179175
return VPI->isSingleScalar() || VPI->isVectorToScalar() ||
180176
(PreservesUniformity(VPI->getOpcode()) &&

0 commit comments

Comments
 (0)