Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:BinaryOperator

48   if (BinaryOperator *I = dyn_cast<BinaryOperator>(V))
175 Instruction *InstCombiner::visitMul(BinaryOperator &I) {
190 BinaryOperator *BO = BinaryOperator::CreateNeg(Op0, I.getName());
206 BinaryOperator *Mul = cast<BinaryOperator>(I.getOperand(0));
207 BinaryOperator *BO = BinaryOperator::CreateMul(NewOp, Shl);
228 BinaryOperator *Shl = BinaryOperator::CreateShl(NewOp, NewCst);
261 BinaryOperator::CreateMul(Sub,
288 return BinaryOperator::CreateAdd(Builder->CreateMul(X, Op1), Mul);
295 BinaryOperator *BO = BinaryOperator::CreateMul(Op0v, Op1v);
308 BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0);
313 BO = dyn_cast<BinaryOperator>(Op1);
327 return BinaryOperator::CreateNeg(Op0BO);
338 return BinaryOperator::CreateSub(Op0BO, Rem);
339 return BinaryOperator::CreateSub(Rem, Op0BO);
345 return BinaryOperator::CreateAnd(Op0, Op1);
351 BinaryOperator *BO = nullptr;
354 BO = BinaryOperator::CreateShl(Op1, Y);
357 BO = BinaryOperator::CreateShl(Op0, Y);
385 return BinaryOperator::CreateAnd(V, OtherOp);
461 /// Helper function of InstCombiner::visitFMul(BinaryOperator(). It returns
496 BinaryOperator *R = nullptr;
502 R = BinaryOperator::CreateFMul(C1 ? Opnd0 : Opnd1, F);
510 R = BinaryOperator::CreateFDiv(F, Opnd1);
516 R = BinaryOperator::CreateFMul(Opnd0, F);
521 R = BinaryOperator::CreateFDiv(Opnd0, F);
534 Instruction *InstCombiner::visitFMul(BinaryOperator &I) {
564 Instruction *RI = BinaryOperator::CreateFSub(NegZero, Op0);
605 ? BinaryOperator::CreateFAdd(M0, M1)
606 : BinaryOperator::CreateFSub(M0, M1);
653 if (BinaryOperator::isFNeg(Opnd0, IgnoreZeroSign)) {
716 bool InstCombiner::SimplifyDivRemOfSelect(BinaryOperator &I) {
789 Instruction *InstCombiner::commonIDivTransforms(BinaryOperator &I) {
815 return BinaryOperator::Create(I.getOpcode(), X,
825 BinaryOperator *BO = BinaryOperator::Create(
833 BinaryOperator *BO = BinaryOperator::Create(
853 BinaryOperator *BO = BinaryOperator::Create(
861 BinaryOperator *BO = BinaryOperator::Create(
912 return BinaryOperator::Create(I.getOpcode(), X, Op1);
934 const BinaryOperator &I,
961 const BinaryOperator &I, InstCombiner &IC) {
963 BinaryOperator *LShr = BinaryOperator::CreateLShr(
972 const BinaryOperator &I, InstCombiner &IC) {
980 static Instruction *foldUDivShl(Value *Op0, Value *Op1, const BinaryOperator &I,
993 BinaryOperator *LShr = BinaryOperator::CreateLShr(Op0, N);
1003 static size_t visitUDivOperand(Value *Op0, Value *Op1, const BinaryOperator &I,
1042 Instruction *InstCombiner::visitUDiv(BinaryOperator &I) {
1065 BinaryOperator *BO = BinaryOperator::CreateUDiv(
1115 Instruction *InstCombiner::visitSDiv(BinaryOperator &I) {
1130 return BinaryOperator::CreateNeg(Op0);
1138 return BinaryOperator::CreateExactAShr(Op0, ShAmt, I.getName());
1150 auto *BO = BinaryOperator::CreateSDiv(X, ConstantExpr::getNeg(RHS));
1163 auto *BO = BinaryOperator::CreateUDiv(Op0, Op1, I.getName());
1173 auto *BO = BinaryOperator::CreateUDiv(Op0, Op1, I.getName());
1210 return BinaryOperator::CreateFMul(Dividend, R);
1213 Instruction *InstCombiner::visitFDiv(BinaryOperator &I) {
1247 Res = BinaryOperator::CreateFMul(X, C);
1255 Res = BinaryOperator::CreateFDiv(X, C);
1293 Instruction *R = CreateDiv ? BinaryOperator::CreateFDiv(Fold, X)
1294 : BinaryOperator::CreateFMul(X, Fold);
1316 SimpR = BinaryOperator::CreateFDiv(X, NewInst);
1328 SimpR = BinaryOperator::CreateFDiv(NewInst, X);
1347 Instruction *InstCombiner::commonIRemTransforms(BinaryOperator &I) {
1379 Instruction *InstCombiner::visitURem(BinaryOperator &I) {
1401 return BinaryOperator::CreateAnd(Op0, Add);
1414 Instruction *InstCombiner::visitSRem(BinaryOperator &I) {
1444 return BinaryOperator::CreateURem(Op0, Op1, I.getName());
1489 Instruction *InstCombiner::visitFRem(BinaryOperator &I) {