410 {
412
413 return gen->createFunction(
416 auto* x = args[0];
417 auto* float_ty = gen->getFloatType();
418 auto* int32_ty = gen->getInt32Type();
419 auto* float_invpi =
420 gen->getConstant(std::numbers::inv_pi_v<float>);
421
422 auto* float_pi1 = gen->getConstant(3.140625F);
423 auto* float_pi2 = gen->getConstant(0.0009670257568359375F);
424 auto* float_pi3 = gen->getConstant(1.984187252998352e-07F);
425 auto* float_pi4 = gen->getConstant(1.273533813134432e-11F);
426 auto* float_sin_c3 = gen->getConstant(-0.1666666567325592F);
427 auto* float_sin_c5 = gen->getConstant(0.00833307858556509F);
428 auto* float_sin_c7 = gen->getConstant(-0.00019807418575510383F);
429 auto* float_sin_c9 = gen->getConstant(2.6019030363451748e-06F);
430 auto* signmask = gen->getInt32Constant(0x80000000);
431
432 llvm::Value* sign = gen->builder.CreateBitCast(x, int32_ty);
433 sign = gen->builder.CreateAnd(sign, signmask);
434 llvm::Value* t1 =
435 gen->createIntrinsicCall(llvm::Intrinsic::fabs, {x});
445 t1 =
gen->createIntrinsicCall(
448 t1 =
gen->createIntrinsicCall(
451 t1 =
gen->createIntrinsicCall(
454 t1 =
gen->createIntrinsicCall(
472 });
473 }
constexpr MathopInfo get_math_op_info(MathOp op)