• Home
  • Raw
  • Download

Lines Matching refs:Instruction

22 Instruction *InstCombiner::commonShiftTransforms(BinaryOperator &I) {  in commonShiftTransforms()
33 if (Instruction *R = FoldOpIntoSelect(I, SI)) in commonShiftTransforms()
37 if (Instruction *Res = FoldShiftByConstant(Op0, CUI, I)) in commonShiftTransforms()
74 Instruction *I = dyn_cast<Instruction>(V); in CanEvaluateShifted()
108 case Instruction::And: in CanEvaluateShifted()
109 case Instruction::Or: in CanEvaluateShifted()
110 case Instruction::Xor: in CanEvaluateShifted()
115 case Instruction::Shl: { in CanEvaluateShifted()
139 case Instruction::LShr: { in CanEvaluateShifted()
163 case Instruction::Select: { in CanEvaluateShifted()
168 case Instruction::PHI: { in CanEvaluateShifted()
198 Instruction *I = cast<Instruction>(V); in GetShiftedValue()
203 case Instruction::And: in GetShiftedValue()
204 case Instruction::Or: in GetShiftedValue()
205 case Instruction::Xor: in GetShiftedValue()
211 case Instruction::Shl: { in GetShiftedValue()
237 if (Instruction *VI = dyn_cast<Instruction>(V)) { in GetShiftedValue()
253 case Instruction::LShr: { in GetShiftedValue()
277 if (Instruction *VI = dyn_cast<Instruction>(V)) { in GetShiftedValue()
293 case Instruction::Select: in GetShiftedValue()
297 case Instruction::PHI: { in GetShiftedValue()
312 Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1, in FoldShiftByConstant()
314 bool isLeftShift = I.getOpcode() == Instruction::Shl; in FoldShiftByConstant()
319 if (I.getOpcode() != Instruction::AShr && in FoldShiftByConstant()
337 if (I.getOpcode() != Instruction::AShr) in FoldShiftByConstant()
346 if (BO->getOpcode() == Instruction::Mul && isLeftShift) in FoldShiftByConstant()
353 if (Instruction *R = FoldOpIntoSelect(I, SI)) in FoldShiftByConstant()
356 if (Instruction *NV = FoldOpIntoPhi(I)) in FoldShiftByConstant()
361 Instruction *TrOp = dyn_cast<Instruction>(TI->getOperand(0)); in FoldShiftByConstant()
386 if (I.getOpcode() == Instruction::Shl) in FoldShiftByConstant()
389 assert(I.getOpcode() == Instruction::LShr && "Unknown logical shift"); in FoldShiftByConstant()
410 case Instruction::Add: in FoldShiftByConstant()
411 case Instruction::And: in FoldShiftByConstant()
412 case Instruction::Or: in FoldShiftByConstant()
413 case Instruction::Xor: { in FoldShiftByConstant()
447 case Instruction::Sub: { in FoldShiftByConstant()
491 case Instruction::Add: in FoldShiftByConstant()
494 case Instruction::Or: in FoldShiftByConstant()
495 case Instruction::Xor: in FoldShiftByConstant()
498 case Instruction::And: in FoldShiftByConstant()
509 if (isValid && I.getOpcode() == Instruction::AShr) in FoldShiftByConstant()
547 if (I.getOpcode() != Instruction::AShr) in FoldShiftByConstant()
558 if (I.getOpcode() == Instruction::Shl && in FoldShiftByConstant()
559 ShiftOp->getOpcode() != Instruction::Shl) { in FoldShiftByConstant()
565 if (I.getOpcode() == Instruction::LShr && in FoldShiftByConstant()
566 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()
575 if (I.getOpcode() == Instruction::Shl && in FoldShiftByConstant()
576 ShiftOp->getOpcode() != Instruction::Shl) { in FoldShiftByConstant()
577 assert(ShiftOp->getOpcode() == Instruction::LShr || in FoldShiftByConstant()
578 ShiftOp->getOpcode() == Instruction::AShr); in FoldShiftByConstant()
582 BinaryOperator *NewShl = BinaryOperator::Create(Instruction::Shl, in FoldShiftByConstant()
596 if (I.getOpcode() == Instruction::LShr && in FoldShiftByConstant()
597 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()
601 BinaryOperator *NewLShr = BinaryOperator::Create(Instruction::LShr, in FoldShiftByConstant()
615 if (I.getOpcode() == Instruction::AShr && in FoldShiftByConstant()
616 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()
620 BinaryOperator *NewAShr = BinaryOperator::Create(Instruction::AShr, in FoldShiftByConstant()
631 if (I.getOpcode() == Instruction::Shl && in FoldShiftByConstant()
632 ShiftOp->getOpcode() != Instruction::Shl) { in FoldShiftByConstant()
649 if (I.getOpcode() == Instruction::LShr && in FoldShiftByConstant()
650 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()
654 BinaryOperator *NewShl = BinaryOperator::Create(Instruction::Shl, in FoldShiftByConstant()
668 if (I.getOpcode() == Instruction::AShr && in FoldShiftByConstant()
669 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()
673 BinaryOperator *NewShl = BinaryOperator::Create(Instruction::Shl, in FoldShiftByConstant()
684 Instruction *InstCombiner::visitShl(BinaryOperator &I) { in visitShl()
690 if (Instruction *V = commonShiftTransforms(I)) in visitShl()
722 Instruction *InstCombiner::visitLShr(BinaryOperator &I) { in visitLShr()
727 if (Instruction *R = commonShiftTransforms(I)) in visitLShr()
762 Instruction *InstCombiner::visitAShr(BinaryOperator &I) { in visitAShr()
767 if (Instruction *R = commonShiftTransforms(I)) in visitAShr()