[llvm] r310024 - [InstCombine] Remove unnecessary casts. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 3 22:12:35 PDT 2017
Author: ctopper
Date: Thu Aug 3 22:12:35 2017
New Revision: 310024
URL: http://llvm.org/viewvc/llvm-project?rev=310024&view=rev
Log:
[InstCombine] Remove unnecessary casts. NFC
We're calling an overload of getOpcode that already returns Instruction::CastOps.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=310024&r1=310023&r2=310024&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Thu Aug 3 22:12:35 2017
@@ -235,8 +235,8 @@ Instruction::CastOps InstCombiner::isEli
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 =
More information about the llvm-commits
mailing list