Lines Matching defs:LHS

112 Value *IslExprBuilder::createBinOp(BinaryOperator::BinaryOps Opc, Value *LHS,
118 return Builder.CreateNSWAdd(LHS, RHS, Name);
120 return Builder.CreateNSWSub(LHS, RHS, Name);
122 return Builder.CreateNSWMul(LHS, RHS, Name);
133 {LHS->getType()});
137 {LHS->getType()});
141 {LHS->getType()});
147 auto *ResultStruct = Builder.CreateCall(F, {LHS, RHS}, Name);
165 Value *IslExprBuilder::createAdd(Value *LHS, Value *RHS, const Twine &Name) {
166 return createBinOp(Instruction::Add, LHS, RHS, Name);
169 Value *IslExprBuilder::createSub(Value *LHS, Value *RHS, const Twine &Name) {
170 return createBinOp(Instruction::Sub, LHS, RHS, Name);
173 Value *IslExprBuilder::createMul(Value *LHS, Value *RHS, const Twine &Name) {
174 return createBinOp(Instruction::Mul, LHS, RHS, Name);
358 Value *LHS, *RHS, *Res;
369 LHS = create(isl_ast_expr_get_op_arg(Expr, 0));
372 Type *LHSType = LHS->getType();
404 if (MaxType != LHS->getType())
405 LHS = Builder.CreateSExt(LHS, MaxType);
411 Res = createAdd(LHS, RHS);
414 Res = createSub(LHS, RHS);
417 Res = createMul(LHS, RHS);
420 Res = Builder.CreateSDiv(LHS, RHS, "pexp.div", true);
423 Res = Builder.CreateUDiv(LHS, RHS, "pexp.p_div_q");
429 Res = Builder.CreateAShr(LHS, Val.ceilLogBase2(), "polly.fdiv_q.shr");
439 Value *Sum1 = createSub(LHS, RHS, "pexp.fdiv_q.0");
441 Value *isNegative = Builder.CreateICmpSLT(LHS, Zero, "pexp.fdiv_q.2");
443 Builder.CreateSelect(isNegative, Sum2, LHS, "pexp.fdiv_q.3");
448 Res = Builder.CreateURem(LHS, RHS, "pexp.pdiv_r");
452 Res = Builder.CreateSRem(LHS, RHS, "pexp.zdiv_r");
467 Value *LHS, *RHS, *Cond;
474 LHS = create(isl_ast_expr_get_op_arg(Expr, 1));
477 MaxType = getWidestType(MaxType, LHS->getType());
483 if (MaxType != LHS->getType())
484 LHS = Builder.CreateSExt(LHS, MaxType);
488 return Builder.CreateSelect(Cond, LHS, RHS);
495 Value *LHS, *RHS, *Res;
505 LHS = create(Op0);
508 auto *LHSTy = LHS->getType();
515 LHS = Builder.CreatePtrToInt(LHS, PtrAsIntTy);
519 if (LHS->getType() != RHS->getType()) {
520 Type *MaxType = LHS->getType();
526 if (MaxType != LHS->getType())
527 LHS = Builder.CreateSExt(LHS, MaxType);
545 LHS, RHS);
555 Value *LHS, *RHS, *Res;
563 LHS = create(isl_ast_expr_get_op_arg(Expr, 0));
578 if (!LHS->getType()->isIntegerTy(1))
579 LHS = Builder.CreateIsNotNull(LHS);
587 Res = Builder.CreateAnd(LHS, RHS);
590 Res = Builder.CreateOr(LHS, RHS);
603 Value *LHS, *RHS;
630 LHS = create(isl_ast_expr_get_op_arg(Expr, 0));
631 if (!LHS->getType()->isIntegerTy(1))
632 LHS = Builder.CreateIsNotNull(LHS);
636 BR->setCondition(Builder.CreateNeg(LHS));
638 BR->setCondition(LHS);