@@ -62,6 +62,9 @@ func.func @launch_func(%arg0 : index) {
6262 " test.compare" (%thread_id_z , %c0 ) {cmp = " GE" } : (index , index ) -> ()
6363 // expected-remark @below{{true}}
6464 " test.compare" (%thread_id_z , %c2 ) {cmp = " LT" } : (index , index ) -> ()
65+
66+ // expected-remark @below{{true}}
67+ " test.compare" (%thread_id_x , %block_dim_x ) {cmp = " LT" } : (index , index ) -> ()
6568 gpu.terminator
6669 }
6770
@@ -114,6 +117,8 @@ module attributes {gpu.container_module} {
114117 // expected-remark @below{{true}}
115118 " test.compare" (%block_dim_x , %c8 ) {cmp = " EQ" } : (index , index ) -> ()
116119
120+ // expected-remark @below{{true}}
121+ " test.compare" (%thread_id_x , %block_dim_x ) {cmp = " LT" } : (index , index ) -> ()
117122 gpu.return
118123 }
119124 }
@@ -144,6 +149,10 @@ module attributes {gpu.container_module} {
144149 // expected-remark @below{{true}}
145150 " test.compare" (%thread_id_x , %c8 ) {cmp = " LT" } : (index , index ) -> ()
146151
152+ // Note: there isn't a way to express the ID <= size constraint
153+ // in this form
154+ // expected-error @below{{unknown}}
155+ " test.compare" (%thread_id_x , %block_dim_x ) {cmp = " LT" } : (index , index ) -> ()
147156 gpu.return
148157 }
149158 }
0 commit comments