summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-08-04 05:12:35 +0000
committerCraig Topper <craig.topper@intel.com>2017-08-04 05:12:35 +0000
commita86ca08d2624c887ddfd25c99f903ecb22d76e7b (patch)
tree1acdb46cf45212c83e5d59afa6a94999a5744456
parentba1e70e060aeab0b8cb97dc39fe2a8338cf72cf1 (diff)
downloadbcm5719-llvm-a86ca08d2624c887ddfd25c99f903ecb22d76e7b.tar.gz
bcm5719-llvm-a86ca08d2624c887ddfd25c99f903ecb22d76e7b.zip
[InstCombine] Remove unnecessary casts. NFC
We're calling an overload of getOpcode that already returns Instruction::CastOps. llvm-svn: 310024
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
index dfdfd3e9da8..e212cedca6e 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/llvm/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 =
OpenPOWER on IntegriCloud