Skip to content

Commit 16fffdf

Browse files
committed
Change dyn_cast<> then assert to cast<> per review suggestions
1 parent ae4f037 commit 16fffdf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,10 +2050,8 @@ bool VectorCombine::foldShuffleOfSelects(Instruction &I) {
20502050
(SI0FOp->getFastMathFlags() != SI1FOp->getFastMathFlags())))
20512051
return false;
20522052

2053-
auto *SrcVecTy = dyn_cast<FixedVectorType>(T1->getType());
2054-
auto *DstVecTy = dyn_cast<FixedVectorType>(I.getType());
2055-
assert(SrcVecTy && DstVecTy &&
2056-
"Expected shuffle/select vector types to be defined");
2053+
auto *SrcVecTy = cast<FixedVectorType>(T1->getType());
2054+
auto *DstVecTy = cast<FixedVectorType>(I.getType());
20572055

20582056
auto SK = TargetTransformInfo::SK_PermuteTwoSrc;
20592057
auto SelOp = Instruction::Select;

0 commit comments

Comments
 (0)