Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:Mask

335     //    [3:0] - zero mask for each 32-bit lane
346 // If all zero mask bits are set, this was just a weird way to
358 // If the zero mask is being used with a single input or the zero mask
366 // The zero mask may override the previous insert operation.
453 // Constant Fold - shift Index'th bit to lowest position and mask off
548 APInt Mask = APInt::getLowBitsSet(64, Length).shl(Index);
549 V00 = V00 & ~Mask;
574 /// The shuffle mask for a perm2*128 selects any two halves of two 256-bit
576 /// then ignore that half of the mask and clear that half of the vector.
596 // If both zero mask bits are set, this was just a weird way to
601 // If 0 or 1 zero mask bits are set, this is a simple shuffle.
619 // If needed, replace operands based on zero mask.
826 APInt Mask(APInt::getLowBitsSet(BitWidth, TrailingZeros));
827 if ((Mask & KnownZero) == Mask)
844 APInt Mask(APInt::getHighBitsSet(BitWidth, LeadingZeros));
845 if ((Mask & KnownZero) == Mask)
1344 // Convert blendv* to vector selects if the mask is constant.
1351 Value *Mask = II->getArgOperand(2);
1353 // fold (blend A, A, Mask) -> A
1357 // Zero Mask - select 1st argument.
1358 if (isa<ConstantAggregateZero>(Mask))
1361 // Constant Mask - select 1st/2nd argument lane based on top bit of mask.
1362 if (auto C = dyn_cast<ConstantDataVector>(Mask)) {
1364 auto SelectorType = cast<VectorType>(Mask->getType());
1391 // Turn pshufb(V1,mask) -> shuffle(V1,Zero,mask) if mask is a constant.
1396 "Unexpected number of elements in shuffle mask!");
1397 // Initialize the resulting shuffle mask to all zeroes.
1400 if (auto *Mask = dyn_cast<ConstantDataVector>(V)) {
1401 // Each byte in the shuffle control mask forms an index to permute the
1404 int8_t Index = Mask->getElementAsInteger(I);
1406 // control mask is set, then zero is written in the result byte.
1434 // Convert vpermil* to shufflevector if the mask is constant.
1454 // The _256 variants are a bit trickier since the mask bits always index
1495 // Turn vperm(V1,V2,mask) -> shuffle(V1,V2,mask) if mask is a constant.
1499 // the permutation mask with respect to 31 and reverse the order of
1501 if (Constant *Mask = dyn_cast<Constant>(II->getArgOperand(2))) {
1502 assert(Mask->getType()->getVectorNumElements() == 16 &&
1508 Constant *Elt = Mask->getAggregateElement(i);
1518 Mask->getType());
1520 Mask->getType());
1528 if (isa<UndefValue>(Mask->getAggregateElement(i)))
1531 cast<ConstantInt>(Mask->getAggregateElement(i))->getZExtValue();