Skip to content

Commit c1bc55e

Browse files
[Vectorize] Remove an unnecessary cast (NFC) (#155135)
getOpcode() already returns Instruction::CastOps.
1 parent 711134f commit c1bc55e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,8 +2833,7 @@ static Value *generateNewInstTree(ArrayRef<InstLane> Item, FixedVectorType *Ty,
28332833
return Value;
28342834
}
28352835
if (auto *CI = dyn_cast<CastInst>(I)) {
2836-
auto *Value = Builder.CreateCast((Instruction::CastOps)CI->getOpcode(),
2837-
Ops[0], DstTy);
2836+
auto *Value = Builder.CreateCast(CI->getOpcode(), Ops[0], DstTy);
28382837
propagateIRFlags(Value, ValueList);
28392838
return Value;
28402839
}

0 commit comments

Comments
 (0)