Lines Matching refs:ShAmtVal

2504   unsigned ShAmtVal = ShiftAmtC->getLimitedValue(TypeBits);  in foldICmpShrConstant()  local
2505 if (ShAmtVal >= TypeBits || ShAmtVal == 0) in foldICmpShrConstant()
2516 (C - 1).isPowerOf2() && C.countLeadingZeros() > ShAmtVal) { in foldICmpShrConstant()
2522 APInt ShiftedC = (C - 1).shl(ShAmtVal) + 1; in foldICmpShrConstant()
2529 APInt ShiftedC = C.shl(ShAmtVal); in foldICmpShrConstant()
2530 if (ShiftedC.ashr(ShAmtVal) == C) in foldICmpShrConstant()
2535 APInt ShiftedC = (C + 1).shl(ShAmtVal) - 1; in foldICmpShrConstant()
2536 if (!C.isMaxSignedValue() && !(C + 1).shl(ShAmtVal).isMinSignedValue() && in foldICmpShrConstant()
2537 (ShiftedC + 1).ashr(ShAmtVal) == (C + 1)) in foldICmpShrConstant()
2544 APInt ShiftedC = (C + 1).shl(ShAmtVal) - 1; in foldICmpShrConstant()
2545 if ((ShiftedC + 1).ashr(ShAmtVal) == (C + 1) || in foldICmpShrConstant()
2546 (C + 1).shl(ShAmtVal).isMinSignedValue()) in foldICmpShrConstant()
2554 if (C.getBitWidth() > 2 && C.getNumSignBits() <= ShAmtVal) { in foldICmpShrConstant()
2568 APInt ShiftedC = C.shl(ShAmtVal); in foldICmpShrConstant()
2569 if (ShiftedC.lshr(ShAmtVal) == C) in foldICmpShrConstant()
2574 APInt ShiftedC = (C + 1).shl(ShAmtVal) - 1; in foldICmpShrConstant()
2575 if ((ShiftedC + 1).lshr(ShAmtVal) == (C + 1)) in foldICmpShrConstant()
2588 assert(((IsAShr && C.shl(ShAmtVal).ashr(ShAmtVal) == C) || in foldICmpShrConstant()
2589 (!IsAShr && C.shl(ShAmtVal).lshr(ShAmtVal) == C)) && in foldICmpShrConstant()
2595 return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, C << ShAmtVal)); in foldICmpShrConstant()
2601 ConstantInt::get(ShrTy, (C + 1).shl(ShAmtVal))); in foldICmpShrConstant()
2604 ConstantInt::get(ShrTy, (C + 1).shl(ShAmtVal) - 1)); in foldICmpShrConstant()
2610 APInt Val(APInt::getHighBitsSet(TypeBits, TypeBits - ShAmtVal)); in foldICmpShrConstant()
2613 return new ICmpInst(Pred, And, ConstantInt::get(ShrTy, C << ShAmtVal)); in foldICmpShrConstant()