[Mlir-commits] [mlir] [mlir] Add math to LLVM lowering support for missing trigonometric & hyperbolic ops (PR #125753)
Markus Böck
llvmlistbot at llvm.org
Wed Feb 5 01:35:00 PST 2025
================
@@ -161,11 +161,33 @@ func.func @rsqrt(%arg0 : f32) {
// -----
-// CHECK-LABEL: func @sine(
+// CHECK-LABEL: func @trigonometrics(
// CHECK-SAME: f32
-func.func @sine(%arg0 : f32) {
+func.func @trigonometrics(%arg0 : f32) {
// CHECK: llvm.intr.sin(%arg0) : (f32) -> f32
%0 = math.sin %arg0 : f32
+
+ // CHECK: llvm.intr.cos(%arg0) : (f32) -> f32
+ %1 = math.cos %arg0 : f32
+
+ // CHECK: llvm.intr.tan(%arg0) : (f32) -> f32
+ %2 = math.tan %arg0 : f32
+ func.return
+}
+
+// -----
+
+// CHECK-LABEL: func @hyperbolics(
+// CHECK-SAME: f32
+func.func @hyperbolics(%arg0 : f32) {
----------------
zero9178 wrote:
I know this has unfortunately not been done consistently above, but could we capture and use `%arg0` as a FileCheck variable in the tests being touched, rather than hardcoding the SSA name? See e.g. `@expm1_scalable_vector` above.
https://github.com/llvm/llvm-project/pull/125753
More information about the Mlir-commits
mailing list