diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-04-20 16:56:25 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-04-20 16:56:25 +0000 |
commit | bcfd2d1789e6709dfd585521ac599ae49091a6e8 (patch) | |
tree | 1b6909c06a2be947e3583c44ba16be0d8e5ee75f /llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp | |
parent | 20f2b01222a1e56b360a80d78a371fa063abfdbf (diff) | |
download | bcm5719-llvm-bcfd2d1789e6709dfd585521ac599ae49091a6e8.tar.gz bcm5719-llvm-bcfd2d1789e6709dfd585521ac599ae49091a6e8.zip |
[APInt] Rename getSignBit to getSignMask
getSignBit is a static function that creates an APInt with only the sign bit set. getSignMask seems like a better name to convey its functionality. In fact several places use it and then store in an APInt named SignMask.
Differential Revision: https://reviews.llvm.org/D32108
llvm-svn: 300856
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp index 2d93e80fc13..ce66581a491 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp @@ -1237,7 +1237,7 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) { // If the sign bits of both operands are zero (i.e. we can prove they are // unsigned inputs), turn this into a udiv. - APInt Mask(APInt::getSignBit(I.getType()->getScalarSizeInBits())); + APInt Mask(APInt::getSignMask(I.getType()->getScalarSizeInBits())); if (MaskedValueIsZero(Op0, Mask, 0, &I)) { if (MaskedValueIsZero(Op1, Mask, 0, &I)) { // X sdiv Y -> X udiv Y, iff X and Y don't have sign bit set @@ -1543,7 +1543,7 @@ Instruction *InstCombiner::visitSRem(BinaryOperator &I) { // If the sign bits of both operands are zero (i.e. we can prove they are // unsigned inputs), turn this into a urem. - APInt Mask(APInt::getSignBit(I.getType()->getScalarSizeInBits())); + APInt Mask(APInt::getSignMask(I.getType()->getScalarSizeInBits())); if (MaskedValueIsZero(Op1, Mask, 0, &I) && MaskedValueIsZero(Op0, Mask, 0, &I)) { // X srem Y -> X urem Y, iff X and Y don't have sign bit set |