Lines Matching refs:Shl
929 static BinaryOperator *ConvertShiftToMul(Instruction *Shl) { in ConvertShiftToMul() argument
930 Constant *MulCst = ConstantInt::get(Shl->getType(), 1); in ConvertShiftToMul()
931 MulCst = ConstantExpr::getShl(MulCst, cast<Constant>(Shl->getOperand(1))); in ConvertShiftToMul()
934 BinaryOperator::CreateMul(Shl->getOperand(0), MulCst, "", Shl); in ConvertShiftToMul()
935 Shl->setOperand(0, UndefValue::get(Shl->getType())); // Drop use of op. in ConvertShiftToMul()
936 Mul->takeName(Shl); in ConvertShiftToMul()
939 Shl->replaceAllUsesWith(Mul); in ConvertShiftToMul()
940 Mul->setDebugLoc(Shl->getDebugLoc()); in ConvertShiftToMul()
945 bool NSW = cast<BinaryOperator>(Shl)->hasNoSignedWrap(); in ConvertShiftToMul()
946 bool NUW = cast<BinaryOperator>(Shl)->hasNoUnsignedWrap(); in ConvertShiftToMul()
1970 if (I->getOpcode() == Instruction::Shl && isa<ConstantInt>(I->getOperand(1))) in OptimizeInst()