diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-04-28 03:36:24 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-04-28 03:36:24 +0000 |
commit | 24e71017aa3a062e6c2b055038ab9ed0ad2d35ae (patch) | |
tree | 461d640d885493861683e8350040434e9a912a74 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | f74d946624f30d60fd3f90a9545a455308931c32 (diff) | |
download | bcm5719-llvm-24e71017aa3a062e6c2b055038ab9ed0ad2d35ae.tar.gz bcm5719-llvm-24e71017aa3a062e6c2b055038ab9ed0ad2d35ae.zip |
[APInt] Use inplace shift methods where possible. NFCI
llvm-svn: 301612
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 439f67f1e15..7df762fee30 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2324,8 +2324,8 @@ void SelectionDAG::computeKnownBits(SDValue Op, APInt &KnownZero, if (const APInt *ShAmt = getValidShiftAmountConstant(Op)) { computeKnownBits(Op.getOperand(0), KnownZero, KnownOne, DemandedElts, Depth + 1); - KnownZero = KnownZero << *ShAmt; - KnownOne = KnownOne << *ShAmt; + KnownZero <<= *ShAmt; + KnownOne <<= *ShAmt; // Low bits are known zero. KnownZero.setLowBits(ShAmt->getZExtValue()); } @@ -4161,7 +4161,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, auto SignExtendInReg = [&](APInt Val, llvm::EVT ConstantVT) { unsigned FromBits = EVT.getScalarSizeInBits(); Val <<= Val.getBitWidth() - FromBits; - Val = Val.ashr(Val.getBitWidth() - FromBits); + Val.ashrInPlace(Val.getBitWidth() - FromBits); return getConstant(Val, DL, ConstantVT); }; |