From 28374e9334404820ce408abff1f3a9796863f90f Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 4 Aug 2017 05:12:35 +0000 Subject: [PATCH] [InstCombine] Remove unnecessary casts. NFC We're calling an overload of getOpcode that already returns Instruction::CastOps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310024 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineCasts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/InstCombine/InstCombineCasts.cpp b/lib/Transforms/InstCombine/InstCombineCasts.cpp index dfdfd3e9da8..e212cedca6e 100644 --- a/lib/Transforms/InstCombine/InstCombineCasts.cpp +++ b/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -235,8 +235,8 @@ Instruction::CastOps InstCombiner::isEliminableCastPair(const CastInst *CI1, Type *MidTy = CI1->getDestTy(); Type *DstTy = CI2->getDestTy(); - Instruction::CastOps firstOp = Instruction::CastOps(CI1->getOpcode()); - Instruction::CastOps secondOp = Instruction::CastOps(CI2->getOpcode()); + Instruction::CastOps firstOp = CI1->getOpcode(); + Instruction::CastOps secondOp = CI2->getOpcode(); Type *SrcIntPtrTy = SrcTy->isPtrOrPtrVectorTy() ? DL.getIntPtrType(SrcTy) : nullptr; Type *MidIntPtrTy = -- 2.50.1