Lines Matching refs:Shr
929 /// FoldICmpShrCst - Handle "icmp(([al]shr X, cst1), cst2)".
930 Instruction *InstCombiner::FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *Shr,
945 if (ICI.isSigned() != (Shr->getOpcode() == Instruction::AShr))
951 if (Shr->getOpcode() == Instruction::AShr &&
952 (!Shr->isExact() || ShAmtVal == TypeBits - 1))
956 Worklist.Add(Shr);
959 ConstantInt::get(Shr->getType(), APInt::getOneBitSet(TypeBits, ShAmtVal));
962 Shr->getOpcode() == Instruction::AShr ?
963 Builder->CreateSDiv(Shr->getOperand(0), DivCst, "", Shr->isExact()) :
964 Builder->CreateUDiv(Shr->getOperand(0), DivCst, "", Shr->isExact());
987 if (Shr->getOpcode() == Instruction::LShr)
1002 if (Shr->hasOneUse() && Shr->isExact())
1003 return new ICmpInst(ICI.getPredicate(), Shr->getOperand(0), ShiftedCmpRHS);
1005 if (Shr->hasOneUse()) {
1010 Value *And = Builder->CreateAnd(Shr->getOperand(0),
1011 Mask, Shr->getName()+".mask");
1161 // To test for the bad case of the signed shr, see if any
1357 case Instruction::LShr: // (icmp pred (shr X, ShAmt), CI)
1366 // Handle exact shr's.