[llvm] [PassBuilder] Run trivial loop unswitching after late function-simpli… (PR #215899)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 17:58:23 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 152804 tests passed
* 3273 tests skipped
* 3 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/PhaseOrdering/constraint-elimination-materialize-flags.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes='default<O3>' -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/PhaseOrdering/constraint-elimination-materialize-flags.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/PhaseOrdering/constraint-elimination-materialize-flags.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt '-passes=default<O3>' -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/PhaseOrdering/constraint-elimination-materialize-flags.ll
# 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/llvm/test/Transforms/PhaseOrdering/constraint-elimination-materialize-flags.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/PhaseOrdering/constraint-elimination-materialize-flags.ll:140:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[I2:%.*]] = phi i32 [ [[I_NEXT:%.*]], %[[OUTER_LATCH:.*]] ], [ 0, %[[ENTRY]] ]
# | ^
# | <stdin>:100:17: note: scanning from here
# | inner.exit.peel: ; preds = %entry
# | ^
# | <stdin>:100:17: note: with "ENTRY" equal to "entry"
# | inner.exit.peel: ; preds = %entry
# | ^
# | <stdin>:100:17: note: pattern attempts to capture variables: "I2", "I_NEXT", "OUTER_LATCH"
# | inner.exit.peel: ; preds = %entry
# | ^
# | <stdin>:102:2: note: possible intended match here
# | store i32 0, ptr %out, align 8
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/PhaseOrdering/constraint-elimination-materialize-flags.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 95: ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: write)
# | 96: define void @iterator_distance_index(ptr nofree writeonly captures(none) %out, ptr %arr, i1 %skip) local_unnamed_addr #0 {
# | 97: entry:
# | 98: br i1 %skip, label %early.exit, label %inner.exit.peel
# | 99:
# | 100: inner.exit.peel: ; preds = %entry
# | next:140'0 { search range start (exclusive)
# | next:140'1 error: no match found in search range
# | next:140'2 with "ENTRY" equal to "entry"
# | next:140'3 pattern attempts to capture variables: "I2", "I_NEXT", "OUTER_LATCH"
# | 101: store ptr %arr, ptr %out, align 8
# | 102: store i32 0, ptr %out, align 8
# | next:140'4 ? possible intended match
# | 103: %gep.peel11 = getelementptr i8, ptr %arr, i64 4
# | 104: store ptr %gep.peel11, ptr %out, align 8
# | 105: store i32 0, ptr %out, align 8
# | 106: store ptr %arr, ptr %out, align 8
# | 107: store i32 0, ptr %out, align 8
# | .
# | .
# | .
# | 123: attributes #0 = { nofree norecurse nosync nounwind memory(argmem: write) }
# | 124:
# | 125: !0 = distinct !{!0, !1, !2}
# | 126: !1 = !{!"llvm.loop.isvectorized", i32 1}
# | 127: !2 = !{!"llvm.loop.unroll.runtime.disable"}
# | 128: !3 = distinct !{!3, !1}
# | next:140'5 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
### MLIR
<details>
<summary>MLIR.Dialect/Linalg/vectorization/contraction-interface.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/Linalg/vectorization/contraction-interface.mlir -transform-interpreter -split-input-file -verify-diagnostics | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.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/Linalg/vectorization/contraction-interface.mlir -transform-interpreter -split-input-file -verify-diagnostics
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir:378:39: error: unexpected error: custom op 'transform.structured.vectorize' inherent attribute 'create_named_contraction' cannot be parsed from attr-dict when strict properties in assembly format is enabled
# | transform.structured.vectorize %0 {create_named_contraction} : !transform.any_op
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir:407:39: error: unexpected error: custom op 'transform.structured.vectorize' inherent attribute 'create_named_contraction' cannot be parsed from attr-dict when strict properties in assembly format is enabled
# | transform.structured.vectorize %0 {create_named_contraction} : !transform.any_op
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir:436:39: error: unexpected error: custom op 'transform.structured.vectorize' inherent attribute 'create_named_contraction' cannot be parsed from attr-dict when strict properties in assembly format is enabled
# | transform.structured.vectorize %0 {create_named_contraction} : !transform.any_op
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir:466:39: error: unexpected error: custom op 'transform.structured.vectorize' inherent attribute 'create_named_contraction' cannot be parsed from attr-dict when strict properties in assembly format is enabled
# | transform.structured.vectorize %0 {create_named_contraction} : !transform.any_op
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir:493:39: error: unexpected error: custom op 'transform.structured.vectorize' inherent attribute 'create_named_contraction' cannot be parsed from attr-dict when strict properties in assembly format is enabled
# | transform.structured.vectorize %0 {create_named_contraction} : !transform.any_op
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir:524:7: error: unexpected error: custom op 'transform.structured.vectorize' inherent attribute 'create_named_contraction' cannot be parsed from attr-dict when strict properties in assembly format is enabled
# | {create_named_contraction} : !transform.any_op
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir:664:39: error: unexpected error: custom op 'transform.structured.vectorize' inherent attribute 'create_named_contraction' cannot be parsed from attr-dict when strict properties in assembly format is enabled
# | transform.structured.vectorize %0 {create_named_contraction} : !transform.any_op
# | ^
# `-----------------------------
# error: command failed with exit status: 1
# 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/Linalg/vectorization/contraction-interface.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir:363:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: func.func @matmul_mixed_precision_unsigned(
# | ^
# | <stdin>:294:36: note: scanning from here
# | func.func @matmul_mixed_precision(%arg0: tensor<8x4xf16>, %arg1: tensor<4x16xf16>, %arg2: tensor<8x16xf32>) -> tensor<8x16xf32> {
# | ^
# | <stdin>:332:2: note: possible intended match here
# | func.func @batch_matmul(%arg0: tensor<3x8x4xf32>, %arg1: tensor<3x4x16xf32>, %arg2: tensor<3x8x16xf32>) -> tensor<3x8x16xf32> {
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 289: // -----
# | 290: #map = affine_map<(d0, d1, d2) -> (d0, d2)>
# | 291: #map1 = affine_map<(d0, d1, d2) -> (d2, d1)>
# | 292: #map2 = affine_map<(d0, d1, d2) -> (d0, d1)>
# | 293: module {
# | 294: func.func @matmul_mixed_precision(%arg0: tensor<8x4xf16>, %arg1: tensor<4x16xf16>, %arg2: tensor<8x16xf32>) -> tensor<8x16xf32> {
# | label:363'0 { search range start (exclusive)
# | label:363'1 error: no match found in search range
# | 295: %c8 = arith.constant 8 : index
# | 296: %c16 = arith.constant 16 : index
# | 297: %c4 = arith.constant 4 : index
# | 298: %cst = arith.constant 0.000000e+00 : f16
# | 299: %c0 = arith.constant 0 : index
# | .
# | .
# | .
# | 327: // -----
# | 328: #map = affine_map<(d0, d1, d2, d3) -> (d0, d1, d3)>
# | 329: #map1 = affine_map<(d0, d1, d2, d3) -> (d0, d3, d2)>
# | 330: #map2 = affine_map<(d0, d1, d2, d3) -> (d0, d1, d2)>
# | 331: module {
# | 332: func.func @batch_matmul(%arg0: tensor<3x8x4xf32>, %arg1: tensor<3x4x16xf32>, %arg2: tensor<3x8x16xf32>) -> tensor<3x8x16xf32> {
# | label:363'2 ? possible intended match
# | 333: %c3 = arith.constant 3 : index
# | 334: %c8 = arith.constant 8 : index
# | 335: %c16 = arith.constant 16 : index
# | 336: %c4 = arith.constant 4 : index
# | 337: %cst = arith.constant 0.000000e+00 : f32
# | .
# | .
# | .
# | 451: transform.structured.vectorize %0 create_named_contraction : !transform.any_op
# | 452: transform.yield
# | 453: }
# | 454: }
# | 455: }
# | 456:
# | label:363'3 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>MLIR.Dialect/Linalg/vectorization/convolution-with-patterns.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 -transform-interpreter -split-input-file /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/convolution-with-patterns.mlir | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/convolution-with-patterns.mlir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt -transform-interpreter -split-input-file /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/convolution-with-patterns.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/convolution-with-patterns.mlir:941:37: error: custom op 'transform.get_parent_op' inherent attribute 'isolated_from_above' cannot be parsed from attr-dict when strict properties in assembly format is enabled
# | %1 = transform.get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
# | ^
# `-----------------------------
# error: command failed with exit status: 1
# 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/Linalg/vectorization/convolution-with-patterns.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/convolution-with-patterns.mlir:927:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: func @generic_conv_1d_nwc_wcf_unsigned_input_memref
# | ^
# | <stdin>:486:48: note: scanning from here
# | func.func @conv_1d_nwc_wcf_mixed_int_fp_memref(%arg0: memref<1x2x3xi8>, %arg1: memref<1x3x2xi8>, %arg2: memref<1x2x2xf32>) {
# | ^
# | <stdin>:502:27: note: possible intended match here
# | %0 = transform.structured.match ops{["linalg.conv_1d_nwc_wcf", "linalg.generic"]} in %arg0 : (!transform.any_op) -> !transform.any_op
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/vectorization/convolution-with-patterns.mlir
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 481: // -----
# | 482: #map = affine_map<(d0, d1, d2, d3) -> (d0, d1, d3)>
# | 483: #map1 = affine_map<(d0, d1, d2, d3) -> (d3, d2)>
# | 484: #map2 = affine_map<(d0, d1, d2, d3) -> (d0, d1, d2)>
# | 485: module {
# | 486: func.func @conv_1d_nwc_wcf_mixed_int_fp_memref(%arg0: memref<1x2x3xi8>, %arg1: memref<1x3x2xi8>, %arg2: memref<1x2x2xf32>) {
# | label:927'0 { search range start (exclusive)
# | label:927'1 error: no match found in search range
# | 487: %cst = arith.constant 0.000000e+00 : f32
# | 488: %c0 = arith.constant 0 : index
# | 489: %c0_i8 = arith.constant 0 : i8
# | 490: %0 = vector.transfer_read %arg0[%c0, %c0, %c0], %c0_i8 {in_bounds = [true, true, true]} : memref<1x2x3xi8>, vector<1x2x3xi8>
# | 491: %1 = vector.transfer_read %arg1[%c0, %c0, %c0], %c0_i8 {in_bounds = [true, true, true]} : memref<1x3x2xi8>, vector<1x3x2xi8>
# | .
# | .
# | .
# | 497: vector.transfer_write %6, %arg2[%c0, %c0, %c0] {in_bounds = [true, true, true]} : vector<1x2x2xf32>, memref<1x2x2xf32>
# | 498: return
# | 499: }
# | 500: module attributes {transform.with_named_sequence} {
# | 501: transform.named_sequence @__transform_main(%arg0: !transform.any_op {transform.readonly}) {
# | 502: %0 = transform.structured.match ops{["linalg.conv_1d_nwc_wcf", "linalg.generic"]} in %arg0 : (!transform.any_op) -> !transform.any_op
# | label:927'2 ? possible intended match
# | 503: %1 = transform.get_parent_op %0 <isolated_from_above> : (!transform.any_op) -> !transform.any_op
# | 504: %2 = transform.structured.vectorize_children_and_apply_patterns %1 : (!transform.any_op) -> !transform.any_op
# | 505: transform.yield
# | 506: }
# | 507: }
# | .
# | .
# | .
# | 795: %2 = transform.structured.vectorize_children_and_apply_patterns %1 : (!transform.any_op) -> !transform.any_op
# | 796: transform.yield
# | 797: }
# | 798: }
# | 799: }
# | 800:
# | label:927'3 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# 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/215899
More information about the llvm-commits
mailing list