[ConstantRange] Use const references to prevent a couple APInt copies. NFC
authorCraig Topper <craig.topper@gmail.com>
Fri, 28 Apr 2017 21:48:03 +0000 (21:48 +0000)
committerCraig Topper <craig.topper@gmail.com>
Fri, 28 Apr 2017 21:48:03 +0000 (21:48 +0000)
llvm-svn: 301694

llvm/lib/IR/ConstantRange.cpp

index 0cc38b0..a58a641 100644 (file)
@@ -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(