[llvm-branch-commits] [mlir] [mlir][arith] Add support for `arith.flush_denormals` emulation (PR #192660)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Apr 17 07:09:52 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 7830 tests passed
* 606 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### MLIR
<details>
<summary>MLIR.Dialect/Arith/expand-flush-denormals.mlir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Arith/expand-flush-denormals.mlir -arith-expand-flush-denormals -split-input-file | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Arith/expand-flush-denormals.mlir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Arith/expand-flush-denormals.mlir -arith-expand-flush-denormals -split-input-file
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Arith/expand-flush-denormals.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Arith/expand-flush-denormals.mlir:14:11: error: CHECK: expected string not found in input
# | // CHECK: %[[BITS:.+]] = arith.bitcast %[[ARG0]] : f32 to i32
# |           ^
# | <stdin>:7:34: note: scanning from here
# |  %c0_i32 = arith.constant 0 : i32
# |                                  ^
# | <stdin>:7:34: note: with "ARG0" equal to "arg0"
# |  %c0_i32 = arith.constant 0 : i32
# |                                  ^
# | <stdin>:15:2: note: possible intended match here
# |  %8 = arith.bitcast %7 : i32 to f32
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Arith/expand-flush-denormals.mlir:40:11: error: CHECK: expected string not found in input
# | // CHECK: arith.bitcast %{{.*}} : bf16 to i16
# |           ^
# | <stdin>:26:44: note: scanning from here
# |  %c-32768_i16 = arith.constant -32768 : i16
# |                                            ^
# | <stdin>:35:7: note: possible intended match here
# |  %8 = arith.bitcast %7 : i16 to bf16
# |       ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Arith/expand-flush-denormals.mlir:58:11: error: CHECK: expected string not found in input
# | // CHECK: arith.bitcast %{{.*}} : f16 to i16
# |           ^
# | <stdin>:46:44: note: scanning from here
# |  %c-32768_i16 = arith.constant -32768 : i16
# |                                            ^
# | <stdin>:55:7: note: possible intended match here
# |  %8 = arith.bitcast %7 : i16 to f16
# |       ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Arith/expand-flush-denormals.mlir:75:11: error: CHECK: expected string not found in input
# | // CHECK: arith.bitcast %{{.*}} : f64 to i64
# |           ^
# | <stdin>:66:72: note: scanning from here
# |  %c-9223372036854775808_i64 = arith.constant -9223372036854775808 : i64
# |                                                                        ^
# | <stdin>:75:7: note: possible intended match here
# |  %8 = arith.bitcast %7 : i64 to f64
# |       ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Arith/expand-flush-denormals.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: module { 
# |             2:  func.func @flush_denormals_f32(%arg0: f32) -> f32 { 
# |             3:  %0 = arith.bitcast %arg0 : f32 to i32 
# |             4:  %c8388607_i32 = arith.constant 8388607 : i32 
# |             5:  %c2139095040_i32 = arith.constant 2139095040 : i32 
# |             6:  %c-2147483648_i32 = arith.constant -2147483648 : i32 
# |             7:  %c0_i32 = arith.constant 0 : i32 
# | check:14'0                                      X error: no match found
# | check:14'1                                        with "ARG0" equal to "arg0"
# |             8:  %1 = arith.andi %0, %c2139095040_i32 : i32 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             9:  %2 = arith.cmpi eq, %1, %c0_i32 : i32 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            10:  %3 = arith.andi %0, %c8388607_i32 : i32 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            11:  %4 = arith.cmpi ne, %3, %c0_i32 : i32 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            12:  %5 = arith.andi %2, %4 : i1 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            13:  %6 = arith.andi %0, %c-2147483648_i32 : i32 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            14:  %7 = arith.select %5, %6, %0 : i32 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            15:  %8 = arith.bitcast %7 : i32 to f32 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:14'2      ?                                   possible intended match
# |            16:  return %8 : f32 
# | check:14'0     ~~~~~~~~~~~~~~~~~
# |            17:  } 
# | check:14'0     ~~~
# |            18: } 
# | check:14'0     ~~
# |            19:  
# | check:14'0     ~
# |            20: // ----- 
# | check:14'0     ~~~~~~~~~
# |            21: module { 
# | check:14'0     ~~~~~~~~~
# |            22:  func.func @flush_denormals_bf16(%arg0: bf16) -> bf16 { 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            23:  %0 = arith.bitcast %arg0 : bf16 to i16 
# |            24:  %c127_i16 = arith.constant 127 : i16 
# |            25:  %c32640_i16 = arith.constant 32640 : i16 
# |            26:  %c-32768_i16 = arith.constant -32768 : i16 
# | check:40'0                                                X error: no match found
# |            27:  %c0_i16 = arith.constant 0 : i16 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            28:  %1 = arith.andi %0, %c32640_i16 : i16 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            29:  %2 = arith.cmpi eq, %1, %c0_i16 : i16 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            30:  %3 = arith.andi %0, %c127_i16 : i16 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            31:  %4 = arith.cmpi ne, %3, %c0_i16 : i16 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            32:  %5 = arith.andi %2, %4 : i1 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            33:  %6 = arith.andi %0, %c-32768_i16 : i16 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            34:  %7 = arith.select %5, %6, %0 : i16 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            35:  %8 = arith.bitcast %7 : i16 to bf16 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:40'1           ?                               possible intended match
# |            36:  return %8 : bf16 
# | check:40'0     ~~~~~~~~~~~~~~~~~~
# |            37:  } 
# | check:40'0     ~~~
# |            38: } 
# | check:40'0     ~~
# |            39:  
# | check:40'0     ~
# |            40: // ----- 
# | check:40'0     ~~~~~~~~~
# |            41: module { 
# | check:40'0     ~~~~~~~~~
# |            42:  func.func @flush_denormals_f16(%arg0: f16) -> f16 { 
# | check:40'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            43:  %0 = arith.bitcast %arg0 : f16 to i16 
# |            44:  %c1023_i16 = arith.constant 1023 : i16 
# |            45:  %c31744_i16 = arith.constant 31744 : i16 
# |            46:  %c-32768_i16 = arith.constant -32768 : i16 
# | check:58'0                                                X error: no match found
# |            47:  %c0_i16 = arith.constant 0 : i16 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            48:  %1 = arith.andi %0, %c31744_i16 : i16 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            49:  %2 = arith.cmpi eq, %1, %c0_i16 : i16 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            50:  %3 = arith.andi %0, %c1023_i16 : i16 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            51:  %4 = arith.cmpi ne, %3, %c0_i16 : i16 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            52:  %5 = arith.andi %2, %4 : i1 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            53:  %6 = arith.andi %0, %c-32768_i16 : i16 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            54:  %7 = arith.select %5, %6, %0 : i16 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            55:  %8 = arith.bitcast %7 : i16 to f16 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:58'1           ?                              possible intended match
# |            56:  return %8 : f16 
# | check:58'0     ~~~~~~~~~~~~~~~~~
# |            57:  } 
# | check:58'0     ~~~
# |            58: } 
# | check:58'0     ~~
# |            59:  
# | check:58'0     ~
# |            60: // ----- 
# | check:58'0     ~~~~~~~~~
# |            61: module { 
# | check:58'0     ~~~~~~~~~
# |            62:  func.func @flush_denormals_f64(%arg0: f64) -> f64 { 
# | check:58'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            63:  %0 = arith.bitcast %arg0 : f64 to i64 
# |            64:  %c4503599627370495_i64 = arith.constant 4503599627370495 : i64 
# |            65:  %c9218868437227405312_i64 = arith.constant 9218868437227405312 : i64 
# |            66:  %c-9223372036854775808_i64 = arith.constant -9223372036854775808 : i64 
# | check:75'0                                                                            X error: no match found
# |            67:  %c0_i64 = arith.constant 0 : i64 
# | check:75'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            68:  %1 = arith.andi %0, %c9218868437227405312_i64 : i64 
# | check:75'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            69:  %2 = arith.cmpi eq, %1, %c0_i64 : i64 
# | check:75'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            70:  %3 = arith.andi %0, %c4503599627370495_i64 : i64 
# | check:75'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            71:  %4 = arith.cmpi ne, %3, %c0_i64 : i64 
# | check:75'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            72:  %5 = arith.andi %2, %4 : i1 
# | check:75'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            73:  %6 = arith.andi %0, %c-9223372036854775808_i64 : i64 
# | check:75'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            74:  %7 = arith.select %5, %6, %0 : i64 
# | check:75'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            75:  %8 = arith.bitcast %7 : i64 to f64 
# | check:75'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:75'1           ?                              possible intended match
# |            76:  return %8 : f64 
# | check:75'0     ~~~~~~~~~~~~~~~~~
# |            77:  } 
# | check:75'0     ~~~
# |            78: } 
# | check:75'0     ~~
# |            79:  
# | check:75'0     ~
# |            80: // ----- 
# | check:75'0     ~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the llvm-branch-commits mailing list