[Mlir-commits] [mlir] [mlir][complex] Prevent underflow in complex.abs (PR #76316)

Matthias Springer llvmlistbot at llvm.org
Tue Jan 23 00:20:40 PST 2024


================
@@ -300,5 +321,22 @@ func.func @entry() {
   call @test_element(%angle_test_cast, %angle_func)
     : (tensor<?xcomplex<f32>>, (complex<f32>) -> f32) -> ()
 
+  // complex.abs test
+  %abs_test = arith.constant dense<[
----------------
matthias-springer wrote:

Can you add 3 more cases here? Something like:
`(5.0, 0.0)`
`(0.0, 6.0)`
`(7.0, 8,0)`

To cover the cases where IM / RE are zero respectively, and another case where IM and RE are not the same value.


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


More information about the Mlir-commits mailing list