Lines Matching full:eltsize
3888 // range [0, EltSize), Neg == (Pos == 0 ? 0 : EltSize - Pos). This means that
3894 // in direction shift1 by Neg. The range [0, EltSize) means that we only need
3896 static bool matchRotateSub(SDValue Pos, SDValue Neg, unsigned EltSize) {
3897 // If EltSize is a power of 2 then:
3899 // (a) (Pos == 0 ? 0 : EltSize - Pos) == (EltSize - Pos) & (EltSize - 1)
3900 // (b) Neg == Neg & (EltSize - 1) whenever Neg is in [0, EltSize).
3902 // So if EltSize is a power of 2 and Neg is (and Neg', EltSize-1), we check
3905 // Neg & (EltSize - 1) == (EltSize - Pos) & (EltSize - 1) [A]
3907 // for all Neg and Pos. Since Neg & (EltSize - 1) == Neg' & (EltSize - 1)
3912 // Neg == EltSize - Pos [B]
3915 // behavior if Pos == 0 (and consequently Neg == EltSize).
3917 // We could actually use [A] whenever EltSize is a power of 2, but the
3920 // EltSize == 32, using [A] would allow a Neg of the form (sub 64, Pos)
3927 // Below, Mask == EltSize - 1 when using [A] and is all-ones otherwise.
3929 if (Neg.getOpcode() == ISD::AND && isPowerOf2_64(EltSize)) {
3931 if (NegC->getAPIntValue() == EltSize - 1) {
3933 MaskLoBits = Log2_64(EltSize);
3946 // On the RHS of [A], if Pos is Pos' & (EltSize - 1), just replace Pos with
3950 if (PosC->getAPIntValue() == EltSize - 1)
3955 // (NegC - NegOp1) & Mask == (EltSize - Pos) & Mask
3959 // EltSize & Mask == NegC & Mask
3969 // (NegC - NegOp1) & Mask == (EltSize - (NegOp1 + PosC)) & Mask
3973 // NegC & Mask == (EltSize - PosC) & Mask
3974 // EltSize & Mask == (NegC + PosC) & Mask
3983 // Now we just need to check that EltSize & Mask == Width & Mask.
3985 // EltSize & Mask is 0 since Mask is EltSize - 1.
3987 return Width == EltSize;
14234 unsigned EltSize = (unsigned)TD.getTypeAllocSize(Elts[0]->getType());
14235 SDValue One = DAG.getIntPtrConstant(EltSize, SDLoc(FV));