diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-05 10:27:45 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-05 10:27:45 +0000 |
| commit | 7a2e855a0fecaa172a296e5bdfb37c472c288eb1 (patch) | |
| tree | 9eb0933ca56c69291bcaa8c982346e3b71189f1a /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | |
| parent | fd254e429ea103be8bab6271855c04919d33f9fb (diff) | |
| download | bcm5719-llvm-7a2e855a0fecaa172a296e5bdfb37c472c288eb1.tar.gz bcm5719-llvm-7a2e855a0fecaa172a296e5bdfb37c472c288eb1.zip | |
Move Value *RHSCIOp def into the scope where its actually used. NFCI.
llvm-svn: 359973
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 7880067401f..ef72f3bbb72 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -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; |

