Skip to content

Commit c07c1c4

Browse files
committed
[VPlan] Remove redundant cast (NFCI).
SinkCandidate is a VPSingleDefRecipe now, so no cast is needed to access getUnderlyingInstr directly.
1 parent 5d45757 commit c07c1c4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ static bool sinkScalarOperands(VPlan &Plan) {
156156
if (NeedsDuplicating) {
157157
if (ScalarVFOnly)
158158
continue;
159-
Instruction *I = cast<Instruction>(
160-
cast<VPReplicateRecipe>(SinkCandidate)->getUnderlyingValue());
159+
Instruction *I = SinkCandidate->getUnderlyingInstr();
161160
auto *Clone = new VPReplicateRecipe(I, SinkCandidate->operands(), true);
162161
// TODO: add ".cloned" suffix to name of Clone's VPValue.
163162

0 commit comments

Comments
 (0)