Skip to content

Commit 1a5666e

Browse files
committed
Mark all yield values as live
1 parent b0032a9 commit 1a5666e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mlir/test/Transforms/remove-dead-values.mlir

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,14 +486,17 @@ gpu.module @test_module_3 {
486486

487487
// CHECK-LABEL: func @gpu_all_reduce_region()
488488
// CHECK: %[[yield:.*]] = arith.xori %{{.*}}, %{{.*}} : i32
489-
// CHECK: "gpu.yield"(%[[yield]]) : (i32) -> ()
489+
// CHECK: gpu.yield %[[yield]] : i32
490490

491491
// -----
492492

493493
// Check that yielded values aren't incorrectly removed in linalg regions
494494
module {
495495
func.func @linalg_red_add(%arg0: tensor<?xf32>, %arg1: tensor<1xf32>) -> tensor<1xf32> {
496-
%0 = linalg.generic {indexing_maps = [#map, #map1], iterator_types = ["reduction"]} ins(%arg0 : tensor<?xf32>) outs(%arg1 : tensor<1xf32>) {
496+
%0 = linalg.generic {
497+
indexing_maps = [affine_map<(d0) -> (d0)>, affine_map<(d0) -> (0)>],
498+
iterator_types = ["reduction"]
499+
} ins(%arg0 : tensor<?xf32>) outs(%arg1 : tensor<1xf32>) {
497500
^bb0(%in: f32, %out: f32):
498501
%1 = arith.addf %in, %out : f32
499502
linalg.yield %1 : f32

0 commit comments

Comments
 (0)