1b6d6993e6e6d3daf4d9876794254d20a134e37c2Pirama Arumuga Nainar// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -x c++ -emit-llvm %s -o - | FileCheck %s 2b6d6993e6e6d3daf4d9876794254d20a134e37c2Pirama Arumuga Nainar// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-apple-darwin10 -emit-pch -o %t %s 3b6d6993e6e6d3daf4d9876794254d20a134e37c2Pirama Arumuga Nainar// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-apple-darwin10 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s 43ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// expected-no-diagnostics 587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// REQUIRES: x86-registered-target 63ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar#ifndef HEADER 73ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar#define HEADER 83ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar 93ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK-DAG: [[IDENT_T:%.+]] = type { i32, i32, i32, i32, i8* } 1087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK-DAG: [[STRUCT_SHAREDS:%.+]] = type { i8*, [2 x [[STRUCT_S:%.+]]]* } 1187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK-DAG: [[STRUCT_SHAREDS1:%.+]] = type { [2 x [[STRUCT_S:%.+]]]* } 124967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK-DAG: [[KMP_TASK_T:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}} } 1387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK-DAG: [[KMP_DEPEND_INFO:%.+]] = type { i64, i64, i8 } 143ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainarstruct S { 153ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar int a; 163ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar S() : a(0) {} 173ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar S(const S &s) : a(s.a) {} 183ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar ~S() {} 193ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar}; 203ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainarint a; 2187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK-LABEL: @main 223ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainarint main() { 233ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[B:%.+]] = alloca i8 2487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[S:%.+]] = alloca [2 x [[STRUCT_S]]] 253ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar char b; 2687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar S s[2]; 2787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar int arr[10][a]; 283ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num([[IDENT_T]]* @{{.+}}) 293ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[B_REF:%.+]] = getelementptr inbounds [[STRUCT_SHAREDS]], [[STRUCT_SHAREDS]]* [[CAPTURES:%.+]], i32 0, i32 0 303ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: store i8* [[B]], i8** [[B_REF]] 313ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[S_REF:%.+]] = getelementptr inbounds [[STRUCT_SHAREDS]], [[STRUCT_SHAREDS]]* [[CAPTURES]], i32 0, i32 1 3287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store [2 x [[STRUCT_S]]]* [[S]], [2 x [[STRUCT_S]]]** [[S_REF]] 334967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 33, i64 40, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[TASK_ENTRY1:@.+]] to i32 (i32, i8*)*)) 343ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[SHAREDS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]], [[KMP_TASK_T]]* [[TASK_PTR:%.+]], i32 0, i32 0 353ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[SHAREDS_REF:%.+]] = load i8*, i8** [[SHAREDS_REF_PTR]] 363ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[BITCAST:%.+]] = bitcast [[STRUCT_SHAREDS]]* [[CAPTURES]] to i8* 373ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[SHAREDS_REF]], i8* [[BITCAST]], i64 16, i32 8, i1 false) 384967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[PRIORITY_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]], [[KMP_TASK_T]]* [[TASK_PTR]], i32 0, i32 4 394967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[PRIORITY:%.+]] = bitcast %union{{.+}}* [[PRIORITY_REF_PTR]] to i32* 404967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 {{.+}}, i32* [[PRIORITY]] 413ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]]) 424967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar#pragma omp task shared(a, b, s) priority(b) 433ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar { 443ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar a = 15; 453ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar b = a; 4687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar s[0].a = 10; 4787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar } 4887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[S_REF:%.+]] = getelementptr inbounds [[STRUCT_SHAREDS1]], [[STRUCT_SHAREDS1]]* [[CAPTURES:%.+]], i32 0, i32 0 4987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store [2 x [[STRUCT_S]]]* [[S]], [2 x [[STRUCT_S]]]** [[S_REF]] 504967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 8, 5187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[SHAREDS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]], [[KMP_TASK_T]]* [[TASK_PTR:%.+]], i32 0, i32 0 5287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[SHAREDS_REF:%.+]] = load i8*, i8** [[SHAREDS_REF_PTR]] 5387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[BITCAST:%.+]] = bitcast [[STRUCT_SHAREDS1]]* [[CAPTURES]] to i8* 5487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[SHAREDS_REF]], i8* [[BITCAST]], i64 8, i32 8, i1 false) 5587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[DEP:%.*]] = getelementptr inbounds [4 x [[KMP_DEPEND_INFO]]], [4 x [[KMP_DEPEND_INFO]]]* [[DEPENDENCIES:%.*]], i64 0, i64 0 5687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 0 5787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 ptrtoint (i32* @{{.+}} to i64), i64* [[T0]] 5887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 1 5987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 4, i64* [[T0]] 6087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 2 6187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i8 1, i8* [[T0]] 6287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[DEP:%.*]] = getelementptr inbounds [4 x [[KMP_DEPEND_INFO]]], [4 x [[KMP_DEPEND_INFO]]]* [[DEPENDENCIES]], i64 0, i64 1 6387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 0 6487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: ptrtoint i8* [[B]] to i64 6587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 %{{[^,]+}}, i64* [[T0]] 6687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 1 6787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 1, i64* [[T0]] 6887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 2 6987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i8 1, i8* [[T0]] 7087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[DEP:%.*]] = getelementptr inbounds [4 x [[KMP_DEPEND_INFO]]], [4 x [[KMP_DEPEND_INFO]]]* [[DEPENDENCIES]], i64 0, i64 2 7187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 0 7287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: ptrtoint [2 x [[STRUCT_S]]]* [[S]] to i64 7387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 %{{[^,]+}}, i64* [[T0]] 7487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 1 7587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 8, i64* [[T0]] 7687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 2 7787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i8 1, i8* [[T0]] 7887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[IDX1:%.+]] = mul nsw i64 0, [[A_VAL:%.+]] 7987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[START:%.+]] = getelementptr inbounds i32, i32* %{{.+}}, i64 [[IDX1]] 8087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[IDX1:%.+]] = mul nsw i64 9, [[A_VAL]] 8187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END:%.+]] = getelementptr inbounds i32, i32* %{{.+}}, i64 [[IDX1]] 8287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END1:%.+]] = getelementptr i32, i32* [[END]], i32 1 8387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[START_INT:%.+]] = ptrtoint i32* [[START]] to i64 8487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END_INT:%.+]] = ptrtoint i32* [[END1]] to i64 8587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[SIZEOF:%.+]] = sub nuw i64 [[END_INT]], [[START_INT]] 8687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[DEP:%.*]] = getelementptr inbounds [4 x [[KMP_DEPEND_INFO]]], [4 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i64 0, i64 3 8787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 0 8887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T1:%.*]] = ptrtoint i32* [[START]] to i64 8987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 [[T1]], i64* [[T0]] 9087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 1 9187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 [[SIZEOF]], i64* [[T0]] 9287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 9387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i8 1, i8* [[T0]] 9487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[DEPS:%.*]] = getelementptr inbounds [4 x [[KMP_DEPEND_INFO]]], [4 x [[KMP_DEPEND_INFO]]]* [[DEPENDENCIES]], i32 0, i32 0 9587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: bitcast [[KMP_DEPEND_INFO]]* [[DEPS]] to i8* 9687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task_with_deps([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]], i32 4, i8* %{{[^,]+}}, i32 0, i8* null) 9787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar#pragma omp task shared(a, s) depend(in : a, b, s, arr[:]) 9887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar { 9987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar a = 15; 10087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar s[1].a = 10; 1013ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar } 1024967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[TASK_ENTRY2:@.+]] to i32 (i32, i8*)*)) 1033ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]]) 1043ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar#pragma omp task untied 1053ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar { 1063ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar a = 1; 1073ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar } 1084967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 40, i64 1, 10987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [2 x [[STRUCT_S]]], [2 x [[STRUCT_S]]]* [[S]], i64 0, i64 0 11087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [2 x [[KMP_DEPEND_INFO]]], [2 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i64 0, i64 0 11187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 0 11287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: ptrtoint [[STRUCT_S]]* %{{.+}} to i64 11387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 %{{[^,]+}}, i64* 11487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 1 11587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 4, i64* 11687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 11787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i8 3, i8* 1184967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[B_VAL:%.+]] = load i8, i8* [[B]] 1194967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[IDX2:%.+]] = sext i8 [[B_VAL]] to i64 12087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[IDX1:%.+]] = mul nsw i64 4, [[A_VAL]] 12187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[START:%.+]] = getelementptr inbounds i32, i32* %{{.+}}, i64 [[IDX1]] 1224967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[START1:%.+]] = getelementptr inbounds i32, i32* [[START]], i64 [[IDX2]] 12387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[B_VAL:%.+]] = load i8, i8* [[B]] 12487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[IDX2:%.+]] = sext i8 [[B_VAL]] to i64 12587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[IDX1:%.+]] = mul nsw i64 9, [[A_VAL]] 12687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END:%.+]] = getelementptr inbounds i32, i32* %{{.+}}, i64 [[IDX1]] 12787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END1:%.+]] = getelementptr inbounds i32, i32* [[END]], i64 [[IDX2]] 12887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END2:%.+]] = getelementptr i32, i32* [[END1]], i32 1 12987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[START_INT:%.+]] = ptrtoint i32* [[START1]] to i64 13087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END_INT:%.+]] = ptrtoint i32* [[END2]] to i64 13187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[SIZEOF:%.+]] = sub nuw i64 [[END_INT]], [[START_INT]] 13287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [2 x [[KMP_DEPEND_INFO]]], [2 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i64 0, i64 1 13387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 0 13487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: ptrtoint i32* [[START1]] to i64 13587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 %{{[^,]+}}, i64* 13687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 1 13787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 [[SIZEOF]], i64* 13887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 13987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i8 3, i8* 14087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [2 x [[KMP_DEPEND_INFO]]], [2 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i32 0, i32 0 14187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: bitcast [[KMP_DEPEND_INFO]]* %{{.+}} to i8* 14287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task_with_deps([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]], i32 2, i8* %{{[^,]+}}, i32 0, i8* null) 14387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar#pragma omp task untied depend(out : s[0], arr[4:][b]) 14487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar { 14587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar a = 1; 14687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar } 1474967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 3, i64 40, i64 1, 14887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [3 x [[KMP_DEPEND_INFO]]], [3 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i64 0, i64 0 14987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 0 15087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 ptrtoint (i32* @{{.+}} to i64), i64* 15187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 1 15287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 4, i64* 15387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 15487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i8 3, i8* 15587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [2 x [[STRUCT_S]]], [2 x [[STRUCT_S]]]* [[S]], i64 0, i64 1 15687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [3 x [[KMP_DEPEND_INFO]]], [3 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i64 0, i64 1 15787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 0 15887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: ptrtoint [[STRUCT_S]]* %{{.+}} to i64 15987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 %{{[^,]+}}, i64* 16087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 1 16187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 4, i64* 16287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 16387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i8 3, i8* 16487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[IDX1:%.+]] = mul nsw i64 0, [[A_VAL]] 16587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[START:%.+]] = getelementptr inbounds i32, i32* %{{.+}}, i64 [[IDX1]] 16687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[START1:%.+]] = getelementptr inbounds i32, i32* [[START]], i64 3 16787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[NEW_A_VAL:%.+]] = load i32, i32* @{{.+}}, 16887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[NEW_A_VAL_I64:%.+]] = sext i32 [[NEW_A_VAL]] to i64 1694967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[IDX2:%.+]] = sub nsw i64 [[NEW_A_VAL_I64]], 1 1704967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[NEW_A_VAL:%.+]] = load i32, i32* @{{.+}}, 1714967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[NEW_A_VAL_I64:%.+]] = sext i32 [[NEW_A_VAL]] to i64 17287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[SUB:%.+]] = add nsw i64 -1, [[NEW_A_VAL_I64]] 17387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[IDX1:%.+]] = mul nsw i64 [[SUB]], [[A_VAL]] 17487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END:%.+]] = getelementptr inbounds i32, i32* %{{.+}}, i64 [[IDX1]] 17587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END1:%.+]] = getelementptr inbounds i32, i32* [[END]], i64 [[IDX2]] 17687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END2:%.+]] = getelementptr i32, i32* [[END1]], i32 1 17787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[START_INT:%.+]] = ptrtoint i32* [[START1]] to i64 17887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[END_INT:%.+]] = ptrtoint i32* [[END2]] to i64 17987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: [[SIZEOF:%.+]] = sub nuw i64 [[END_INT]], [[START_INT]] 18087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [3 x [[KMP_DEPEND_INFO]]], [3 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i64 0, i64 2 18187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 0 18287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: ptrtoint i32* [[START1]] to i64 18387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 %{{[^,]+}}, i64* 18487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 1 18587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i64 [[SIZEOF]], i64* 18687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 2 18787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i8 3, i8* 18887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: getelementptr inbounds [3 x [[KMP_DEPEND_INFO]]], [3 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i32 0, i32 0 18987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: bitcast [[KMP_DEPEND_INFO]]* %{{.+}} to i8* 19087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task_with_deps([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]], i32 3, i8* %{{[^,]+}}, i32 0, i8* null) 19187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar#pragma omp task final(true) depend(inout: a, s[1], arr[:a][3:]) 19287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar { 19387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar a = 2; 19487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar } 1954967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 3, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[TASK_ENTRY3:@.+]] to i32 (i32, i8*)*)) 1963ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]]) 1973ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar#pragma omp task final(true) 1983ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar { 1993ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar a = 2; 2003ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar } 2014967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[TASK_ENTRY4:@.+]] to i32 (i32, i8*)*)) 2023ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]]) 2033ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar const bool flag = false; 2043ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar#pragma omp task final(flag) 2053ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar { 2063ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar a = 3; 2073ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar } 2083ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[B_VAL:%.+]] = load i8, i8* [[B]] 2093ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[CMP:%.+]] = icmp ne i8 [[B_VAL]], 0 2103ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[FINAL:%.+]] = select i1 [[CMP]], i32 2, i32 0 2113ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[FLAGS:%.+]] = or i32 [[FINAL]], 1 2124967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 [[FLAGS]], i64 40, i64 8, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[TASK_ENTRY5:@.+]] to i32 (i32, i8*)*)) 2133ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]]) 21487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar int c __attribute__((aligned(128))); 21587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar#pragma omp task final(b) shared(c) 2163ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar { 2173ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar a = 4; 21887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar c = 5; 2193ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar } 2204967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[TASK_ENTRY6:@.+]] to i32 (i32, i8*)*)) 2214967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]]) 2224967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar#pragma omp task untied 2234967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar { 2244967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar S s1; 2254967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar#pragma omp task 2264967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar a = 4; 2274967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar#pragma omp taskyield 2284967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar s1 = S(); 2294967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar#pragma omp taskwait 2304967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar } 2313ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar return a; 2323ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar} 23387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: define internal i32 [[TASK_ENTRY1]](i32, [[KMP_TASK_T]]{{.*}}* noalias) 2343ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: store i32 15, i32* [[A_PTR:@.+]] 2353ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[A_VAL:%.+]] = load i32, i32* [[A_PTR]] 2363ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: [[A_VAL_I8:%.+]] = trunc i32 [[A_VAL]] to i8 2373ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: store i8 [[A_VAL_I8]], i8* %{{.+}} 2383ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// CHECK: store i32 10, i32* %{{.+}} 2393ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar 24087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: define internal i32 [[TASK_ENTRY2]](i32, [[KMP_TASK_T]]{{.*}}* noalias) 2414967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 1, i32* [[A_PTR]] 2423ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar 24387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: define internal i32 [[TASK_ENTRY3]](i32, [[KMP_TASK_T]]{{.*}}* noalias) 2444967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 2, i32* [[A_PTR]] 2453ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar 24687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: define internal i32 [[TASK_ENTRY4]](i32, [[KMP_TASK_T]]{{.*}}* noalias) 2474967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 3, i32* [[A_PTR]] 2483ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar 24987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: define internal i32 [[TASK_ENTRY5]](i32, [[KMP_TASK_T]]{{.*}}* noalias) 2504967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 4, i32* [[A_PTR]] 25187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar// CHECK: store i32 5, i32* [[C_PTR:%.+]], align 128 2524967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar 2534967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: define internal i32 2544967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 4, i32* [[A_PTR]] 2554967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar 2564967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: define internal i32 [[TASK_ENTRY6]](i32, [[KMP_TASK_T]]{{.*}}* noalias) 2574967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: switch i32 %{{.+}}, label 2584967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: load i32*, i32** % 2594967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 1, i32* % 2604967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task(% 2614967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar 2624967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: call i8* @__kmpc_omp_task_alloc( 2634967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task(% 2644967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: load i32*, i32** % 2654967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 2, i32* % 2664967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task(% 2674967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar 2684967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_taskyield(% 2694967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: load i32*, i32** % 2704967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 3, i32* % 2714967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task(% 2724967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar 2734967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_taskwait(% 2744967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: load i32*, i32** % 2754967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: store i32 4, i32* % 2764967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar// CHECK: call i32 @__kmpc_omp_task(% 2773ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar#endif 2783ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar 279