Skip to content

Commit c7cd1d0

Browse files
[Analysis] Remove an unnecessary cast (NFC) (#150838)
getOpcode() already returns Instruction::CastOps.
1 parent 85213f2 commit c7cd1d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/InstructionSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5366,7 +5366,7 @@ static Value *simplifyCastInst(unsigned CastOpc, Value *Op, Type *Ty,
53665366
Type *MidTy = CI->getType();
53675367
Type *DstTy = Ty;
53685368
if (Src->getType() == Ty) {
5369-
auto FirstOp = static_cast<Instruction::CastOps>(CI->getOpcode());
5369+
auto FirstOp = CI->getOpcode();
53705370
auto SecondOp = static_cast<Instruction::CastOps>(CastOpc);
53715371
Type *SrcIntPtrTy =
53725372
SrcTy->isPtrOrPtrVectorTy() ? Q.DL.getIntPtrType(SrcTy) : nullptr;

0 commit comments

Comments
 (0)