Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:Shr

961 /// FoldICmpShrCst - Handle "icmp(([al]shr X, cst1), cst2)".
962 Instruction *InstCombiner::FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *Shr,
977 if (ICI.isSigned() != (Shr->getOpcode() == Instruction::AShr))
983 if (Shr->getOpcode() == Instruction::AShr &&
984 (!Shr->isExact() || ShAmtVal == TypeBits - 1))
988 Worklist.Add(Shr);
991 ConstantInt::get(Shr->getType(), APInt::getOneBitSet(TypeBits, ShAmtVal));
994 Shr->getOpcode() == Instruction::AShr ?
995 Builder->CreateSDiv(Shr->getOperand(0), DivCst, "", Shr->isExact()) :
996 Builder->CreateUDiv(Shr->getOperand(0), DivCst, "", Shr->isExact());
1019 if (Shr->getOpcode() == Instruction::LShr)
1033 if (Shr->hasOneUse() && Shr->isExact())
1034 return new ICmpInst(ICI.getPredicate(), Shr->getOperand(0), ShiftedCmpRHS);
1036 if (Shr->hasOneUse()) {
1041 Value *And = Builder->CreateAnd(Shr->getOperand(0),
1042 Mask, Shr->getName()+".mask");
1202 // To test for the bad case of the signed shr, see if any
1505 case Instruction::LShr: // (icmp pred (shr X, ShAmt), CI)
1514 // Handle exact shr's.