1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals 2; RUN: opt -S -passes=openmp-opt < %s | FileCheck %s --check-prefixes=CHECK 3; RUN: opt -S -passes=openmp-opt -openmp-opt-disable-spmdization < %s | FileCheck %s --check-prefixes=CHECK-DISABLE-SPMDIZATION 4; 5; int G; 6; 7; void leaf() { 8; G = 42; 9; } 10; 11; void spmd_helper() { 12; leaf(); 13; #pragma omp parallel 14; unknown(); 15; } 16; void spmd() { 17; #pragma omp target 18; spmd_helper(); 19; } 20; 21; void generic_helper() { 22; leaf(); 23; } 24; void generic() { 25; #pragma omp target 26; generic_helper(); 27; } 28; 29target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64" 30target triple = "nvptx64" 31 32%struct.ident_t = type { i32, i32, i32, i32, ptr } 33%struct.ConfigurationEnvironmentTy = type { i8, i8, i8, i32, i32, i32, i32, i32, i32 } 34%struct.KernelEnvironmentTy = type { %struct.ConfigurationEnvironmentTy, ptr, ptr } 35 36@0 = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1 37@1 = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 0, i32 0, ptr @0 }, align 8 38@2 = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 2, i32 0, ptr @0 }, align 8 39@G = external global i32, align 4 40@__omp_offloading_2b_10393b5_spmd_l12_kernel_environment = local_unnamed_addr constant %struct.KernelEnvironmentTy { %struct.ConfigurationEnvironmentTy { i8 0, i8 0, i8 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 }, ptr @1, ptr null } 41@__omp_offloading_2b_10393b5_generic_l20_kernel_environment = local_unnamed_addr constant %struct.KernelEnvironmentTy { %struct.ConfigurationEnvironmentTy { i8 0, i8 0, i8 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 }, ptr @1, ptr null } 42 43;. 44; CHECK: @[[GLOB0:[0-9]+]] = private unnamed_addr constant [23 x i8] c" 45; CHECK: @[[GLOB1:[0-9]+]] = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 0, i32 0, ptr @[[GLOB0]] }, align 8 46; CHECK: @[[GLOB2:[0-9]+]] = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 2, i32 0, ptr @[[GLOB0]] }, align 8 47; CHECK: @G = external global i32, align 4 48; CHECK: @__omp_offloading_2b_10393b5_spmd_l12_kernel_environment = local_unnamed_addr constant %struct.KernelEnvironmentTy { %struct.ConfigurationEnvironmentTy { i8 0, i8 1, i8 3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 }, ptr @[[GLOB1]], ptr null } 49; CHECK: @__omp_offloading_2b_10393b5_generic_l20_kernel_environment = local_unnamed_addr constant %struct.KernelEnvironmentTy { %struct.ConfigurationEnvironmentTy { i8 0, i8 0, i8 3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 }, ptr @[[GLOB1]], ptr null } 50; CHECK: @[[GLOB3:[0-9]+]] = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 0, i32 22, ptr @[[GLOB0]] }, align 8 51;. 52; CHECK-DISABLE-SPMDIZATION: @[[GLOB0:[0-9]+]] = private unnamed_addr constant [23 x i8] c" 53; CHECK-DISABLE-SPMDIZATION: @[[GLOB1:[0-9]+]] = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 0, i32 0, ptr @[[GLOB0]] }, align 8 54; CHECK-DISABLE-SPMDIZATION: @[[GLOB2:[0-9]+]] = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 2, i32 0, ptr @[[GLOB0]] }, align 8 55; CHECK-DISABLE-SPMDIZATION: @G = external global i32, align 4 56; CHECK-DISABLE-SPMDIZATION: @__omp_offloading_2b_10393b5_spmd_l12_kernel_environment = local_unnamed_addr constant %struct.KernelEnvironmentTy { %struct.ConfigurationEnvironmentTy { i8 0, i8 1, i8 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 }, ptr @[[GLOB1]], ptr null } 57; CHECK-DISABLE-SPMDIZATION: @__omp_offloading_2b_10393b5_generic_l20_kernel_environment = local_unnamed_addr constant %struct.KernelEnvironmentTy { %struct.ConfigurationEnvironmentTy { i8 0, i8 0, i8 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 }, ptr @[[GLOB1]], ptr null } 58;. 59define weak ptx_kernel void @__omp_offloading_2b_10393b5_spmd_l12(ptr %dyn) "kernel" #0 { 60; CHECK-LABEL: define {{[^@]+}}@__omp_offloading_2b_10393b5_spmd_l12 61; CHECK-SAME: (ptr [[DYN:%.*]]) #[[ATTR0:[0-9]+]] { 62; CHECK-NEXT: entry: 63; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @__omp_offloading_2b_10393b5_spmd_l12_kernel_environment, ptr [[DYN]]) 64; CHECK-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1 65; CHECK-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]] 66; CHECK: user_code.entry: 67; CHECK-NEXT: call void @spmd_helper() #[[ATTR6:[0-9]+]] 68; CHECK-NEXT: call void @__kmpc_target_deinit() 69; CHECK-NEXT: ret void 70; CHECK: worker.exit: 71; CHECK-NEXT: ret void 72; 73; CHECK-DISABLE-SPMDIZATION-LABEL: define {{[^@]+}}@__omp_offloading_2b_10393b5_spmd_l12 74; CHECK-DISABLE-SPMDIZATION-SAME: (ptr [[DYN:%.*]]) #[[ATTR0:[0-9]+]] { 75; CHECK-DISABLE-SPMDIZATION-NEXT: entry: 76; CHECK-DISABLE-SPMDIZATION-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @__omp_offloading_2b_10393b5_spmd_l12_kernel_environment, ptr [[DYN]]) 77; CHECK-DISABLE-SPMDIZATION-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1 78; CHECK-DISABLE-SPMDIZATION-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]] 79; CHECK-DISABLE-SPMDIZATION: user_code.entry: 80; CHECK-DISABLE-SPMDIZATION-NEXT: call void @spmd_helper() #[[ATTR6:[0-9]+]] 81; CHECK-DISABLE-SPMDIZATION-NEXT: call void @__kmpc_target_deinit() 82; CHECK-DISABLE-SPMDIZATION-NEXT: ret void 83; CHECK-DISABLE-SPMDIZATION: worker.exit: 84; CHECK-DISABLE-SPMDIZATION-NEXT: ret void 85; 86entry: 87 %0 = call i32 @__kmpc_target_init(ptr @__omp_offloading_2b_10393b5_spmd_l12_kernel_environment, ptr %dyn) 88 %exec_user_code = icmp eq i32 %0, -1 89 br i1 %exec_user_code, label %user_code.entry, label %worker.exit 90 91user_code.entry: ; preds = %entry 92 call void @spmd_helper() #5 93 call void @__kmpc_target_deinit() 94 ret void 95 96worker.exit: ; preds = %entry 97 ret void 98} 99 100; Make it a weak definition so we will apply custom state machine rewriting but can't use the body in the reasoning. 101define weak i32 @__kmpc_target_init(ptr, ptr) { 102; CHECK-LABEL: define {{[^@]+}}@__kmpc_target_init 103; CHECK-SAME: (ptr [[TMP0:%.*]], ptr [[TMP1:%.*]]) { 104; CHECK-NEXT: ret i32 0 105; 106; CHECK-DISABLE-SPMDIZATION-LABEL: define {{[^@]+}}@__kmpc_target_init 107; CHECK-DISABLE-SPMDIZATION-SAME: (ptr [[TMP0:%.*]], ptr [[TMP1:%.*]]) { 108; CHECK-DISABLE-SPMDIZATION-NEXT: ret i32 0 109; 110 ret i32 0 111} 112 113declare void @__kmpc_target_deinit() 114 115; Function Attrs: convergent noinline norecurse nounwind 116define weak ptx_kernel void @__omp_offloading_2b_10393b5_generic_l20(ptr %dyn) #0 { 117; CHECK-LABEL: define {{[^@]+}}@__omp_offloading_2b_10393b5_generic_l20 118; CHECK-SAME: (ptr [[DYN:%.*]]) #[[ATTR0]] { 119; CHECK-NEXT: entry: 120; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @__omp_offloading_2b_10393b5_generic_l20_kernel_environment, ptr [[DYN]]) 121; CHECK-NEXT: [[THREAD_ID_IN_BLOCK:%.*]] = call i32 @__kmpc_get_hardware_thread_id_in_block() 122; CHECK-NEXT: [[THREAD_IS_MAIN:%.*]] = icmp ne i32 [[THREAD_ID_IN_BLOCK]], 0 123; CHECK-NEXT: br i1 [[THREAD_IS_MAIN]], label [[EXIT_THREADS:%.*]], label [[MAIN_THREAD_USER_CODE:%.*]] 124; CHECK: exit.threads: 125; CHECK-NEXT: ret void 126; CHECK: main.thread.user_code: 127; CHECK-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1 128; CHECK-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]] 129; CHECK: user_code.entry: 130; CHECK-NEXT: call void @generic_helper() #[[ATTR7:[0-9]+]] 131; CHECK-NEXT: call void @__kmpc_target_deinit() 132; CHECK-NEXT: ret void 133; CHECK: worker.exit: 134; CHECK-NEXT: ret void 135; 136; CHECK-DISABLE-SPMDIZATION-LABEL: define {{[^@]+}}@__omp_offloading_2b_10393b5_generic_l20 137; CHECK-DISABLE-SPMDIZATION-SAME: (ptr [[DYN:%.*]]) #[[ATTR0]] { 138; CHECK-DISABLE-SPMDIZATION-NEXT: entry: 139; CHECK-DISABLE-SPMDIZATION-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @__omp_offloading_2b_10393b5_generic_l20_kernel_environment, ptr [[DYN]]) 140; CHECK-DISABLE-SPMDIZATION-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1 141; CHECK-DISABLE-SPMDIZATION-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]] 142; CHECK-DISABLE-SPMDIZATION: user_code.entry: 143; CHECK-DISABLE-SPMDIZATION-NEXT: call void @generic_helper() #[[ATTR7:[0-9]+]] 144; CHECK-DISABLE-SPMDIZATION-NEXT: call void @__kmpc_target_deinit() 145; CHECK-DISABLE-SPMDIZATION-NEXT: ret void 146; CHECK-DISABLE-SPMDIZATION: worker.exit: 147; CHECK-DISABLE-SPMDIZATION-NEXT: ret void 148; 149entry: 150 %0 = call i32 @__kmpc_target_init(ptr @__omp_offloading_2b_10393b5_generic_l20_kernel_environment, ptr %dyn) 151 %exec_user_code = icmp eq i32 %0, -1 152 br i1 %exec_user_code, label %user_code.entry, label %worker.exit 153 154user_code.entry: ; preds = %entry 155 call void @generic_helper() #5 156 call void @__kmpc_target_deinit() 157 ret void 158 159worker.exit: ; preds = %entry 160 ret void 161} 162 163; Function Attrs: convergent noinline nounwind 164define internal void @spmd_helper() #1 { 165; CHECK-LABEL: define {{[^@]+}}@spmd_helper 166; CHECK-SAME: () #[[ATTR1:[0-9]+]] { 167; CHECK-NEXT: entry: 168; CHECK-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8 169; CHECK-NEXT: call void @leaf() #[[ATTR7]] 170; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB2]]) #[[ATTR3:[0-9]+]] 171; CHECK-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB2]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, ptr @__omp_outlined__, ptr @__omp_outlined___wrapper, ptr [[CAPTURED_VARS_ADDRS]], i64 0) 172; CHECK-NEXT: ret void 173; 174; CHECK-DISABLE-SPMDIZATION-LABEL: define {{[^@]+}}@spmd_helper 175; CHECK-DISABLE-SPMDIZATION-SAME: () #[[ATTR1:[0-9]+]] { 176; CHECK-DISABLE-SPMDIZATION-NEXT: entry: 177; CHECK-DISABLE-SPMDIZATION-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8 178; CHECK-DISABLE-SPMDIZATION-NEXT: call void @leaf() #[[ATTR7]] 179; CHECK-DISABLE-SPMDIZATION-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB2]]) #[[ATTR3:[0-9]+]] 180; CHECK-DISABLE-SPMDIZATION-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB2]], i32 [[TMP0]], i32 1, i32 -1, i32 -1, ptr @__omp_outlined__, ptr @__omp_outlined___wrapper, ptr [[CAPTURED_VARS_ADDRS]], i64 0) 181; CHECK-DISABLE-SPMDIZATION-NEXT: ret void 182; 183entry: 184 %captured_vars_addrs = alloca [0 x ptr], align 8 185 call void @leaf() #5 186 %0 = call i32 @__kmpc_global_thread_num(ptr @2) 187 call void @__kmpc_parallel_51(ptr @2, i32 %0, i32 1, i32 -1, i32 -1, ptr @__omp_outlined__, ptr @__omp_outlined___wrapper, ptr %captured_vars_addrs, i64 0) 188 ret void 189} 190 191; Function Attrs: convergent noinline norecurse nounwind 192define internal void @__omp_outlined__(ptr noalias %.global_tid., ptr noalias %.bound_tid.) { 193; CHECK-LABEL: define {{[^@]+}}@__omp_outlined__ 194; CHECK-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]]) { 195; CHECK-NEXT: entry: 196; CHECK-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8 197; CHECK-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8 198; CHECK-NEXT: call void @unknown() #[[ATTR8:[0-9]+]] 199; CHECK-NEXT: ret void 200; 201; CHECK-DISABLE-SPMDIZATION-LABEL: define {{[^@]+}}@__omp_outlined__ 202; CHECK-DISABLE-SPMDIZATION-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]]) { 203; CHECK-DISABLE-SPMDIZATION-NEXT: entry: 204; CHECK-DISABLE-SPMDIZATION-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8 205; CHECK-DISABLE-SPMDIZATION-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8 206; CHECK-DISABLE-SPMDIZATION-NEXT: call void @unknown() #[[ATTR8:[0-9]+]] 207; CHECK-DISABLE-SPMDIZATION-NEXT: ret void 208; 209entry: 210 %.global_tid..addr = alloca ptr, align 8 211 %.bound_tid..addr = alloca ptr, align 8 212 store ptr %.global_tid., ptr %.global_tid..addr, align 8 213 store ptr %.bound_tid., ptr %.bound_tid..addr, align 8 214 call void @unknown() #5 215 ret void 216} 217 218; Function Attrs: convergent noinline norecurse nounwind 219define internal void @__omp_outlined___wrapper(i16 zeroext %0, i32 %1) #2 { 220; CHECK-LABEL: define {{[^@]+}}@__omp_outlined___wrapper 221; CHECK-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR2:[0-9]+]] { 222; CHECK-NEXT: entry: 223; CHECK-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2 224; CHECK-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4 225; CHECK-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4 226; CHECK-NEXT: [[GLOBAL_ARGS:%.*]] = alloca ptr, align 8 227; CHECK-NEXT: call void @__kmpc_get_shared_variables(ptr [[GLOBAL_ARGS]]) 228; CHECK-NEXT: call void @__omp_outlined__(ptr [[DOTADDR1]], ptr [[DOTZERO_ADDR]]) #[[ATTR3]] 229; CHECK-NEXT: ret void 230; 231; CHECK-DISABLE-SPMDIZATION-LABEL: define {{[^@]+}}@__omp_outlined___wrapper 232; CHECK-DISABLE-SPMDIZATION-SAME: (i16 zeroext [[TMP0:%.*]], i32 [[TMP1:%.*]]) #[[ATTR2:[0-9]+]] { 233; CHECK-DISABLE-SPMDIZATION-NEXT: entry: 234; CHECK-DISABLE-SPMDIZATION-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2 235; CHECK-DISABLE-SPMDIZATION-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4 236; CHECK-DISABLE-SPMDIZATION-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4 237; CHECK-DISABLE-SPMDIZATION-NEXT: [[GLOBAL_ARGS:%.*]] = alloca ptr, align 8 238; CHECK-DISABLE-SPMDIZATION-NEXT: call void @__kmpc_get_shared_variables(ptr [[GLOBAL_ARGS]]) 239; CHECK-DISABLE-SPMDIZATION-NEXT: call void @__omp_outlined__(ptr [[DOTADDR1]], ptr [[DOTZERO_ADDR]]) #[[ATTR3]] 240; CHECK-DISABLE-SPMDIZATION-NEXT: ret void 241; 242entry: 243 %.addr = alloca i16, align 2 244 %.addr1 = alloca i32, align 4 245 %.zero.addr = alloca i32, align 4 246 %global_args = alloca ptr, align 8 247 store i16 %0, ptr %.addr, align 2 248 store i32 %1, ptr %.addr1, align 4 249 store i32 0, ptr %.zero.addr, align 4 250 call void @__kmpc_get_shared_variables(ptr %global_args) 251 call void @__omp_outlined__(ptr %.addr1, ptr %.zero.addr) #3 252 ret void 253} 254 255declare void @__kmpc_get_shared_variables(ptr) 256 257; Function Attrs: nounwind 258declare i32 @__kmpc_global_thread_num(ptr) #3 259 260; Function Attrs: alwaysinline 261declare void @__kmpc_parallel_51(ptr, i32, i32, i32, i32, ptr, ptr, ptr, i64) #4 262 263; Function Attrs: convergent noinline nounwind 264define internal void @leaf() #1 { 265; CHECK-LABEL: define {{[^@]+}}@leaf 266; CHECK-SAME: () #[[ATTR5:[0-9]+]] { 267; CHECK-NEXT: entry: 268; CHECK-NEXT: br label [[REGION_CHECK_TID:%.*]] 269; CHECK: region.check.tid: 270; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_get_hardware_thread_id_in_block() 271; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i32 [[TMP0]], 0 272; CHECK-NEXT: br i1 [[TMP1]], label [[REGION_GUARDED:%.*]], label [[REGION_BARRIER:%.*]] 273; CHECK: region.guarded: 274; CHECK-NEXT: store i32 42, ptr @G, align 4 275; CHECK-NEXT: br label [[REGION_GUARDED_END:%.*]] 276; CHECK: region.guarded.end: 277; CHECK-NEXT: br label [[REGION_BARRIER]] 278; CHECK: region.barrier: 279; CHECK-NEXT: call void @__kmpc_barrier_simple_spmd(ptr @[[GLOB3]], i32 [[TMP0]]) 280; CHECK-NEXT: br label [[REGION_EXIT:%.*]] 281; CHECK: region.exit: 282; CHECK-NEXT: ret void 283; 284; CHECK-DISABLE-SPMDIZATION-LABEL: define {{[^@]+}}@leaf 285; CHECK-DISABLE-SPMDIZATION-SAME: () #[[ATTR5:[0-9]+]] { 286; CHECK-DISABLE-SPMDIZATION-NEXT: entry: 287; CHECK-DISABLE-SPMDIZATION-NEXT: store i32 42, ptr @G, align 4 288; CHECK-DISABLE-SPMDIZATION-NEXT: ret void 289; 290entry: 291 store i32 42, ptr @G, align 4 292 ret void 293} 294 295; Function Attrs: convergent noinline nounwind 296define internal void @generic_helper() #1 { 297; CHECK-LABEL: define {{[^@]+}}@generic_helper 298; CHECK-SAME: () #[[ATTR5]] { 299; CHECK-NEXT: entry: 300; CHECK-NEXT: call void @leaf() #[[ATTR7]] 301; CHECK-NEXT: ret void 302; 303; CHECK-DISABLE-SPMDIZATION-LABEL: define {{[^@]+}}@generic_helper 304; CHECK-DISABLE-SPMDIZATION-SAME: () #[[ATTR5]] { 305; CHECK-DISABLE-SPMDIZATION-NEXT: entry: 306; CHECK-DISABLE-SPMDIZATION-NEXT: call void @leaf() #[[ATTR7]] 307; CHECK-DISABLE-SPMDIZATION-NEXT: ret void 308; 309entry: 310 call void @leaf() #5 311 ret void 312} 313 314declare void @unknown() 315 316attributes #0 = { convergent noinline norecurse nounwind "kernel" "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 317attributes #1 = { convergent noinline nounwind "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 318attributes #2 = { convergent noinline norecurse nounwind "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 319attributes #3 = { nounwind } 320attributes #4 = { alwaysinline } 321attributes #5 = { convergent } 322 323!omp_offload.info = !{!0, !1} 324!llvm.module.flags = !{!4, !5, !6, !7, !8} 325!llvm.ident = !{!9} 326 327!0 = !{i32 0, i32 43, i32 17011637, !"spmd", i32 12, i32 0} 328!1 = !{i32 0, i32 43, i32 17011637, !"generic", i32 20, i32 1} 329 330!4 = !{i32 1, !"wchar_size", i32 4} 331!5 = !{i32 7, !"openmp", i32 50} 332!6 = !{i32 7, !"openmp-device", i32 50} 333!7 = !{i32 8, !"PIC Level", i32 2} 334!8 = !{i32 7, !"frame-pointer", i32 2} 335!9 = !{!"clang version 14.0.0"} 336;. 337; CHECK: attributes #[[ATTR0]] = { convergent noinline norecurse nounwind "frame-pointer"="all" "kernel" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 338; CHECK: attributes #[[ATTR1]] = { noinline nounwind "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 339; CHECK: attributes #[[ATTR2]] = { noinline norecurse nounwind "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 340; CHECK: attributes #[[ATTR3]] = { nounwind } 341; CHECK: attributes #[[ATTR4:[0-9]+]] = { alwaysinline } 342; CHECK: attributes #[[ATTR5]] = { noinline nosync nounwind memory(write) "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 343; CHECK: attributes #[[ATTR6]] = { convergent nounwind } 344; CHECK: attributes #[[ATTR7]] = { convergent nosync nounwind memory(write) } 345; CHECK: attributes #[[ATTR8]] = { convergent } 346;. 347; CHECK-DISABLE-SPMDIZATION: attributes #[[ATTR0]] = { convergent noinline norecurse nounwind "frame-pointer"="all" "kernel" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 348; CHECK-DISABLE-SPMDIZATION: attributes #[[ATTR1]] = { noinline nounwind "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 349; CHECK-DISABLE-SPMDIZATION: attributes #[[ATTR2]] = { noinline norecurse nounwind "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 350; CHECK-DISABLE-SPMDIZATION: attributes #[[ATTR3]] = { nounwind } 351; CHECK-DISABLE-SPMDIZATION: attributes #[[ATTR4:[0-9]+]] = { alwaysinline } 352; CHECK-DISABLE-SPMDIZATION: attributes #[[ATTR5]] = { noinline nosync nounwind memory(write) "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_53" "target-features"="+ptx32,+sm_53" } 353; CHECK-DISABLE-SPMDIZATION: attributes #[[ATTR6]] = { convergent nounwind } 354; CHECK-DISABLE-SPMDIZATION: attributes #[[ATTR7]] = { convergent nosync nounwind memory(write) } 355; CHECK-DISABLE-SPMDIZATION: attributes #[[ATTR8]] = { convergent } 356;. 357; CHECK: [[META0:![0-9]+]] = !{i32 0, i32 43, i32 17011637, !"spmd", i32 12, i32 0} 358; CHECK: [[META1:![0-9]+]] = !{i32 0, i32 43, i32 17011637, !"generic", i32 20, i32 1} 359; CHECK: [[META2:![0-9]+]] = !{i32 1, !"wchar_size", i32 4} 360; CHECK: [[META3:![0-9]+]] = !{i32 7, !"openmp", i32 50} 361; CHECK: [[META4:![0-9]+]] = !{i32 7, !"openmp-device", i32 50} 362; CHECK: [[META5:![0-9]+]] = !{i32 8, !"PIC Level", i32 2} 363; CHECK: [[META6:![0-9]+]] = !{i32 7, !"frame-pointer", i32 2} 364; CHECK: [[META7:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} 365;. 366; CHECK-DISABLE-SPMDIZATION: [[META0:![0-9]+]] = !{i32 0, i32 43, i32 17011637, !"spmd", i32 12, i32 0} 367; CHECK-DISABLE-SPMDIZATION: [[META1:![0-9]+]] = !{i32 0, i32 43, i32 17011637, !"generic", i32 20, i32 1} 368; CHECK-DISABLE-SPMDIZATION: [[META2:![0-9]+]] = !{i32 1, !"wchar_size", i32 4} 369; CHECK-DISABLE-SPMDIZATION: [[META3:![0-9]+]] = !{i32 7, !"openmp", i32 50} 370; CHECK-DISABLE-SPMDIZATION: [[META4:![0-9]+]] = !{i32 7, !"openmp-device", i32 50} 371; CHECK-DISABLE-SPMDIZATION: [[META5:![0-9]+]] = !{i32 8, !"PIC Level", i32 2} 372; CHECK-DISABLE-SPMDIZATION: [[META6:![0-9]+]] = !{i32 7, !"frame-pointer", i32 2} 373; CHECK-DISABLE-SPMDIZATION: [[META7:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} 374;. 375