Lines Matching refs:Op
144 ComplexPairTy EmitCast(CastExpr::CastKind CK, Expr *Op, QualType DestTy);
227 ComplexPairTy EmitBinAdd(const BinOpInfo &Op);
228 ComplexPairTy EmitBinSub(const BinOpInfo &Op);
229 ComplexPairTy EmitBinMul(const BinOpInfo &Op);
230 ComplexPairTy EmitBinDiv(const BinOpInfo &Op);
410 ComplexPairTy ComplexExprEmitter::EmitCast(CastExpr::CastKind CK, Expr *Op,
415 // Atomic to non-atomic casts may be more than a no-op for some platforms and
422 return Visit(Op);
425 LValue origLV = CGF.EmitLValue(Op);
478 return EmitScalarToComplexCast(CGF.EmitScalarExpr(Op),
479 Op->getType(), DestTy);
485 return EmitComplexToComplexCast(Visit(Op), Op->getType(), DestTy);
494 ComplexPairTy Op = Visit(E->getSubExpr());
497 if (Op.first->getType()->isFloatingPointTy()) {
498 ResR = Builder.CreateFNeg(Op.first, "neg.r");
499 ResI = Builder.CreateFNeg(Op.second, "neg.i");
501 ResR = Builder.CreateNeg(Op.first, "neg.r");
502 ResI = Builder.CreateNeg(Op.second, "neg.i");
511 ComplexPairTy Op = Visit(E->getSubExpr());
513 if (Op.second->getType()->isFloatingPointTy())
514 ResI = Builder.CreateFNeg(Op.second, "conj.i");
516 ResI = Builder.CreateNeg(Op.second, "conj.i");
518 return ComplexPairTy(Op.first, ResI);
521 ComplexPairTy ComplexExprEmitter::EmitBinAdd(const BinOpInfo &Op) {
524 if (Op.LHS.first->getType()->isFloatingPointTy()) {
525 ResR = Builder.CreateFAdd(Op.LHS.first, Op.RHS.first, "add.r");
526 ResI = Builder.CreateFAdd(Op.LHS.second, Op.RHS.second, "add.i");
528 ResR = Builder.CreateAdd(Op.LHS.first, Op.RHS.first, "add.r");
529 ResI = Builder.CreateAdd(Op.LHS.second, Op.RHS.second, "add.i");
534 ComplexPairTy ComplexExprEmitter::EmitBinSub(const BinOpInfo &Op) {
536 if (Op.LHS.first->getType()->isFloatingPointTy()) {
537 ResR = Builder.CreateFSub(Op.LHS.first, Op.RHS.first, "sub.r");
538 ResI = Builder.CreateFSub(Op.LHS.second, Op.RHS.second, "sub.i");
540 ResR = Builder.CreateSub(Op.LHS.first, Op.RHS.first, "sub.r");
541 ResI = Builder.CreateSub(Op.LHS.second, Op.RHS.second, "sub.i");
547 ComplexPairTy ComplexExprEmitter::EmitBinMul(const BinOpInfo &Op) {
551 if (Op.LHS.first->getType()->isFloatingPointTy()) {
552 Value *ResRl = Builder.CreateFMul(Op.LHS.first, Op.RHS.first, "mul.rl");
553 Value *ResRr = Builder.CreateFMul(Op.LHS.second, Op.RHS.second,"mul.rr");
556 Value *ResIl = Builder.CreateFMul(Op.LHS.second, Op.RHS.first, "mul.il");
557 Value *ResIr = Builder.CreateFMul(Op.LHS.first, Op.RHS.second, "mul.ir");
560 Value *ResRl = Builder.CreateMul(Op.LHS.first, Op.RHS.first, "mul.rl");
561 Value *ResRr = Builder.CreateMul(Op.LHS.second, Op.RHS.second,"mul.rr");
564 Value *ResIl = Builder.CreateMul(Op.LHS.second, Op.RHS.first, "mul.il");
565 Value *ResIr = Builder.CreateMul(Op.LHS.first, Op.RHS.second, "mul.ir");
571 ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo &Op) {
572 llvm::Value *LHSr = Op.LHS.first, *LHSi = Op.LHS.second;
573 llvm::Value *RHSr = Op.RHS.first, *RHSi = Op.RHS.second;
577 if (Op.LHS.first->getType()->isFloatingPointTy()) {
607 if (Op.Ty->castAs<ComplexType>()->getElementType()->isUnsignedIntegerType()) {
868 static CompoundFunc getComplexOp(BinaryOperatorKind Op) {
869 switch (Op) {
881 CompoundFunc Op = getComplexOp(E->getOpcode());
883 Op, Val);
889 CompoundFunc Op = getComplexOp(E->getOpcode());
891 LValue Ret = ComplexExprEmitter(*this).EmitCompoundAssignLValue(E, Op, Val);