[libc-commits] [libc] [libc][math][c++23] Implement basic arithmetic operations for BFloat16 (PR #151228)

via libc-commits libc-commits at lists.llvm.org
Sat Aug 2 04:44:09 PDT 2025


================
@@ -5306,6 +5306,54 @@ add_fp_unittest(
     libc.src.math.ddivf128
 )
 
+add_fp_unittest(
+  bfloat16_add_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    bfloat16_add_test.cpp
+  HDRS
+    AddTest.h
+  DEPENDS
+    libc.src.__support.FPUtil.bfloat16
+)
+
+add_fp_unittest(
+  bfloat16_div_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    bfloat16_div_test.cpp
+  HDRS
+    DivTest.h
+  DEPENDS
+    libc.src.__support.FPUtil.bfloat16
+)
+
+add_fp_unittest(
+  bfloat16_mul_test
+  SUITE
+  libc-math-smoke-tests
+  SRCS
+  bfloat16_mul_test.cpp
+  HDRS
+  MulTest.h
+  DEPENDS
+  libc.src.__support.FPUtil.bfloat16
----------------
overmighty wrote:

Nit: indentation.


```suggestion
  SUITE
    libc-math-smoke-tests
  SRCS
    bfloat16_mul_test.cpp
  HDRS
    MulTest.h
  DEPENDS
    libc.src.__support.FPUtil.bfloat16
```


https://github.com/llvm/llvm-project/pull/151228


More information about the libc-commits mailing list