Move Value *RHSCIOp def into the scope where its actually used. NFCI.

llvm-svn: 359973
This commit is contained in:
Simon Pilgrim 2019-05-05 10:27:45 +00:00
parent fd254e429e
commit 7a2e855a0f
1 changed files with 1 additions and 2 deletions

View File

@ -3822,7 +3822,6 @@ Instruction *InstCombiner::foldICmpWithCastAndCast(ICmpInst &ICmp) {
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::foldICmpWithCastAndCast(ICmpInst &ICmp) {
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;