Skip to content

Commit a1a72af

Browse files
kazutakahiratagithub-actions[bot]
authored andcommitted
Automerge: [Vectorize] Remove an unnecessary cast (NFC) (#155135)
getOpcode() already returns Instruction::CastOps.
2 parents 9c4a291 + c1bc55e commit a1a72af

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)