Lines Matching defs:ShAmt
510 Value *ShAmt = matchShiftAmount(ShAmt0, ShAmt1, NarrowWidth);
512 if (!ShAmt) {
513 ShAmt = matchShiftAmount(ShAmt1, ShAmt0, NarrowWidth);
516 if (!ShAmt)
526 // Adjust the width of ShAmt for narrowed funnel shift operation:
527 // - Zero-extend if ShAmt is narrower than the destination type.
528 // - Truncate if ShAmt is wider, discarding non-significant high-order bits.
529 // This prepares ShAmt for llvm.fshl.i8(trunc(ShVal), trunc(ShVal),
530 // zext/trunc(ShAmt)).
531 Value *NarrowShAmt = Builder.CreateZExtOrTrunc(ShAmt, DestTy);
605 if (Constant *ShAmt = ConstantFoldIntegerCast(C, A->getType(),
607 ShAmt = Constant::mergeUndefsWith(ShAmt, C);
610 ? Builder.CreateAShr(A, ShAmt, OldShift->getName(), IsExact)
611 : Builder.CreateLShr(A, ShAmt, OldShift->getName(), IsExact);
799 Constant *ShAmt = ConstantFoldSelectInstruction(Cmp, C, MaxAmt);
800 return ConstantFoldCastOperand(Instruction::Trunc, ShAmt, A->getType(),
806 Constant *ShAmt = GetNewShAmt(DestWidth);
807 ShAmt = Constant::mergeUndefsWith(ShAmt, C);
808 return IsExact ? BinaryOperator::CreateExactAShr(A, ShAmt)
809 : BinaryOperator::CreateAShr(A, ShAmt);
814 Constant *ShAmt = GetNewShAmt(AWidth);
815 Value *Shift = Builder.CreateAShr(A, ShAmt, "", IsExact);
961 uint32_t ShAmt = KnownZeroMask.logBase2();
963 (Zext.getType()->getScalarSizeInBits() != ShAmt + 1);
966 Cmp->getPredicate() == ICmpInst::ICMP_NE || ShAmt == 0)) {
968 if (ShAmt) {
971 In = Builder.CreateLShr(In, ConstantInt::get(In->getType(), ShAmt),
990 // zext (icmp eq (and X, (1 << ShAmt)), 0) --> and (lshr (not X), ShAmt), 1
991 // zext (icmp ne (and X, (1 << ShAmt)), 0) --> and (lshr X, ShAmt), 1
992 Value *X, *ShAmt;
995 m_OneUse(m_c_And(m_Shl(m_One(), m_Value(ShAmt)), m_Value(X))))) {
998 Value *Lshr = Builder.CreateLShr(X, ShAmt);
1465 Value *ShAmt = ConstantInt::get(DestTy, DestBitSize-SrcBitSize);
1466 return BinaryOperator::CreateAShr(Builder.CreateShl(Res, ShAmt, "sext"),
1467 ShAmt);
1481 Constant *ShAmt = ConstantInt::get(DestTy, DestBitSize - SrcBitSize);
1482 return BinaryOperator::CreateAShr(Builder.CreateShl(X, ShAmt), ShAmt);