From: Craig Topper Date: Fri, 28 Apr 2017 21:48:03 +0000 (+0000) Subject: [ConstantRange] Use const references to prevent a couple APInt copies. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00cdeeedbab3bedd7450a6cb335c295821589866;p=llvm [ConstantRange] Use const references to prevent a couple APInt copies. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301694 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/IR/ConstantRange.cpp b/lib/IR/ConstantRange.cpp index 0cc38b02520..a58a64188c1 100644 --- a/lib/IR/ConstantRange.cpp +++ b/lib/IR/ConstantRange.cpp @@ -210,8 +210,8 @@ ConstantRange::makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp, -Other.getUnsignedMax())); if (NoWrapKind & OBO::NoSignedWrap) { - APInt SignedMin = Other.getSignedMin(); - APInt SignedMax = Other.getSignedMax(); + const APInt &SignedMin = Other.getSignedMin(); + const APInt &SignedMax = Other.getSignedMax(); if (SignedMax.isStrictlyPositive()) Result = SubsetIntersect(