mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-01 18:12:49 +00:00
Use SDValue::getConstantOperandVal() helper. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285025 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ea1ab92227
commit
e83b8beed2
@ -2423,8 +2423,7 @@ void SelectionDAG::computeKnownBits(SDValue Op, APInt &KnownZero,
|
||||
}
|
||||
case ISD::EXTRACT_ELEMENT: {
|
||||
computeKnownBits(Op.getOperand(0), KnownZero, KnownOne, Depth+1);
|
||||
const unsigned Index =
|
||||
cast<ConstantSDNode>(Op.getOperand(1))->getZExtValue();
|
||||
const unsigned Index = Op.getConstantOperandVal(1);
|
||||
const unsigned BitWidth = Op.getValueSizeInBits();
|
||||
|
||||
// Remove low part of known bits mask
|
||||
@ -2716,8 +2715,7 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, unsigned Depth) const {
|
||||
|
||||
// Get reverse index (starting from 1), Op1 value indexes elements from
|
||||
// little end. Sign starts at big end.
|
||||
const int rIndex = Items - 1 -
|
||||
cast<ConstantSDNode>(Op.getOperand(1))->getZExtValue();
|
||||
const int rIndex = Items - 1 - Op.getConstantOperandVal(1);
|
||||
|
||||
// If the sign portion ends in our element the subtraction gives correct
|
||||
// result. Otherwise it gives either negative or > bitwidth result
|
||||
|
Loading…
x
Reference in New Issue
Block a user