Home | History | Annotate | Download | only in InstCombine

Lines Matching full:instruction

21 Instruction *InstCombiner::commonShiftTransforms(BinaryOperator &I) {
32 if (Instruction *R = FoldOpIntoSelect(I, SI))
36 if (Instruction *Res = FoldShiftByConstant(Op0, CUI, I))
73 Instruction *I = dyn_cast<Instruction>(V);
102 // require duplicating the instruction in general, which isn't profitable.
107 case Instruction::And:
108 case Instruction::Or:
109 case Instruction::Xor:
114 case Instruction::Shl: {
138 case Instruction::LShr: {
162 case Instruction::Select: {
167 case Instruction::PHI: {
196 Instruction *I = cast<Instruction>(V);
201 case Instruction::And:
202 case Instruction::Or:
203 case Instruction::Xor:
209 case Instruction::Shl: {
232 if (Instruction *VI = dyn_cast<Instruction>(V)) {
246 case Instruction::LShr: {
268 if (Instruction *VI = dyn_cast<Instruction>(V)) {
283 case Instruction::Select:
287 case Instruction::PHI: {
302 Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
304 bool isLeftShift = I.getOpcode() == Instruction::Shl;
309 if (I.getOpcode() != Instruction::AShr &&
319 // See if we can simplify any instructions used by the instruction whose sole
327 if (I.getOpcode() != Instruction::AShr)
336 if (BO->getOpcode() == Instruction::Mul && isLeftShift)
343 if (Instruction *R = FoldOpIntoSelect(I, SI))
346 if (Instruction *NV = FoldOpIntoPhi(I))
351 Instruction *TrOp = dyn_cast<Instruction>(TI->getOperand(0));
376 if (I.getOpcode() == Instruction::Shl)
379 assert(I.getOpcode() == Instruction::LShr && "Unknown logical shift");
400 case Instruction::Add:
401 case Instruction::And:
402 case Instruction::Or:
403 case Instruction::Xor: {
437 case Instruction::Sub: {
481 case Instruction::Add:
484 case Instruction::Or:
485 case Instruction::Xor:
488 case Instruction::And:
499 if (isValid && I.getOpcode() == Instruction::AShr)
538 if (I.getOpcode() != Instruction::AShr)
549 if (I.getOpcode() == Instruction::Shl &&
550 ShiftOp->getOpcode() != Instruction::Shl) {
556 if (I.getOpcode() == Instruction::LShr &&
557 ShiftOp->getOpcode() == Instruction::Shl) {
566 if (I.getOpcode() == Instruction::Shl &&
567 ShiftOp->getOpcode() != Instruction::Shl) {
568 assert(ShiftOp->getOpcode() == Instruction::LShr ||
569 ShiftOp->getOpcode() == Instruction::AShr);
578 if (I.getOpcode() == Instruction::LShr &&
579 ShiftOp->getOpcode() == Instruction::Shl) {
580 assert(ShiftOp->getOpcode() == Instruction::Shl);
594 if (I.getOpcode() == Instruction::Shl &&
595 ShiftOp->getOpcode() != Instruction::Shl) {
605 if (I.getOpcode() == Instruction::LShr &&
606 ShiftOp->getOpcode() == Instruction::Shl) {
620 Instruction *InstCombiner::visitShl(BinaryOperator &I) {
626 if (Instruction *V = commonShiftTransforms(I))
658 Instruction *InstCombiner::visitLShr(BinaryOperator &I) {
663 if (Instruction *R = commonShiftTransforms(I))
698 Instruction *InstCombiner::visitAShr(BinaryOperator &I) {
703 if (Instruction *R = commonShiftTransforms(I))