diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-07-07 14:39:26 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-07-07 14:39:26 +0000 |
commit | 1bbdf4e11a6cc876a8a3dc3f0170f06afe95529b (patch) | |
tree | 703804cac01c7af9b4c35692e9895639edffdb22 /llvm/lib/Analysis/DemandedBits.cpp | |
parent | b2d24e23cec654746ee38846b1daae05bfa91c4c (diff) | |
download | bcm5719-llvm-1bbdf4e11a6cc876a8a3dc3f0170f06afe95529b.tar.gz bcm5719-llvm-1bbdf4e11a6cc876a8a3dc3f0170f06afe95529b.zip |
[DemandedBits] fix formatting; NFC
llvm-svn: 307403
Diffstat (limited to 'llvm/lib/Analysis/DemandedBits.cpp')
-rw-r--r-- | llvm/lib/Analysis/DemandedBits.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/llvm/lib/Analysis/DemandedBits.cpp b/llvm/lib/Analysis/DemandedBits.cpp index 926b28d6094..9c53f9140ca 100644 --- a/llvm/lib/Analysis/DemandedBits.cpp +++ b/llvm/lib/Analysis/DemandedBits.cpp @@ -143,9 +143,8 @@ void DemandedBits::determineLiveOperandBits( break; case Instruction::Shl: if (OperandNo == 0) - if (ConstantInt *CI = - dyn_cast<ConstantInt>(UserI->getOperand(1))) { - uint64_t ShiftAmt = CI->getLimitedValue(BitWidth-1); + if (auto *ShiftAmtC = dyn_cast<ConstantInt>(UserI->getOperand(1))) { + uint64_t ShiftAmt = ShiftAmtC->getLimitedValue(BitWidth - 1); AB = AOut.lshr(ShiftAmt); // If the shift is nuw/nsw, then the high bits are not dead @@ -159,9 +158,8 @@ void DemandedBits::determineLiveOperandBits( break; case Instruction::LShr: if (OperandNo == 0) - if (ConstantInt *CI = - dyn_cast<ConstantInt>(UserI->getOperand(1))) { - uint64_t ShiftAmt = CI->getLimitedValue(BitWidth-1); + if (auto *ShiftAmtC = dyn_cast<ConstantInt>(UserI->getOperand(1))) { + uint64_t ShiftAmt = ShiftAmtC->getLimitedValue(BitWidth - 1); AB = AOut.shl(ShiftAmt); // If the shift is exact, then the low bits are not dead @@ -172,9 +170,8 @@ void DemandedBits::determineLiveOperandBits( break; case Instruction::AShr: if (OperandNo == 0) - if (ConstantInt *CI = - dyn_cast<ConstantInt>(UserI->getOperand(1))) { - uint64_t ShiftAmt = CI->getLimitedValue(BitWidth-1); + if (auto *ShiftAmtC = dyn_cast<ConstantInt>(UserI->getOperand(1))) { + uint64_t ShiftAmt = ShiftAmtC->getLimitedValue(BitWidth - 1); AB = AOut.shl(ShiftAmt); // Because the high input bit is replicated into the // high-order bits of the result, if we need any of those |