diff options
| author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-10-02 00:09:57 +0000 |
|---|---|---|
| committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-10-02 00:09:57 +0000 |
| commit | 1f7b813e2b32e72136050558b60f5d90ae2ee4b2 (patch) | |
| tree | 61202fb56915a7ff483e3f765ed4350b2d9d9694 /llvm/lib/Transforms/InstCombine | |
| parent | 1b9cefcf03f24af282a9bfc73f33b4f160aa7fec (diff) | |
| download | bcm5719-llvm-1f7b813e2b32e72136050558b60f5d90ae2ee4b2.tar.gz bcm5719-llvm-1f7b813e2b32e72136050558b60f5d90ae2ee4b2.zip | |
Remove duplicated code; NFC
ICmpInst::makeConstantRange does exactly the same thing as
ConstantRange::makeExactICmpRegion.
llvm-svn: 283059
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 9889930ea5f..7b59f86d1ea 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -2320,7 +2320,8 @@ Instruction *InstCombiner::foldICmpAddConstant(ICmpInst &Cmp, // Fold icmp pred (add X, C2), C. Value *X = Add->getOperand(0); Type *Ty = Add->getType(); - auto CR = Cmp.makeConstantRange(Cmp.getPredicate(), *C).subtract(*C2); + auto CR = + ConstantRange::makeExactICmpRegion(Cmp.getPredicate(), *C).subtract(*C2); const APInt &Upper = CR.getUpper(); const APInt &Lower = CR.getLower(); if (Cmp.isSigned()) { |

