From 80c540e656c536918b7c3d6966cf745358ce18b3 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 31 Mar 2012 18:14:00 +0000 Subject: Teach CodeGen's version of computeMaskedBits to understand the range metadata. This is the CodeGen equivalent of r153747. I tested that there is not noticeable performance difference with any combination of -O0/-O2 /-g when compiling gcc as a single compilation unit. llvm-svn: 153817 --- llvm/lib/Analysis/ValueTracking.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Analysis/ValueTracking.cpp') diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 17bad941e50..1784f008d5b 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -197,8 +197,8 @@ static void ComputeMaskedBitsMul(Value *Op0, Value *Op1, bool NSW, KnownOne.setBit(BitWidth - 1); } -static void computeMaskedBitsLoad(const MDNode &Ranges, const APInt &Mask, - APInt &KnownZero) { +void llvm::computeMaskedBitsLoad(const MDNode &Ranges, const APInt &Mask, + APInt &KnownZero) { unsigned BitWidth = Mask.getBitWidth(); unsigned NumRanges = Ranges.getNumOperands() / 2; assert(NumRanges >= 1); -- cgit v1.2.3