@@ -355,6 +355,7 @@ func.func @omp_simd_aligned_mismatch(%arg0 : index, %arg1 : index,
355
355
omp.loop_nest (%iv ) : index = (%arg0 ) to (%arg1 ) step (%arg2 ) {
356
356
omp.yield
357
357
}
358
+ omp.terminator
358
359
}) {alignments = [128 ],
359
360
operandSegmentSizes = array <i32 : 2 , 0 , 0 , 0 , 0 , 0 , 0 >} : (memref <i32 >, memref <i32 >) -> ()
360
361
return
@@ -370,6 +371,7 @@ func.func @omp_simd_aligned_negative(%arg0 : index, %arg1 : index,
370
371
omp.loop_nest (%iv ) : index = (%arg0 ) to (%arg1 ) step (%arg2 ) {
371
372
omp.yield
372
373
}
374
+ omp.terminator
373
375
}) {alignments = [-1 , 128 ], operandSegmentSizes = array<i32 : 2 , 0 , 0 , 0 , 0 , 0 , 0 >} : (memref <i32 >, memref <i32 >) -> ()
374
376
return
375
377
}
@@ -384,6 +386,7 @@ func.func @omp_simd_unexpected_alignment(%arg0 : index, %arg1 : index,
384
386
omp.loop_nest (%iv ) : index = (%arg0 ) to (%arg1 ) step (%arg2 ) {
385
387
omp.yield
386
388
}
389
+ omp.terminator
387
390
}) {alignments = [1 , 128 ]} : () -> ()
388
391
return
389
392
}
@@ -398,6 +401,7 @@ func.func @omp_simd_aligned_float(%arg0 : index, %arg1 : index,
398
401
omp.loop_nest (%iv ) : index = (%arg0 ) to (%arg1 ) step (%arg2 ) {
399
402
omp.yield
400
403
}
404
+ omp.terminator
401
405
}) {alignments = [1.5 , 128 ], operandSegmentSizes = array<i32 : 2 , 0 , 0 , 0 , 0 , 0 , 0 >} : (memref <i32 >, memref <i32 >) -> ()
402
406
return
403
407
}
@@ -412,6 +416,7 @@ func.func @omp_simd_aligned_the_same_var(%arg0 : index, %arg1 : index,
412
416
omp.loop_nest (%iv ) : index = (%arg0 ) to (%arg1 ) step (%arg2 ) {
413
417
omp.yield
414
418
}
419
+ omp.terminator
415
420
}) {alignments = [1 , 128 ], operandSegmentSizes = array<i32 : 2 , 0 , 0 , 0 , 0 , 0 , 0 >} : (memref <i32 >, memref <i32 >) -> ()
416
421
return
417
422
}
@@ -426,6 +431,7 @@ func.func @omp_simd_nontemporal_the_same_var(%arg0 : index, %arg1 : index,
426
431
omp.loop_nest (%iv ) : index = (%arg0 ) to (%arg1 ) step (%arg2 ) {
427
432
omp.yield
428
433
}
434
+ omp.terminator
429
435
}) {operandSegmentSizes = array<i32 : 0 , 0 , 0 , 0 , 2 , 0 , 0 >} : (memref <i32 >, memref <i32 >) -> ()
430
436
return
431
437
}
@@ -438,6 +444,7 @@ func.func @omp_simd_order_value(%lb : index, %ub : index, %step : index) {
438
444
omp.loop_nest (%iv ) : index = (%arg0 ) to (%arg1 ) step (%arg2 ) {
439
445
omp.yield
440
446
}
447
+ omp.terminator
441
448
}
442
449
return
443
450
}
@@ -450,6 +457,7 @@ func.func @omp_simd_reproducible_order(%lb : index, %ub : index, %step : index)
450
457
omp.loop_nest (%iv ) : index = (%arg0 ) to (%arg1 ) step (%arg2 ) {
451
458
omp.yield
452
459
}
460
+ omp.terminator
453
461
}
454
462
return
455
463
}
@@ -460,6 +468,7 @@ func.func @omp_simd_unconstrained_order(%lb : index, %ub : index, %step : index)
460
468
omp.loop_nest (%iv ) : index = (%arg0 ) to (%arg1 ) step (%arg2 ) {
461
469
omp.yield
462
470
}
471
+ omp.terminator
463
472
}
464
473
return
465
474
}
@@ -470,6 +479,7 @@ func.func @omp_simd_pretty_simdlen(%lb : index, %ub : index, %step : index) -> (
470
479
omp.loop_nest (%iv ) : index = (%lb ) to (%ub ) step (%step ) {
471
480
omp.yield
472
481
}
482
+ omp.terminator
473
483
}
474
484
return
475
485
}
@@ -482,6 +492,7 @@ func.func @omp_simd_pretty_safelen(%lb : index, %ub : index, %step : index) -> (
482
492
omp.loop_nest (%iv ) : index = (%lb ) to (%ub ) step (%step ) {
483
493
omp.yield
484
494
}
495
+ omp.terminator
485
496
}
486
497
return
487
498
}
@@ -494,6 +505,7 @@ func.func @omp_simd_pretty_simdlen_safelen(%lb : index, %ub : index, %step : ind
494
505
omp.loop_nest (%iv ) : index = (%lb ) to (%ub ) step (%step ) {
495
506
omp.yield
496
507
}
508
+ omp.terminator
497
509
}
498
510
return
499
511
}
@@ -1838,6 +1850,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
1838
1850
omp.loop_nest (%i , %j ) : i32 = (%lb , %ub ) to (%ub , %lb ) step (%step , %step ) {
1839
1851
omp.yield
1840
1852
}
1853
+ omp.terminator
1841
1854
}) {operandSegmentSizes = array<i32 : 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 >} : (memref <i32 >) -> ()
1842
1855
return
1843
1856
}
@@ -1852,6 +1865,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
1852
1865
omp.loop_nest (%i , %j ) : i32 = (%lb , %ub ) to (%ub , %lb ) step (%step , %step ) {
1853
1866
omp.yield
1854
1867
}
1868
+ omp.terminator
1855
1869
}) {operandSegmentSizes = array<i32 : 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 2 >, reduction_syms = [@add_f32 ]} : (!llvm.ptr , !llvm.ptr ) -> ()
1856
1870
return
1857
1871
}
@@ -1865,6 +1879,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
1865
1879
omp.loop_nest (%i , %j ) : i32 = (%lb , %ub ) to (%ub , %lb ) step (%step , %step ) {
1866
1880
omp.yield
1867
1881
}
1882
+ omp.terminator
1868
1883
}) {operandSegmentSizes = array<i32 : 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 >, reduction_syms = [@add_f32 , @add_f32 ]} : (!llvm.ptr ) -> ()
1869
1884
return
1870
1885
}
@@ -1879,6 +1894,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
1879
1894
omp.loop_nest (%i , %j ) : i32 = (%lb , %ub ) to (%ub , %lb ) step (%step , %step ) {
1880
1895
omp.yield
1881
1896
}
1897
+ omp.terminator
1882
1898
}) {in_reduction_syms = [@add_f32 ], operandSegmentSizes = array<i32 : 0 , 0 , 0 , 0 , 0 , 2 , 0 , 0 , 0 , 0 >} : (!llvm.ptr , !llvm.ptr ) -> ()
1883
1899
return
1884
1900
}
@@ -1892,6 +1908,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
1892
1908
omp.loop_nest (%i , %j ) : i32 = (%lb , %ub ) to (%ub , %lb ) step (%step , %step ) {
1893
1909
omp.yield
1894
1910
}
1911
+ omp.terminator
1895
1912
}) {in_reduction_syms = [@add_f32 , @add_f32 ], operandSegmentSizes = array<i32 : 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 >} : (!llvm.ptr ) -> ()
1896
1913
return
1897
1914
}
@@ -1918,6 +1935,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
1918
1935
omp.loop_nest (%i , %j ) : i32 = (%lb , %ub ) to (%ub , %lb ) step (%step , %step ) {
1919
1936
omp.yield
1920
1937
}
1938
+ omp.terminator
1921
1939
}
1922
1940
return
1923
1941
}
@@ -1943,6 +1961,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
1943
1961
omp.loop_nest (%i , %j ) : i32 = (%lb , %ub ) to (%ub , %lb ) step (%step , %step ) {
1944
1962
omp.yield
1945
1963
}
1964
+ omp.terminator
1946
1965
}
1947
1966
return
1948
1967
}
@@ -1956,6 +1975,7 @@ func.func @taskloop(%lb: i32, %ub: i32, %step: i32) {
1956
1975
omp.loop_nest (%i , %j ) : i32 = (%lb , %ub ) to (%ub , %lb ) step (%step , %step ) {
1957
1976
omp.yield
1958
1977
}
1978
+ omp.terminator
1959
1979
}
1960
1980
return
1961
1981
}
@@ -2153,31 +2173,37 @@ func.func @omp_target_depend(%data_var: memref<i32>) {
2153
2173
2154
2174
// -----
2155
2175
2156
- func.func @omp_distribute_schedule (%chunk_size : i32 ) -> () {
2176
+ func.func @omp_distribute_schedule (%chunk_size : i32 , %lb : i32 , %ub : i32 , %step : i32 ) -> () {
2157
2177
// expected-error @below {{op chunk size set without dist_schedule_static being present}}
2158
2178
" omp.distribute" (%chunk_size ) <{operandSegmentSizes = array<i32 : 0 , 0 , 1 , 0 >}> ({
2159
- " omp.terminator" () : () -> ()
2160
- }) : (i32 ) -> ()
2179
+ omp.loop_nest (%iv ) : i32 = (%lb ) to (%ub ) step (%step ) {
2180
+ " omp.yield" () : () -> ()
2181
+ }
2182
+ " omp.terminator" () : () -> ()
2183
+ }) : (i32 ) -> ()
2161
2184
}
2162
2185
2163
2186
// -----
2164
2187
2165
- func.func @omp_distribute_allocate (%data_var : memref <i32 >) -> () {
2188
+ func.func @omp_distribute_allocate (%data_var : memref <i32 >, %lb : i32 , %ub : i32 , %step : i32 ) -> () {
2166
2189
// expected-error @below {{expected equal sizes for allocate and allocator variables}}
2167
2190
" omp.distribute" (%data_var ) <{operandSegmentSizes = array<i32 : 1 , 0 , 0 , 0 >}> ({
2168
- " omp.terminator" () : () -> ()
2169
- }) : (memref <i32 >) -> ()
2191
+ omp.loop_nest (%iv ) : i32 = (%lb ) to (%ub ) step (%step ) {
2192
+ " omp.yield" () : () -> ()
2193
+ }
2194
+ " omp.terminator" () : () -> ()
2195
+ }) : (memref <i32 >) -> ()
2170
2196
}
2171
2197
2172
2198
// -----
2173
2199
2174
2200
func.func @omp_distribute_wrapper (%lb: index , %ub: index , %step: index ) -> () {
2175
2201
// expected-error @below {{op second nested op in loop wrapper is not a terminator}}
2176
2202
omp.distribute {
2177
- omp.loop_nest (%iv ) : index = (%lb ) to (%ub ) step (%step ) {
2178
- " omp.yield" () : () -> ()
2179
- }
2180
- %0 = arith.constant 0 : i32
2203
+ omp.loop_nest (%iv ) : index = (%lb ) to (%ub ) step (%step ) {
2204
+ " omp.yield" () : () -> ()
2205
+ }
2206
+ %0 = arith.constant 0 : i32
2181
2207
}
2182
2208
}
2183
2209
0 commit comments