Lines Matching refs:getOpcode
72 bool IsSecondShiftLeft = SecondShift->getOpcode() == Instruction::Shl; in canEvaluateShiftedShift()
153 switch (I->getOpcode()) { in CanEvaluateShifted()
205 switch (I->getOpcode()) { in GetShiftedValue()
324 bool isLeftShift = I.getOpcode() == Instruction::Shl; in FoldShiftByConstant()
339 if (I.getOpcode() != Instruction::AShr && in FoldShiftByConstant()
357 if (BO->getOpcode() == Instruction::Mul && isLeftShift) in FoldShiftByConstant()
383 Value *NSh = Builder->CreateBinOp(I.getOpcode(), TrOp, ShAmt,I.getName()); in FoldShiftByConstant()
397 if (I.getOpcode() == Instruction::Shl) in FoldShiftByConstant()
400 assert(I.getOpcode() == Instruction::LShr && "Unknown logical shift"); in FoldShiftByConstant()
419 switch (Op0BO->getOpcode()) { in FoldShiftByConstant()
433 Value *X = Builder->CreateBinOp(Op0BO->getOpcode(), YS, V1, in FoldShiftByConstant()
456 return BinaryOperator::Create(Op0BO->getOpcode(), YS, XM); in FoldShiftByConstant()
469 Value *X = Builder->CreateBinOp(Op0BO->getOpcode(), V1, YS, in FoldShiftByConstant()
491 return BinaryOperator::Create(Op0BO->getOpcode(), XM, YS); in FoldShiftByConstant()
505 switch (Op0BO->getOpcode()) { in FoldShiftByConstant()
525 if (isValid && I.getOpcode() == Instruction::AShr) in FoldShiftByConstant()
529 Constant *NewRHS = ConstantExpr::get(I.getOpcode(), Op0C, Op1); in FoldShiftByConstant()
532 Builder->CreateBinOp(I.getOpcode(), Op0BO->getOperand(0), Op1); in FoldShiftByConstant()
535 return BinaryOperator::Create(Op0BO->getOpcode(), NewShift, in FoldShiftByConstant()
571 if (I.getOpcode() == ShiftOp->getOpcode()) { in FoldShiftByConstant()
576 if (I.getOpcode() != Instruction::AShr) in FoldShiftByConstant()
581 return BinaryOperator::Create(I.getOpcode(), X, in FoldShiftByConstant()
587 if (I.getOpcode() == Instruction::LShr && in FoldShiftByConstant()
588 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()
599 if (I.getOpcode() == Instruction::Shl && in FoldShiftByConstant()
600 ShiftOp->getOpcode() != Instruction::Shl && in FoldShiftByConstant()
602 assert(ShiftOp->getOpcode() == Instruction::LShr || in FoldShiftByConstant()
603 ShiftOp->getOpcode() == Instruction::AShr); in FoldShiftByConstant()
613 if (I.getOpcode() == Instruction::LShr && in FoldShiftByConstant()
614 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()
632 if (I.getOpcode() == Instruction::AShr && in FoldShiftByConstant()
633 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()
650 if (I.getOpcode() == Instruction::Shl && in FoldShiftByConstant()
651 ShiftOp->getOpcode() != Instruction::Shl && in FoldShiftByConstant()
654 BinaryOperator *NewShr = BinaryOperator::Create(ShiftOp->getOpcode(), in FoldShiftByConstant()
661 if (I.getOpcode() == Instruction::LShr && in FoldShiftByConstant()
662 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()
680 if (I.getOpcode() == Instruction::AShr && in FoldShiftByConstant()
681 ShiftOp->getOpcode() == Instruction::Shl) { in FoldShiftByConstant()