[llvm] r359973 - Move Value *RHSCIOp def into the scope where its actually used. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun May 5 03:27:46 PDT 2019
Author: rksimon
Date: Sun May 5 03:27:45 2019
New Revision: 359973
URL: http://llvm.org/viewvc/llvm-project?rev=359973&view=rev
Log:
Move Value *RHSCIOp def into the scope where its actually used. NFCI.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=359973&r1=359972&r2=359973&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Sun May 5 03:27:45 2019
@@ -3822,7 +3822,6 @@ Instruction *InstCombiner::foldICmpWithC
Value *LHSCIOp = LHSCI->getOperand(0);
Type *SrcTy = LHSCIOp->getType();
Type *DestTy = LHSCI->getType();
- Value *RHSCIOp;
// Turn icmp (ptrtoint x), (ptrtoint/c) into a compare of the input if the
// integer type is the same size as the pointer type.
@@ -3864,7 +3863,7 @@ Instruction *InstCombiner::foldICmpWithC
if (auto *CI = dyn_cast<CastInst>(ICmp.getOperand(1))) {
// Not an extension from the same type?
- RHSCIOp = CI->getOperand(0);
+ Value *RHSCIOp = CI->getOperand(0);
if (RHSCIOp->getType() != LHSCIOp->getType())
return nullptr;
More information about the llvm-commits
mailing list