@@ -715,6 +715,16 @@ static mlir::FunctionType genF64F64FuncType(mlir::MLIRContext *context) {
715
715
return mlir::FunctionType::get (context, {t}, {t});
716
716
}
717
717
718
+ static mlir::FunctionType genF32F32F32FuncType (mlir::MLIRContext *context) {
719
+ auto t = mlir::FloatType::getF32 (context);
720
+ return mlir::FunctionType::get (context, {t, t}, {t});
721
+ }
722
+
723
+ static mlir::FunctionType genF64F64F64FuncType (mlir::MLIRContext *context) {
724
+ auto t = mlir::FloatType::getF64 (context);
725
+ return mlir::FunctionType::get (context, {t, t}, {t});
726
+ }
727
+
718
728
template <int Bits>
719
729
static mlir::FunctionType genIntF64FuncType (mlir::MLIRContext *context) {
720
730
auto t = mlir::FloatType::getF64 (context);
@@ -739,11 +749,17 @@ static constexpr RuntimeFunction llvmIntrinsics[] = {
739
749
{" aint" , " llvm.trunc.f64" , genF64F64FuncType},
740
750
{" anint" , " llvm.round.f32" , genF32F32FuncType},
741
751
{" anint" , " llvm.round.f64" , genF64F64FuncType},
752
+ {" atan" , " atanf" , genF32F32FuncType},
753
+ {" atan" , " atan" , genF64F64FuncType},
742
754
// ceil is used for CEILING but is different, it returns a real.
743
755
{" ceil" , " llvm.ceil.f32" , genF32F32FuncType},
744
756
{" ceil" , " llvm.ceil.f64" , genF64F64FuncType},
745
757
{" cos" , " llvm.cos.f32" , genF32F32FuncType},
746
758
{" cos" , " llvm.cos.f64" , genF64F64FuncType},
759
+ {" cosh" , " coshf" , genF32F32FuncType},
760
+ {" cosh" , " cosh" , genF64F64FuncType},
761
+ {" exp" , " llvm.exp.f32" , genF32F32FuncType},
762
+ {" exp" , " llvm.exp.f64" , genF64F64FuncType},
747
763
// llvm.floor is used for FLOOR, but returns real.
748
764
{" floor" , " llvm.floor.f32" , genF32F32FuncType},
749
765
{" floor" , " llvm.floor.f64" , genF64F64FuncType},
@@ -755,8 +771,12 @@ static constexpr RuntimeFunction llvmIntrinsics[] = {
755
771
{" nint" , " llvm.lround.i64.f32" , genIntF32FuncType<64 >},
756
772
{" nint" , " llvm.lround.i32.f64" , genIntF64FuncType<32 >},
757
773
{" nint" , " llvm.lround.i32.f32" , genIntF32FuncType<32 >},
774
+ {" pow" , " llvm.pow.f32" , genF32F32F32FuncType},
775
+ {" pow" , " llvm.pow.f64" , genF64F64F64FuncType},
758
776
{" sin" , " llvm.sin.f32" , genF32F32FuncType},
759
777
{" sin" , " llvm.sin.f64" , genF64F64FuncType},
778
+ {" sinh" , " sinhf" , genF32F32FuncType},
779
+ {" sinh" , " sinh" , genF64F64FuncType},
760
780
{" sqrt" , " llvm.sqrt.f32" , genF32F32FuncType},
761
781
{" sqrt" , " llvm.sqrt.f64" , genF64F64FuncType},
762
782
};
0 commit comments