@@ -51,15 +51,15 @@ func.func @omp_terminator() -> () {
5151 omp.terminator
5252}
5353
54- func.func @omp_parallel (%data_var : memref <i32 >, %if_cond : i1 , %num_threads : si32 ) -> () {
55- // CHECK: omp.parallel if(%{{.*}}) num_threads(%{{.*}} : si32 ) allocate(%{{.*}} : memref<i32> -> %{{.*}} : memref<i32>)
54+ func.func @omp_parallel (%data_var : memref <i32 >, %if_cond : i1 , %num_threads : i32 ) -> () {
55+ // CHECK: omp.parallel if(%{{.*}}) num_threads(%{{.*}} : i32 ) allocate(%{{.*}} : memref<i32> -> %{{.*}} : memref<i32>)
5656 " omp.parallel" (%if_cond , %num_threads , %data_var , %data_var ) ({
5757
5858 // test without if condition
59- // CHECK: omp.parallel num_threads(%{{.*}} : si32 ) allocate(%{{.*}} : memref<i32> -> %{{.*}} : memref<i32>)
59+ // CHECK: omp.parallel num_threads(%{{.*}} : i32 ) allocate(%{{.*}} : memref<i32> -> %{{.*}} : memref<i32>)
6060 " omp.parallel" (%num_threads , %data_var , %data_var ) ({
6161 omp.terminator
62- }) {operand_segment_sizes = dense <[0 ,1 ,1 ,1 ,0 ]> : vector <5 xi32 >} : (si32 , memref <i32 >, memref <i32 >) -> ()
62+ }) {operand_segment_sizes = dense <[0 ,1 ,1 ,1 ,0 ]> : vector <5 xi32 >} : (i32 , memref <i32 >, memref <i32 >) -> ()
6363
6464 // CHECK: omp.barrier
6565 omp.barrier
@@ -71,13 +71,13 @@ func.func @omp_parallel(%data_var : memref<i32>, %if_cond : i1, %num_threads : s
7171 }) {operand_segment_sizes = dense <[1 ,0 ,1 ,1 ,0 ]> : vector <5 xi32 >} : (i1 , memref <i32 >, memref <i32 >) -> ()
7272
7373 // test without allocate
74- // CHECK: omp.parallel if(%{{.*}}) num_threads(%{{.*}} : si32 )
74+ // CHECK: omp.parallel if(%{{.*}}) num_threads(%{{.*}} : i32 )
7575 " omp.parallel" (%if_cond , %num_threads ) ({
7676 omp.terminator
77- }) {operand_segment_sizes = dense <[1 ,1 ,0 ,0 ,0 ]> : vector <5 xi32 >} : (i1 , si32 ) -> ()
77+ }) {operand_segment_sizes = dense <[1 ,1 ,0 ,0 ,0 ]> : vector <5 xi32 >} : (i1 , i32 ) -> ()
7878
7979 omp.terminator
80- }) {operand_segment_sizes = dense <[1 ,1 ,1 ,1 ,0 ]> : vector <5 xi32 >, proc_bind_val = #omp <" procbindkind spread" >} : (i1 , si32 , memref <i32 >, memref <i32 >) -> ()
80+ }) {operand_segment_sizes = dense <[1 ,1 ,1 ,1 ,0 ]> : vector <5 xi32 >, proc_bind_val = #omp <" procbindkind spread" >} : (i1 , i32 , memref <i32 >, memref <i32 >) -> ()
8181
8282 // test with multiple parameters for single variadic argument
8383 // CHECK: omp.parallel allocate(%{{.*}} : memref<i32> -> %{{.*}} : memref<i32>)
@@ -88,14 +88,26 @@ func.func @omp_parallel(%data_var : memref<i32>, %if_cond : i1, %num_threads : s
8888 return
8989}
9090
91- func.func @omp_parallel_pretty (%data_var : memref <i32 >, %if_cond : i1 , %num_threads : si32 , %allocator : si32 ) -> () {
91+ func.func @omp_parallel_pretty (%data_var : memref <i32 >, %if_cond : i1 , %num_threads : i32 , %allocator : si32 ) -> () {
9292 // CHECK: omp.parallel
9393 omp.parallel {
9494 omp.terminator
9595 }
9696
97- // CHECK: omp.parallel num_threads(%{{.*}} : si32)
98- omp.parallel num_threads (%num_threads : si32 ) {
97+ // CHECK: omp.parallel num_threads(%{{.*}} : i32)
98+ omp.parallel num_threads (%num_threads : i32 ) {
99+ omp.terminator
100+ }
101+
102+ %n_index = arith.constant 2 : index
103+ // CHECK: omp.parallel num_threads(%{{.*}} : index)
104+ omp.parallel num_threads (%n_index : index ) {
105+ omp.terminator
106+ }
107+
108+ %n_i64 = arith.constant 4 : i64
109+ // CHECK: omp.parallel num_threads(%{{.*}} : i64)
110+ omp.parallel num_threads (%n_i64 : i64 ) {
99111 omp.terminator
100112 }
101113
@@ -113,8 +125,8 @@ func.func @omp_parallel_pretty(%data_var : memref<i32>, %if_cond : i1, %num_thre
113125 omp.terminator
114126 }
115127
116- // CHECK omp.parallel if(%{{.*}}) num_threads(%{{.*}} : si32 ) private(%{{.*}} : memref<i32>) proc_bind(close)
117- omp.parallel num_threads (%num_threads : si32 ) if (%if_cond: i1 ) proc_bind (close ) {
128+ // CHECK omp.parallel if(%{{.*}}) num_threads(%{{.*}} : i32 ) private(%{{.*}} : memref<i32>) proc_bind(close)
129+ omp.parallel num_threads (%num_threads : i32 ) if (%if_cond: i1 ) proc_bind (close ) {
118130 omp.terminator
119131 }
120132
@@ -347,14 +359,14 @@ func.func @omp_simdloop_pretty_multiple(%lb1 : index, %ub1 : index, %step1 : ind
347359}
348360
349361// CHECK-LABEL: omp_target
350- func.func @omp_target (%if_cond : i1 , %device : si32 , %num_threads : si32 ) -> () {
362+ func.func @omp_target (%if_cond : i1 , %device : si32 , %num_threads : i32 ) -> () {
351363
352364 // Test with optional operands; if_expr, device, thread_limit, private, firstprivate and nowait.
353365 // CHECK: omp.target if({{.*}}) device({{.*}}) thread_limit({{.*}}) nowait
354366 " omp.target" (%if_cond , %device , %num_threads ) ({
355367 // CHECK: omp.terminator
356368 omp.terminator
357- }) {nowait , operand_segment_sizes = dense <[1 ,1 ,1 ]>: vector <3 xi32 >} : ( i1 , si32 , si32 ) -> ()
369+ }) {nowait , operand_segment_sizes = dense <[1 ,1 ,1 ]>: vector <3 xi32 >} : ( i1 , si32 , i32 ) -> ()
358370
359371 // CHECK: omp.barrier
360372 omp.barrier
@@ -363,14 +375,14 @@ func.func @omp_target(%if_cond : i1, %device : si32, %num_threads : si32) -> ()
363375}
364376
365377// CHECK-LABEL: omp_target_pretty
366- func.func @omp_target_pretty (%if_cond : i1 , %device : si32 , %num_threads : si32 ) -> () {
378+ func.func @omp_target_pretty (%if_cond : i1 , %device : si32 , %num_threads : i32 ) -> () {
367379 // CHECK: omp.target if({{.*}}) device({{.*}})
368380 omp.target if (%if_cond ) device (%device : si32 ) {
369381 omp.terminator
370382 }
371383
372384 // CHECK: omp.target if({{.*}}) device({{.*}}) nowait
373- omp.target if (%if_cond ) device (%device : si32 ) thread_limit (%num_threads : si32 ) nowait {
385+ omp.target if (%if_cond ) device (%device : si32 ) thread_limit (%num_threads : i32 ) nowait {
374386 omp.terminator
375387 }
376388
0 commit comments