Skip to content

Commit acd1007

Browse files
authored
[mlir][test] Extend InferIntRangeInterface test Ops to arbitrary ints (#91850)
This PR is in preparation to some extensions to the `InferIntRangeInterface` around the `nsw` and `nuw` flags supported in the `arith` dialect and LLVM. We provide some common inference logic for `index` and `arith` in `InferIntRangeCommon.h` but our Test Ops are currently fixed to `Index` Types. As we test the range inference for arith Ops, especially around the overflow behaviour, it's handy to have native support for the typical integer types in the test Ops. This patch 1. Changes the Attributes of `test.with_bounds` ops from `Index` to `APInt` which matches the internal representation in `ConstantIntRanges`. 2. Allows the use of `AnyInteger` in addition to `Index` for the operands and results of the test Ops. This now requires explicit specification of the type in the IR, where before `Index` was implicit. 3. Requires bounds Attrs to be specified in the precision of the SSA value, eliminating any implicit truncation or extension. (*Could this lead to problems?*)
1 parent 19008d3 commit acd1007

File tree

6 files changed

+140
-132
lines changed

6 files changed

+140
-132
lines changed

mlir/test/Dialect/Arith/int-range-interface.mlir

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,3 +756,13 @@ func.func private @callee(%arg0: memref<?xindex, 4>) {
756756
}
757757
return
758758
}
759+
760+
// CHECK-LABEL: func @test_i8_bounds
761+
// CHECK: test.reflect_bounds {smax = 127 : i8, smin = -128 : i8, umax = -1 : i8, umin = 0 : i8}
762+
func.func @test_i8_bounds() -> i8 {
763+
%cst1 = arith.constant 1 : i8
764+
%0 = test.with_bounds { umin = 0 : i8, umax = 255 : i8, smin = -128 : i8, smax = 127 : i8 } : i8
765+
%1 = arith.addi %0, %cst1 : i8
766+
%2 = test.reflect_bounds %1 : i8
767+
return %2: i8
768+
}

mlir/test/Dialect/Arith/int-range-opts.mlir

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// CHECK: return %[[C]]
66
func.func @test() -> i1 {
77
%cst1 = arith.constant -1 : index
8-
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index }
8+
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index } : index
99
%1 = arith.cmpi eq, %0, %cst1 : index
1010
return %1: i1
1111
}
@@ -17,7 +17,7 @@ func.func @test() -> i1 {
1717
// CHECK: return %[[C]]
1818
func.func @test() -> i1 {
1919
%cst1 = arith.constant -1 : index
20-
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index }
20+
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index } : index
2121
%1 = arith.cmpi ne, %0, %cst1 : index
2222
return %1: i1
2323
}
@@ -30,7 +30,7 @@ func.func @test() -> i1 {
3030
// CHECK: return %[[C]]
3131
func.func @test() -> i1 {
3232
%cst = arith.constant 0 : index
33-
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index }
33+
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index } : index
3434
%1 = arith.cmpi sge, %0, %cst : index
3535
return %1: i1
3636
}
@@ -42,7 +42,7 @@ func.func @test() -> i1 {
4242
// CHECK: return %[[C]]
4343
func.func @test() -> i1 {
4444
%cst = arith.constant 0 : index
45-
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index }
45+
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index } : index
4646
%1 = arith.cmpi slt, %0, %cst : index
4747
return %1: i1
4848
}
@@ -55,7 +55,7 @@ func.func @test() -> i1 {
5555
// CHECK: return %[[C]]
5656
func.func @test() -> i1 {
5757
%cst1 = arith.constant -1 : index
58-
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index }
58+
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index } : index
5959
%1 = arith.cmpi sgt, %0, %cst1 : index
6060
return %1: i1
6161
}
@@ -67,36 +67,32 @@ func.func @test() -> i1 {
6767
// CHECK: return %[[C]]
6868
func.func @test() -> i1 {
6969
%cst1 = arith.constant -1 : index
70-
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index }
70+
%0 = test.with_bounds { umin = 0 : index, umax = 0x7fffffffffffffff : index, smin = 0 : index, smax = 0x7fffffffffffffff : index } : index
7171
%1 = arith.cmpi sle, %0, %cst1 : index
7272
return %1: i1
7373
}
7474

7575
// -----
7676

7777
// CHECK-LABEL: func @test
78-
// CHECK: test.reflect_bounds {smax = 24 : index, smin = 0 : index, umax = 24 : index, umin = 0 : index}
79-
func.func @test() -> index {
78+
// CHECK: test.reflect_bounds {smax = 24 : i8, smin = 0 : i8, umax = 24 : i8, umin = 0 : i8}
79+
func.func @test() -> i8 {
8080
%cst1 = arith.constant 1 : i8
81-
%0 = test.with_bounds { umin = 0 : index, umax = 12 : index, smin = 0 : index, smax = 12 : index }
82-
%i8val = arith.index_cast %0 : index to i8
81+
%i8val = test.with_bounds { umin = 0 : i8, umax = 12 : i8, smin = 0 : i8, smax = 12 : i8 } : i8
8382
%shifted = arith.shli %i8val, %cst1 : i8
84-
%si = arith.index_cast %shifted : i8 to index
85-
%1 = test.reflect_bounds %si
86-
return %1: index
83+
%1 = test.reflect_bounds %shifted : i8
84+
return %1: i8
8785
}
8886

8987
// -----
9088

9189
// CHECK-LABEL: func @test
92-
// CHECK: test.reflect_bounds {smax = 127 : index, smin = -128 : index, umax = -1 : index, umin = 0 : index}
93-
func.func @test() -> index {
90+
// CHECK: test.reflect_bounds {smax = 127 : i8, smin = -128 : i8, umax = -1 : i8, umin = 0 : i8}
91+
func.func @test() -> i8 {
9492
%cst1 = arith.constant 1 : i8
95-
%0 = test.with_bounds { umin = 0 : index, umax = 127 : index, smin = 0 : index, smax = 127 : index }
96-
%i8val = arith.index_cast %0 : index to i8
93+
%i8val = test.with_bounds { umin = 0 : i8, umax = 127 : i8, smin = 0 : i8, smax = 127 : i8 } : i8
9794
%shifted = arith.shli %i8val, %cst1 : i8
98-
%si = arith.index_cast %shifted : i8 to index
99-
%1 = test.reflect_bounds %si
100-
return %1: index
95+
%1 = test.reflect_bounds %shifted : i8
96+
return %1: i8
10197
}
10298

mlir/test/Dialect/GPU/int-range-interface.mlir

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,46 @@ func.func @launch_func(%arg0 : index) {
55
%0 = test.with_bounds {
66
umin = 3 : index, umax = 5 : index,
77
smin = 3 : index, smax = 5 : index
8-
}
8+
} : index
99
%1 = test.with_bounds {
1010
umin = 7 : index, umax = 11 : index,
1111
smin = 7 : index, smax = 11 : index
12-
}
12+
} : index
1313
gpu.launch blocks(%block_id_x, %block_id_y, %block_id_z) in (%grid_dim_x = %0, %grid_dim_y = %1, %grid_dim_z = %arg0)
1414
threads(%thread_id_x, %thread_id_y, %thread_id_z) in (%block_dim_x = %arg0, %block_dim_y = %0, %block_dim_z = %1) {
1515

1616
// CHECK: test.reflect_bounds {smax = 5 : index, smin = 3 : index, umax = 5 : index, umin = 3 : index}
1717
// CHECK: test.reflect_bounds {smax = 11 : index, smin = 7 : index, umax = 11 : index, umin = 7 : index}
1818
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
19-
%grid_dim_x0 = test.reflect_bounds %grid_dim_x
20-
%grid_dim_y0 = test.reflect_bounds %grid_dim_y
21-
%grid_dim_z0 = test.reflect_bounds %grid_dim_z
19+
%grid_dim_x0 = test.reflect_bounds %grid_dim_x : index
20+
%grid_dim_y0 = test.reflect_bounds %grid_dim_y : index
21+
%grid_dim_z0 = test.reflect_bounds %grid_dim_z : index
2222

2323
// CHECK: test.reflect_bounds {smax = 4 : index, smin = 0 : index, umax = 4 : index, umin = 0 : index}
2424
// CHECK: test.reflect_bounds {smax = 10 : index, smin = 0 : index, umax = 10 : index, umin = 0 : index}
2525
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
26-
%block_id_x0 = test.reflect_bounds %block_id_x
27-
%block_id_y0 = test.reflect_bounds %block_id_y
28-
%block_id_z0 = test.reflect_bounds %block_id_z
26+
%block_id_x0 = test.reflect_bounds %block_id_x : index
27+
%block_id_y0 = test.reflect_bounds %block_id_y : index
28+
%block_id_z0 = test.reflect_bounds %block_id_z : index
2929

3030
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
3131
// CHECK: test.reflect_bounds {smax = 5 : index, smin = 3 : index, umax = 5 : index, umin = 3 : index}
3232
// CHECK: test.reflect_bounds {smax = 11 : index, smin = 7 : index, umax = 11 : index, umin = 7 : index}
33-
%block_dim_x0 = test.reflect_bounds %block_dim_x
34-
%block_dim_y0 = test.reflect_bounds %block_dim_y
35-
%block_dim_z0 = test.reflect_bounds %block_dim_z
33+
%block_dim_x0 = test.reflect_bounds %block_dim_x : index
34+
%block_dim_y0 = test.reflect_bounds %block_dim_y : index
35+
%block_dim_z0 = test.reflect_bounds %block_dim_z : index
3636

3737
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
3838
// CHECK: test.reflect_bounds {smax = 4 : index, smin = 0 : index, umax = 4 : index, umin = 0 : index}
3939
// CHECK: test.reflect_bounds {smax = 10 : index, smin = 0 : index, umax = 10 : index, umin = 0 : index}
40-
%thread_id_x0 = test.reflect_bounds %thread_id_x
41-
%thread_id_y0 = test.reflect_bounds %thread_id_y
42-
%thread_id_z0 = test.reflect_bounds %thread_id_z
40+
%thread_id_x0 = test.reflect_bounds %thread_id_x : index
41+
%thread_id_y0 = test.reflect_bounds %thread_id_y : index
42+
%thread_id_z0 = test.reflect_bounds %thread_id_z : index
4343

4444
// The launch bounds are not constant, and so this can't infer anything
4545
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
4646
%thread_id_op = gpu.thread_id y
47-
%thread_id_op0 = test.reflect_bounds %thread_id_op
47+
%thread_id_op0 = test.reflect_bounds %thread_id_op : index
4848
gpu.terminator
4949
}
5050

@@ -65,9 +65,9 @@ module attributes {gpu.container_module} {
6565
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
6666
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
6767
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
68-
%grid_dim_x0 = test.reflect_bounds %grid_dim_x
69-
%grid_dim_y0 = test.reflect_bounds %grid_dim_y
70-
%grid_dim_z0 = test.reflect_bounds %grid_dim_z
68+
%grid_dim_x0 = test.reflect_bounds %grid_dim_x : index
69+
%grid_dim_y0 = test.reflect_bounds %grid_dim_y : index
70+
%grid_dim_z0 = test.reflect_bounds %grid_dim_z : index
7171

7272
%block_id_x = gpu.block_id x
7373
%block_id_y = gpu.block_id y
@@ -76,9 +76,9 @@ module attributes {gpu.container_module} {
7676
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
7777
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
7878
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
79-
%block_id_x0 = test.reflect_bounds %block_id_x
80-
%block_id_y0 = test.reflect_bounds %block_id_y
81-
%block_id_z0 = test.reflect_bounds %block_id_z
79+
%block_id_x0 = test.reflect_bounds %block_id_x : index
80+
%block_id_y0 = test.reflect_bounds %block_id_y : index
81+
%block_id_z0 = test.reflect_bounds %block_id_z : index
8282

8383
%block_dim_x = gpu.block_dim x
8484
%block_dim_y = gpu.block_dim y
@@ -87,9 +87,9 @@ module attributes {gpu.container_module} {
8787
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
8888
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
8989
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
90-
%block_dim_x0 = test.reflect_bounds %block_dim_x
91-
%block_dim_y0 = test.reflect_bounds %block_dim_y
92-
%block_dim_z0 = test.reflect_bounds %block_dim_z
90+
%block_dim_x0 = test.reflect_bounds %block_dim_x : index
91+
%block_dim_y0 = test.reflect_bounds %block_dim_y : index
92+
%block_dim_z0 = test.reflect_bounds %block_dim_z : index
9393

9494
%thread_id_x = gpu.thread_id x
9595
%thread_id_y = gpu.thread_id y
@@ -98,9 +98,9 @@ module attributes {gpu.container_module} {
9898
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
9999
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
100100
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
101-
%thread_id_x0 = test.reflect_bounds %thread_id_x
102-
%thread_id_y0 = test.reflect_bounds %thread_id_y
103-
%thread_id_z0 = test.reflect_bounds %thread_id_z
101+
%thread_id_x0 = test.reflect_bounds %thread_id_x : index
102+
%thread_id_y0 = test.reflect_bounds %thread_id_y : index
103+
%thread_id_z0 = test.reflect_bounds %thread_id_z : index
104104

105105
%global_id_x = gpu.global_id x
106106
%global_id_y = gpu.global_id y
@@ -109,9 +109,9 @@ module attributes {gpu.container_module} {
109109
// CHECK: test.reflect_bounds {smax = 9223372036854775807 : index, smin = -9223372036854775808 : index, umax = -8589934592 : index, umin = 0 : index}
110110
// CHECK: test.reflect_bounds {smax = 9223372036854775807 : index, smin = -9223372036854775808 : index, umax = -8589934592 : index, umin = 0 : index}
111111
// CHECK: test.reflect_bounds {smax = 9223372036854775807 : index, smin = -9223372036854775808 : index, umax = -8589934592 : index, umin = 0 : index}
112-
%global_id_x0 = test.reflect_bounds %global_id_x
113-
%global_id_y0 = test.reflect_bounds %global_id_y
114-
%global_id_z0 = test.reflect_bounds %global_id_z
112+
%global_id_x0 = test.reflect_bounds %global_id_x : index
113+
%global_id_y0 = test.reflect_bounds %global_id_y : index
114+
%global_id_z0 = test.reflect_bounds %global_id_z : index
115115

116116
%subgroup_size = gpu.subgroup_size : index
117117
%lane_id = gpu.lane_id
@@ -122,10 +122,10 @@ module attributes {gpu.container_module} {
122122
// CHECK: test.reflect_bounds {smax = 127 : index, smin = 0 : index, umax = 127 : index, umin = 0 : index}
123123
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
124124
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
125-
%subgroup_size0 = test.reflect_bounds %subgroup_size
126-
%lane_id0 = test.reflect_bounds %lane_id
127-
%num_subgroups0 = test.reflect_bounds %num_subgroups
128-
%subgroup_id0 = test.reflect_bounds %subgroup_id
125+
%subgroup_size0 = test.reflect_bounds %subgroup_size : index
126+
%lane_id0 = test.reflect_bounds %lane_id : index
127+
%num_subgroups0 = test.reflect_bounds %num_subgroups : index
128+
%subgroup_id0 = test.reflect_bounds %subgroup_id : index
129129

130130
llvm.return
131131
}
@@ -148,9 +148,9 @@ module attributes {gpu.container_module} {
148148
// CHECK: test.reflect_bounds {smax = 20 : index, smin = 20 : index, umax = 20 : index, umin = 20 : index}
149149
// CHECK: test.reflect_bounds {smax = 24 : index, smin = 24 : index, umax = 24 : index, umin = 24 : index}
150150
// CHECK: test.reflect_bounds {smax = 28 : index, smin = 28 : index, umax = 28 : index, umin = 28 : index}
151-
%grid_dim_x0 = test.reflect_bounds %grid_dim_x
152-
%grid_dim_y0 = test.reflect_bounds %grid_dim_y
153-
%grid_dim_z0 = test.reflect_bounds %grid_dim_z
151+
%grid_dim_x0 = test.reflect_bounds %grid_dim_x : index
152+
%grid_dim_y0 = test.reflect_bounds %grid_dim_y : index
153+
%grid_dim_z0 = test.reflect_bounds %grid_dim_z : index
154154

155155
%block_id_x = gpu.block_id x
156156
%block_id_y = gpu.block_id y
@@ -159,9 +159,9 @@ module attributes {gpu.container_module} {
159159
// CHECK: test.reflect_bounds {smax = 19 : index, smin = 0 : index, umax = 19 : index, umin = 0 : index}
160160
// CHECK: test.reflect_bounds {smax = 23 : index, smin = 0 : index, umax = 23 : index, umin = 0 : index}
161161
// CHECK: test.reflect_bounds {smax = 27 : index, smin = 0 : index, umax = 27 : index, umin = 0 : index}
162-
%block_id_x0 = test.reflect_bounds %block_id_x
163-
%block_id_y0 = test.reflect_bounds %block_id_y
164-
%block_id_z0 = test.reflect_bounds %block_id_z
162+
%block_id_x0 = test.reflect_bounds %block_id_x : index
163+
%block_id_y0 = test.reflect_bounds %block_id_y : index
164+
%block_id_z0 = test.reflect_bounds %block_id_z : index
165165

166166
%block_dim_x = gpu.block_dim x
167167
%block_dim_y = gpu.block_dim y
@@ -170,9 +170,9 @@ module attributes {gpu.container_module} {
170170
// CHECK: test.reflect_bounds {smax = 8 : index, smin = 8 : index, umax = 8 : index, umin = 8 : index}
171171
// CHECK: test.reflect_bounds {smax = 12 : index, smin = 12 : index, umax = 12 : index, umin = 12 : index}
172172
// CHECK: test.reflect_bounds {smax = 16 : index, smin = 16 : index, umax = 16 : index, umin = 16 : index}
173-
%block_dim_x0 = test.reflect_bounds %block_dim_x
174-
%block_dim_y0 = test.reflect_bounds %block_dim_y
175-
%block_dim_z0 = test.reflect_bounds %block_dim_z
173+
%block_dim_x0 = test.reflect_bounds %block_dim_x : index
174+
%block_dim_y0 = test.reflect_bounds %block_dim_y : index
175+
%block_dim_z0 = test.reflect_bounds %block_dim_z : index
176176

177177
%thread_id_x = gpu.thread_id x
178178
%thread_id_y = gpu.thread_id y
@@ -181,9 +181,9 @@ module attributes {gpu.container_module} {
181181
// CHECK: test.reflect_bounds {smax = 7 : index, smin = 0 : index, umax = 7 : index, umin = 0 : index}
182182
// CHECK: test.reflect_bounds {smax = 11 : index, smin = 0 : index, umax = 11 : index, umin = 0 : index}
183183
// CHECK: test.reflect_bounds {smax = 15 : index, smin = 0 : index, umax = 15 : index, umin = 0 : index}
184-
%thread_id_x0 = test.reflect_bounds %thread_id_x
185-
%thread_id_y0 = test.reflect_bounds %thread_id_y
186-
%thread_id_z0 = test.reflect_bounds %thread_id_z
184+
%thread_id_x0 = test.reflect_bounds %thread_id_x : index
185+
%thread_id_y0 = test.reflect_bounds %thread_id_y : index
186+
%thread_id_z0 = test.reflect_bounds %thread_id_z : index
187187

188188
%global_id_x = gpu.global_id x
189189
%global_id_y = gpu.global_id y
@@ -192,9 +192,9 @@ module attributes {gpu.container_module} {
192192
// CHECK: test.reflect_bounds {smax = 159 : index, smin = 0 : index, umax = 159 : index, umin = 0 : index}
193193
// CHECK: test.reflect_bounds {smax = 287 : index, smin = 0 : index, umax = 287 : index, umin = 0 : index}
194194
// CHECK: test.reflect_bounds {smax = 447 : index, smin = 0 : index, umax = 447 : index, umin = 0 : index}
195-
%global_id_x0 = test.reflect_bounds %global_id_x
196-
%global_id_y0 = test.reflect_bounds %global_id_y
197-
%global_id_z0 = test.reflect_bounds %global_id_z
195+
%global_id_x0 = test.reflect_bounds %global_id_x : index
196+
%global_id_y0 = test.reflect_bounds %global_id_y : index
197+
%global_id_z0 = test.reflect_bounds %global_id_z : index
198198

199199
%subgroup_size = gpu.subgroup_size : index
200200
%lane_id = gpu.lane_id
@@ -205,10 +205,10 @@ module attributes {gpu.container_module} {
205205
// CHECK: test.reflect_bounds {smax = 127 : index, smin = 0 : index, umax = 127 : index, umin = 0 : index}
206206
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
207207
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
208-
%subgroup_size0 = test.reflect_bounds %subgroup_size
209-
%lane_id0 = test.reflect_bounds %lane_id
210-
%num_subgroups0 = test.reflect_bounds %num_subgroups
211-
%subgroup_id0 = test.reflect_bounds %subgroup_id
208+
%subgroup_size0 = test.reflect_bounds %subgroup_size : index
209+
%lane_id0 = test.reflect_bounds %lane_id : index
210+
%num_subgroups0 = test.reflect_bounds %num_subgroups : index
211+
%subgroup_id0 = test.reflect_bounds %subgroup_id : index
212212

213213
gpu.return
214214
}

0 commit comments

Comments
 (0)