From 24db6b800fcdf0b45f1e2489ec3a7fb57937f0d1 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 28 Apr 2017 16:58:05 +0000 Subject: [APInt] Add clearSignBit method. Use it and setSignBit in a few places. NFCI llvm-svn: 301656 --- llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp index 2e2116c60e6..4f1f1949976 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp @@ -861,7 +861,7 @@ static bool checkRippleForAdd(const APInt &Op0KnownZero, // Find the most significant known 0 other than the sign bit. int BitWidth = Op0KnownZero.getBitWidth(); APInt Op0KnownZeroTemp(Op0KnownZero); - Op0KnownZeroTemp.clearBit(BitWidth - 1); + Op0KnownZeroTemp.clearSignBit(); int Op0ZeroPosition = BitWidth - Op0KnownZeroTemp.countLeadingZeros() - 1; int Op1OnePosition = BitWidth - Op1MaybeOne.countLeadingZeros() - 1; -- cgit v1.2.3