Lines Matching refs:Shr
901 Instruction *InstCombiner::FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *Shr, in FoldICmpShrCst() argument
916 if (ICI.isSigned() != (Shr->getOpcode() == Instruction::AShr)) in FoldICmpShrCst()
922 if (Shr->getOpcode() == Instruction::AShr && in FoldICmpShrCst()
923 (!Shr->isExact() || ShAmtVal == TypeBits - 1)) in FoldICmpShrCst()
927 Worklist.Add(Shr); in FoldICmpShrCst()
930 ConstantInt::get(Shr->getType(), APInt::getOneBitSet(TypeBits, ShAmtVal)); in FoldICmpShrCst()
933 Shr->getOpcode() == Instruction::AShr ? in FoldICmpShrCst()
934 Builder->CreateSDiv(Shr->getOperand(0), DivCst, "", Shr->isExact()) : in FoldICmpShrCst()
935 Builder->CreateUDiv(Shr->getOperand(0), DivCst, "", Shr->isExact()); in FoldICmpShrCst()
958 if (Shr->getOpcode() == Instruction::LShr) in FoldICmpShrCst()
973 if (Shr->hasOneUse() && Shr->isExact()) in FoldICmpShrCst()
974 return new ICmpInst(ICI.getPredicate(), Shr->getOperand(0), ShiftedCmpRHS); in FoldICmpShrCst()
976 if (Shr->hasOneUse()) { in FoldICmpShrCst()
981 Value *And = Builder->CreateAnd(Shr->getOperand(0), in FoldICmpShrCst()
982 Mask, Shr->getName()+".mask"); in FoldICmpShrCst()