llvm.org GIT mirror llvm / f220841
[SelectionDAG] computeKnownBits - remove some duplicate/shadow variables. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359872 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 1 year, 4 months ago
1 changed file(s) with 4 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
30583058 case ISD::EXTRACT_ELEMENT: {
30593059 Known = computeKnownBits(Op.getOperand(0), Depth+1);
30603060 const unsigned Index = Op.getConstantOperandVal(1);
3061 const unsigned BitWidth = Op.getValueSizeInBits();
3061 const unsigned EltBitWidth = Op.getValueSizeInBits();
30623062
30633063 // Remove low part of known bits mask
3064 Known.Zero = Known.Zero.getHiBits(Known.Zero.getBitWidth() - Index * BitWidth);
3065 Known.One = Known.One.getHiBits(Known.One.getBitWidth() - Index * BitWidth);
3064 Known.Zero = Known.Zero.getHiBits(Known.getBitWidth() - Index * EltBitWidth);
3065 Known.One = Known.One.getHiBits(Known.getBitWidth() - Index * EltBitWidth);
30663066
30673067 // Remove high part of known bit mask
3068 Known = Known.trunc(BitWidth);
3068 Known = Known.trunc(EltBitWidth);
30693069 break;
30703070 }
30713071 case ISD::EXTRACT_VECTOR_ELT: {
30723072 SDValue InVec = Op.getOperand(0);
30733073 SDValue EltNo = Op.getOperand(1);
30743074 EVT VecVT = InVec.getValueType();
3075 const unsigned BitWidth = Op.getValueSizeInBits();
30763075 const unsigned EltBitWidth = VecVT.getScalarSizeInBits();
30773076 const unsigned NumSrcElts = VecVT.getVectorNumElements();
30783077 // If BitWidth > EltBitWidth the value is anyext:ed. So we do not know
36693668 SDValue InVec = Op.getOperand(0);
36703669 SDValue InVal = Op.getOperand(1);
36713670 SDValue EltNo = Op.getOperand(2);
3672 unsigned NumElts = InVec.getValueType().getVectorNumElements();
36733671
36743672 ConstantSDNode *CEltNo = dyn_cast(EltNo);
36753673 if (CEltNo && CEltNo->getAPIntValue().ult(NumElts)) {