[flang-commits] [flang] [llvm] [flang] Fix wrong result for exponentiation when denormal is expected (PR #205262)
via flang-commits
flang-commits at lists.llvm.org
Thu Oct 8 04:39:00 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 5092 tests passed
* 143 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Flang
<details>
<summary>Flang.HLFIR/simplify-hlfir-intrinsics-pack.fir</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
fir-opt --simplify-hlfir-intrinsics /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/HLFIR/simplify-hlfir-intrinsics-pack.fir | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/HLFIR/simplify-hlfir-intrinsics-pack.fir
# executed command: fir-opt --simplify-hlfir-intrinsics /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/HLFIR/simplify-hlfir-intrinsics-pack.fir
# 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/flang/test/HLFIR/simplify-hlfir-intrinsics-pack.fir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/HLFIR/simplify-hlfir-intrinsics-pack.fir:26:11: error: CHECK: expected string not found in input
# | // CHECK: %[[LB_ADJ:.*]] = arith.subi %[[ARRAY_DIM0]]#0, %[[C1]] overflow<nuw> : index
# | ^
# | <stdin>:16:96: note: scanning from here
# | %7:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?xi32>>, index) -> (index, index, index)
# | ^
# | <stdin>:16:96: note: with "ARRAY_DIM0" equal to "7"
# | %7:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?xi32>>, index) -> (index, index, index)
# | ^
# | <stdin>:16:96: note: with "C1" equal to "c1"
# | %7:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?xi32>>, index) -> (index, index, index)
# | ^
# | <stdin>:16:96: note: pattern attempts to capture variables: "LB_ADJ"
# | %7:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?xi32>>, index) -> (index, index, index)
# | ^
# | <stdin>:17:2: note: possible intended match here
# | %8 = arith.subi %7#0, %c1 overflow<nsw> : index
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/HLFIR/simplify-hlfir-intrinsics-pack.fir:63:11: error: CHECK: expected string not found in input
# | // CHECK: %[[ZERO_IDX:.*]] = arith.subi %[[IDX]], %[[C1]] overflow<nuw> : index
# | ^
# | <stdin>:42:21: note: scanning from here
# | ^bb0(%arg1: index):
# | ^
# | <stdin>:42:21: note: with "IDX" equal to "arg1"
# | ^bb0(%arg1: index):
# | ^
# | <stdin>:42:21: note: with "C1" equal to "c1"
# | ^bb0(%arg1: index):
# | ^
# | <stdin>:42:21: note: pattern attempts to capture variables: "ZERO_IDX"
# | ^bb0(%arg1: index):
# | ^
# | <stdin>:50:4: note: possible intended match here
# | %17 = arith.subi %15#0, %c1 overflow<nsw> : index
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/flang/test/HLFIR/simplify-hlfir-intrinsics-pack.fir
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 11: }
# | 12: %4 = hlfir.apply %3, %c1 : (!hlfir.expr<1xi64>, index) -> i64
# | 13: %5 = fir.shape %4 : (i64) -> !fir.shape<1>
# | 14: %6 = hlfir.elemental %5 unordered : (!fir.shape<1>) -> !hlfir.expr<?xi32> {
# | 15: ^bb0(%arg1: index):
# | 16: %7:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?xi32>>, index) -> (index, index, index)
# | check:26'0 { search range start (exclusive)
# | check:26'1 error: no match found in search range
# | check:26'2 with "ARRAY_DIM0" equal to "7"
# | check:26'3 with "C1" equal to "c1"
# | check:26'4 pattern attempts to capture variables: "LB_ADJ"
# | 17: %8 = arith.subi %7#0, %c1 overflow<nsw> : index
# | check:26'5 ? possible intended match
# | 18: %9 = arith.addi %arg1, %8 overflow<nsw> : index
# | 19: %10 = hlfir.designate %arg0 (%9) : (!fir.box<!fir.array<?xi32>>, index) -> !fir.ref<i32>
# | 20: %11 = fir.load %10 : !fir.ref<i32>
# | 21: hlfir.yield_element %11 : i32
# | 22: }
# | 23: hlfir.destroy %3 : !hlfir.expr<1xi64>
# | 24: return %6 : !hlfir.expr<?xi32>
# | 25: }
# | 26: func.func @pack_scalar_true_mask_2d(%arg0: !fir.box<!fir.array<?x?xi32>>) -> !hlfir.expr<?xi32> {
# | check:26'6 } search range end (exclusive)
# | 27: %c1 = arith.constant 1 : index
# | 28: %c0 = arith.constant 0 : index
# | 29: %0:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?x?xi32>>, index) -> (index, index, index)
# | 30: %1:3 = fir.box_dims %arg0, %c1 : (!fir.box<!fir.array<?x?xi32>>, index) -> (index, index, index)
# | 31: %2 = arith.muli %0#1, %1#1 overflow<nuw> : index
# | .
# | .
# | .
# | 37: }
# | 38: %6:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?x?xi32>>, index) -> (index, index, index)
# | 39: %7 = hlfir.apply %5, %c1 : (!hlfir.expr<1xi64>, index) -> i64
# | 40: %8 = fir.shape %7 : (i64) -> !fir.shape<1>
# | 41: %9 = hlfir.elemental %8 unordered : (!fir.shape<1>) -> !hlfir.expr<?xi32> {
# | 42: ^bb0(%arg1: index):
# | check:63'0 { search range start (exclusive)
# | check:63'1 error: no match found in search range
# | check:63'2 with "IDX" equal to "arg1"
# | check:63'3 with "C1" equal to "c1"
# | check:63'4 pattern attempts to capture variables: "ZERO_IDX"
# | 43: %10 = arith.subi %arg1, %c1 overflow<nsw, nuw> : index
# | 44: %11 = arith.remui %10, %6#1 : index
# | 45: %12 = arith.divui %10, %6#1 : index
# | 46: %13 = arith.addi %11, %c1 overflow<nsw, nuw> : index
# | 47: %14 = arith.addi %12, %c1 overflow<nsw, nuw> : index
# | 48: %15:3 = fir.box_dims %arg0, %c0 : (!fir.box<!fir.array<?x?xi32>>, index) -> (index, index, index)
# | 49: %16:3 = fir.box_dims %arg0, %c1 : (!fir.box<!fir.array<?x?xi32>>, index) -> (index, index, index)
# | 50: %17 = arith.subi %15#0, %c1 overflow<nsw> : index
# | check:63'5 ? possible intended match
# | 51: %18 = arith.addi %13, %17 overflow<nsw> : index
# | 52: %19 = arith.subi %16#0, %c1 overflow<nsw> : index
# | 53: %20 = arith.addi %14, %19 overflow<nsw> : index
# | 54: %21 = hlfir.designate %arg0 (%18, %20) : (!fir.box<!fir.array<?x?xi32>>, index, index) -> !fir.ref<i32>
# | 55: %22 = fir.load %21 : !fir.ref<i32>
# | 56: hlfir.yield_element %22 : i32
# | 57: }
# | 58: hlfir.destroy %5 : !hlfir.expr<1xi64>
# | 59: return %9 : !hlfir.expr<?xi32>
# | 60: }
# | 61: func.func @pack_var_mask(%arg0: !fir.box<!fir.array<?xi32>>, %arg1: !fir.ref<!fir.logical<4>>) -> !hlfir.expr<?xi32> {
# | check:63'6 } search range end (exclusive)
# | 62: %0 = fir.load %arg1 : !fir.ref<!fir.logical<4>>
# | 63: %1 = hlfir.pack %arg0 %0 : (!fir.box<!fir.array<?xi32>>, !fir.logical<4>) -> !hlfir.expr<?xi32>
# | 64: return %1 : !hlfir.expr<?xi32>
# | 65: }
# | 66: func.func @pack_with_vector(%arg0: !fir.box<!fir.array<?xi32>>, %arg1: !fir.box<!fir.array<?xi32>>) -> !hlfir.expr<?xi32> {
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# 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/205262
More information about the flang-commits
mailing list