From 72235d084dceac9126d793bb0bd8c1a07a050f16 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 28 Apr 2017 21:48:03 +0000 Subject: [PATCH] [ConstantRange] Use const references to prevent a couple APInt copies. NFC llvm-svn: 301694 --- llvm/lib/IR/ConstantRange.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp index 0cc38b0..a58a641 100644 --- a/llvm/lib/IR/ConstantRange.cpp +++ b/llvm/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( -- 2.7.4