diff options
author | Nikita Popov <npopov@redhat.com> | 2023-03-17 14:30:41 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-03-17 14:43:59 +0100 |
commit | 5ecba1543477e5448ec3566aec7b3756f98a3fb6 (patch) | |
tree | 7b6633653f6d8f4f1d48c7f13f9664909f058b78 /polly | |
parent | ca3f7a5c06f970a27c9f605987bbe64ad679a309 (diff) | |
download | llvm-5ecba1543477e5448ec3566aec7b3756f98a3fb6.tar.gz |
[Polly] Convert some tests to opaque pointers (NFC)
Diffstat (limited to 'polly')
-rw-r--r-- | polly/test/CodeGen/OpenMP/alias-metadata.ll | 16 | ||||
-rw-r--r-- | polly/test/CodeGen/OpenMP/loop-body-references-outer-values.ll | 15 | ||||
-rw-r--r-- | polly/test/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll | 32 | ||||
-rw-r--r-- | polly/test/CodeGen/OpenMP/mapped-phi-access.ll | 23 | ||||
-rw-r--r-- | polly/test/CodeGen/OpenMP/new_multidim_access.ll | 28 | ||||
-rw-r--r-- | polly/test/CodeGen/OpenMP/recomputed-srem.ll | 16 | ||||
-rw-r--r-- | polly/test/CodeGen/OpenMP/single_loop.ll | 113 |
7 files changed, 118 insertions, 125 deletions
diff --git a/polly/test/CodeGen/OpenMP/alias-metadata.ll b/polly/test/CodeGen/OpenMP/alias-metadata.ll index 4b378c39727e..07d79631b2cb 100644 --- a/polly/test/CodeGen/OpenMP/alias-metadata.ll +++ b/polly/test/CodeGen/OpenMP/alias-metadata.ll @@ -1,4 +1,4 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -polly-codegen -polly-parallel -S < %s | FileCheck %s +; RUN: opt %loadPolly -polly-codegen -polly-parallel -S < %s | FileCheck %s ; ; void foo(float *A, float *B) { ; for (long i = 0; i < 1000; i++) @@ -10,7 +10,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" ; CHECK: define internal void @foo_polly_subfn -define void @foo(float* %A, float* %B) { +define void @foo(ptr %A, ptr %B) { bb: br label %bb2 @@ -28,12 +28,12 @@ bb4: ; preds = %bb8, %bb3 br i1 %exitcond, label %bb5, label %bb10 bb5: ; preds = %bb4 - %tmp = getelementptr inbounds float, float* %B, i64 %i.0 - %tmp7 = getelementptr inbounds float, float* %A, i64 %i.0 - %tmp6 = load float, float* %tmp, align 4 - store float %tmp6, float* %tmp7, align 4 -; CHECK: %tmp6_p_scalar_ = load float, float* %scevgep, align 4, !alias.scope !0, !noalias !3 -; CHECK: store float %tmp6_p_scalar_, float* %scevgep8, align 4, !alias.scope !3, !noalias !0 + %tmp = getelementptr inbounds float, ptr %B, i64 %i.0 + %tmp7 = getelementptr inbounds float, ptr %A, i64 %i.0 + %tmp6 = load float, ptr %tmp, align 4 + store float %tmp6, ptr %tmp7, align 4 +; CHECK: %tmp6_p_scalar_ = load float, ptr %scevgep, align 4, !alias.scope !0, !noalias !3 +; CHECK: store float %tmp6_p_scalar_, ptr %scevgep7, align 4, !alias.scope !3, !noalias !0 br label %bb8 bb8: ; preds = %bb5 diff --git a/polly/test/CodeGen/OpenMP/loop-body-references-outer-values.ll b/polly/test/CodeGen/OpenMP/loop-body-references-outer-values.ll index a4e1570e7c1a..f9612d77533d 100644 --- a/polly/test/CodeGen/OpenMP/loop-body-references-outer-values.ll +++ b/polly/test/CodeGen/OpenMP/loop-body-references-outer-values.ll @@ -1,5 +1,5 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -S < %s | FileCheck %s -check-prefix=IR +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -S < %s | FileCheck %s -check-prefix=IR ; Make sure we correctly forward the reference to 'A' to the OpenMP subfunction. ; @@ -15,13 +15,12 @@ ; AST: Stmt_for_body(c0); ; IR-LABEL: polly.parallel.for: -; IR-NEXT: %polly.subfn.storeaddr.A = getelementptr inbounds { float* }, { float* }* %polly.par.userContext, i32 0, i32 0 -; IR-NEXT: store float* %A, float** %polly.subfn.storeaddr.A -; IR-NEXT: %polly.par.userContext1 = bitcast { float* }* %polly.par.userContext to i8* +; IR-NEXT: %polly.subfn.storeaddr.A = getelementptr inbounds { ptr }, ptr %polly.par.userContext, i32 0, i32 0 +; IR-NEXT: store ptr %A, ptr %polly.subfn.storeaddr.A target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -define void @loop_references_outer_ids(float* %A) { +define void @loop_references_outer_ids(ptr %A) { entry: br label %for.cond @@ -32,8 +31,8 @@ for.cond: ; preds = %for.inc, %entry for.body: ; preds = %for.cond %conv = sitofp i64 %i.0 to float - %arrayidx = getelementptr inbounds float, float* %A, i64 %i.0 - store float %conv, float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds float, ptr %A, i64 %i.0 + store float %conv, ptr %arrayidx, align 4 br label %for.inc for.inc: ; preds = %for.body diff --git a/polly/test/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll b/polly/test/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll index edf9bbcecc4a..da9da18c89b2 100644 --- a/polly/test/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll +++ b/polly/test/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll @@ -1,5 +1,5 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-codegen -S < %s | FileCheck %s -check-prefix=IR +; RUN: opt %loadPolly -polly-parallel -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST +; RUN: opt %loadPolly -polly-parallel -polly-codegen -S < %s | FileCheck %s -check-prefix=IR ; ; float A[100]; ; @@ -23,18 +23,16 @@ ; AST: Stmt_for_body6(c0, c1, c2); ; IR: %polly.par.userContext = alloca { i64, i64 } -; IR: %[[R1:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext, i32 0, i32 0 -; IR-NEXT: store i64 %n, i64* %[[R1]] -; IR-NEXT: %[[R2:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext, i32 0, i32 1 -; IR-NEXT: store i64 %polly.indvar, i64* %[[R2]] -; IR-NEXT: %polly.par.userContext1 = bitcast { i64, i64 }* %polly.par.userContext to i8* - -; IR-LABEL: @loop_references_outer_ids_polly_subfn(i8* %polly.par.userContext) -; IR: %polly.par.userContext1 = bitcast i8* %polly.par.userContext to { i64, i64 }* -; IR-NEXT: %[[R3:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext1, i32 0, i32 0 -; IR-NEXT: %[[R4:[0-9a-z.]+]] = load i64, i64* %[[R3]] -; IR-NEXT: %[[R5:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext1, i32 0, i32 1 -; IR-NEXT: %[[R6:[0-9a-z.]+]] = load i64, i64* %[[R5]] +; IR: %[[R1:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, ptr %polly.par.userContext, i32 0, i32 0 +; IR-NEXT: store i64 %n, ptr %[[R1]] +; IR-NEXT: %[[R2:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, ptr %polly.par.userContext, i32 0, i32 1 +; IR-NEXT: store i64 %polly.indvar, ptr %[[R2]] + +; IR-LABEL: @loop_references_outer_ids_polly_subfn(ptr %polly.par.userContext) +; IR: %[[R3:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, ptr %polly.par.userContext, i32 0, i32 0 +; IR-NEXT: %[[R4:[0-9a-z.]+]] = load i64, ptr %[[R3]] +; IR-NEXT: %[[R5:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, ptr %polly.par.userContext, i32 0, i32 1 +; IR-NEXT: %[[R6:[0-9a-z.]+]] = load i64, ptr %[[R5]] target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" @@ -70,10 +68,10 @@ for.body6: ; preds = %for.cond4 %add7 = add nsw i64 %i.0, %j.0 %add8 = add nsw i64 %add7, %k.0 %conv = sitofp i64 %add8 to float - %arrayidx = getelementptr inbounds [100 x float], [100 x float]* @A, i64 0, i64 %j.0 - %tmp = load float, float* %arrayidx, align 4 + %arrayidx = getelementptr inbounds [100 x float], ptr @A, i64 0, i64 %j.0 + %tmp = load float, ptr %arrayidx, align 4 %add9 = fadd float %tmp, %conv - store float %add9, float* %arrayidx, align 4 + store float %add9, ptr %arrayidx, align 4 br label %for.inc for.inc: ; preds = %for.body6 diff --git a/polly/test/CodeGen/OpenMP/mapped-phi-access.ll b/polly/test/CodeGen/OpenMP/mapped-phi-access.ll index f64391fabea0..1b8433693abf 100644 --- a/polly/test/CodeGen/OpenMP/mapped-phi-access.ll +++ b/polly/test/CodeGen/OpenMP/mapped-phi-access.ll @@ -1,4 +1,4 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -polly-stmt-granularity=bb -polly-parallel -polly-delicm -polly-codegen -S < %s | FileCheck %s +; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-parallel -polly-delicm -polly-codegen -S < %s | FileCheck %s ; ; Verify that -polly-parallel can handle mapped scalar MemoryAccesses. ; @@ -7,23 +7,21 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" ; Function Attrs: nounwind uwtable define void @main() local_unnamed_addr #0 { entry: - %0 = load i8*, i8** undef, align 8, !tbaa !1 - %1 = load i8*, i8** undef, align 8, !tbaa !1 - %arraydecay16 = bitcast i8* %1 to double* - %arraydecay20 = bitcast i8* %0 to [4000 x double]* + %0 = load ptr, ptr undef, align 8, !tbaa !1 + %1 = load ptr, ptr undef, align 8, !tbaa !1 br label %for.body65.i226 for.body65.i226: ; preds = %for.inc85.i238, %entry %indvars.iv8.i223 = phi i64 [ 0, %entry ], [ %indvars.iv.next9.i236, %for.inc85.i238 ] - %arrayidx70.i224 = getelementptr inbounds double, double* %arraydecay16, i64 %indvars.iv8.i223 + %arrayidx70.i224 = getelementptr inbounds double, ptr %1, i64 %indvars.iv8.i223 br label %for.body68.i235 for.body68.i235: ; preds = %for.body68.i235, %for.body65.i226 %2 = phi double [ undef, %for.body65.i226 ], [ undef, %for.body68.i235 ] %indvars.iv.i227 = phi i64 [ 0, %for.body65.i226 ], [ %indvars.iv.next.i233, %for.body68.i235 ] - %arrayidx74.i228 = getelementptr inbounds [4000 x double], [4000 x double]* %arraydecay20, i64 %indvars.iv8.i223, i64 %indvars.iv.i227 - %3 = load double, double* %arrayidx74.i228, align 8, !tbaa !5 - store double undef, double* %arrayidx70.i224, align 8, !tbaa !5 + %arrayidx74.i228 = getelementptr inbounds [4000 x double], ptr %0, i64 %indvars.iv8.i223, i64 %indvars.iv.i227 + %3 = load double, ptr %arrayidx74.i228, align 8, !tbaa !5 + store double undef, ptr %arrayidx70.i224, align 8, !tbaa !5 %indvars.iv.next.i233 = add nuw nsw i64 %indvars.iv.i227, 1 %exitcond.i234 = icmp eq i64 %indvars.iv.next.i233, 4000 br i1 %exitcond.i234, label %for.inc85.i238, label %for.body68.i235 @@ -50,9 +48,8 @@ attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="fals !6 = !{!"double", !3, i64 0} -; CHECK-LABEL: define internal void @main_polly_subfn(i8* %polly.par.userContext) +; CHECK-LABEL: define internal void @main_polly_subfn(ptr %polly.par.userContext) ; ; CHECK: polly.stmt.for.body65.i226: -; CHECK-NEXT: %polly.access.cast.polly.subfunc.arg.[[R0:[0-9]*]] = bitcast i8* %polly.subfunc.arg.{{[0-9]*}} to double* -; CHECK-NEXT: %polly.access.polly.subfunc.arg.[[R1:[0-9]*]] = getelementptr double, double* %polly.access.cast.polly.subfunc.arg.[[R0]], i64 %polly.indvar -; CHECK-NEXT: store double undef, double* %polly.access.polly.subfunc.arg.[[R1]] +; CHECK-NEXT: %polly.access.polly.subfunc.arg.[[R1:[0-9]*]] = getelementptr double, ptr %polly.subfunc.arg.[[R0:[0-9]*]], i64 %polly.indvar +; CHECK-NEXT: store double undef, ptr %polly.access.polly.subfunc.arg.[[R1]] diff --git a/polly/test/CodeGen/OpenMP/new_multidim_access.ll b/polly/test/CodeGen/OpenMP/new_multidim_access.ll index 77f7aaac35ac..1b2912ba9ef4 100644 --- a/polly/test/CodeGen/OpenMP/new_multidim_access.ll +++ b/polly/test/CodeGen/OpenMP/new_multidim_access.ll @@ -1,7 +1,7 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -polly-print-import-jscop \ +; RUN: opt %loadPolly -polly-print-import-jscop \ ; RUN: -disable-output < %s | FileCheck %s -; RUN: opt -opaque-pointers=0 %loadPolly -polly-import-jscop \ +; RUN: opt %loadPolly -polly-import-jscop \ ; RUN: -polly-codegen -S < %s \ ; RUN: -polly-parallel \ ; RUN: | FileCheck %s -check-prefix=IR @@ -20,19 +20,19 @@ ; CHECK: new: [n, m] -> { Stmt_bb4[i0, i1] -> MemRef_A[i0, 43 + i1] }; ; IR: %polly.access.mul.polly.subfunc.arg.A = mul nsw i64 %polly.indvar, %polly.subfunc.arg.m -; IR: %6 = add nsw i64 %polly.indvar5, 13 +; IR: %6 = add nsw i64 %polly.indvar4, 13 ; IR: %polly.access.add.polly.subfunc.arg.A = add nsw i64 %polly.access.mul.polly.subfunc.arg.A, %6 -; IR: %polly.access.polly.subfunc.arg.A = getelementptr float, float* %polly.subfunc.arg.A, i64 %polly.access.add.polly.subfunc.arg.A -; IR: %tmp10_p_scalar_ = load float, float* %polly.access.polly.subfunc.arg.A, align 4, !alias.scope !0, !noalias !3, !llvm.access.group !4 +; IR: %polly.access.polly.subfunc.arg.A = getelementptr float, ptr %polly.subfunc.arg.A, i64 %polly.access.add.polly.subfunc.arg.A +; IR: %tmp10_p_scalar_ = load float, ptr %polly.access.polly.subfunc.arg.A, align 4, !alias.scope !0, !noalias !3, !llvm.access.group !4 -; IR: %polly.access.mul.polly.subfunc.arg.A8 = mul nsw i64 %polly.indvar, %polly.subfunc.arg.m -; IR: %7 = add nsw i64 %polly.indvar5, 43 -; IR: %polly.access.add.polly.subfunc.arg.A9 = add nsw i64 %polly.access.mul.polly.subfunc.arg.A8, %7 -; IR: %polly.access.polly.subfunc.arg.A10 = getelementptr float, float* %polly.subfunc.arg.A, i64 %polly.access.add.polly.subfunc.arg.A9 -; IR: store float %p_tmp11, float* %polly.access.polly.subfunc.arg.A10, align 4, !alias.scope !0, !noalias !3, !llvm.access.group !4 +; IR: %polly.access.mul.polly.subfunc.arg.A7 = mul nsw i64 %polly.indvar, %polly.subfunc.arg.m +; IR: %7 = add nsw i64 %polly.indvar4, 43 +; IR: %polly.access.add.polly.subfunc.arg.A8 = add nsw i64 %polly.access.mul.polly.subfunc.arg.A7, %7 +; IR: %polly.access.polly.subfunc.arg.A9 = getelementptr float, ptr %polly.subfunc.arg.A, i64 %polly.access.add.polly.subfunc.arg.A8 +; IR: store float %p_tmp11, ptr %polly.access.polly.subfunc.arg.A9, align 4, !alias.scope !0, !noalias !3, !llvm.access.group !4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -define void @new_multidim_access(i64 %n, i64 %m, float* %A) { +define void @new_multidim_access(i64 %n, i64 %m, ptr %A) { bb: br label %bb1 @@ -55,10 +55,10 @@ bb4: ; preds = %bb3 %tmp7 = shl nsw i64 %j.0, 1 %tmp8 = mul nsw i64 %i.0, %m %.sum = add i64 %tmp8, %tmp7 - %tmp9 = getelementptr inbounds float, float* %A, i64 %.sum - %tmp10 = load float, float* %tmp9, align 4 + %tmp9 = getelementptr inbounds float, ptr %A, i64 %.sum + %tmp10 = load float, ptr %tmp9, align 4 %tmp11 = fadd float %tmp10, %tmp6 - store float %tmp11, float* %tmp9, align 4 + store float %tmp11, ptr %tmp9, align 4 br label %bb12 bb12: ; preds = %bb4 diff --git a/polly/test/CodeGen/OpenMP/recomputed-srem.ll b/polly/test/CodeGen/OpenMP/recomputed-srem.ll index f09da47d3715..cfae8e943cf1 100644 --- a/polly/test/CodeGen/OpenMP/recomputed-srem.ll +++ b/polly/test/CodeGen/OpenMP/recomputed-srem.ll @@ -1,15 +1,15 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -polly-stmt-granularity=bb -polly-codegen -polly-parallel \ +; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-codegen -polly-parallel \ ; RUN: -polly-parallel-force -S < %s | FileCheck %s ; ; Test to verify that we pass %rem96 to the parallel subfunction. ; -; CHECK: %[[R:[0-9]*]] = getelementptr inbounds { i32, i32, i64, float*, float*, i32 }, { i32, i32, i64, float*, float*, i32 }* %polly.par.userContext1, i32 0, i32 5 -; CHECK-NEXT: %polly.subfunc.arg.rem96 = load i32, i32* %[[R]] +; CHECK: %[[R:[0-9]*]] = getelementptr inbounds { i32, i32, i64, ptr, ptr, i32 }, ptr %polly.par.userContext, i32 0, i32 5 +; CHECK-NEXT: %polly.subfunc.arg.rem96 = load i32, ptr %[[R]] ; target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" ; Function Attrs: nounwind uwtable -define void @dmxpy(i32 %n1, float* %y, i32 %n2, float* %x) #0 { +define void @dmxpy(i32 %n1, ptr %y, i32 %n2, ptr %x) #0 { entry: %rem96 = srem i32 %n2, 16 %0 = sext i32 %rem96 to i64 @@ -23,11 +23,11 @@ for.cond195.preheader: ; preds = %for.inc363, %entry for.body197: ; preds = %for.body197, %for.cond195.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %for.body197 ], [ 0, %for.cond195.preheader ] - %arrayidx199 = getelementptr inbounds float, float* %y, i64 %indvars.iv + %arrayidx199 = getelementptr inbounds float, ptr %y, i64 %indvars.iv %2 = add nsw i64 %indvars.iv262, -6 - %arrayidx292 = getelementptr inbounds float, float* %x, i64 %2 - %3 = load float, float* %arrayidx292, align 4 - store float undef, float* %arrayidx199, align 4 + %arrayidx292 = getelementptr inbounds float, ptr %x, i64 %2 + %3 = load float, ptr %arrayidx292, align 4 + store float undef, ptr %arrayidx199, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp ne i32 %lftr.wideiv, %n1 diff --git a/polly/test/CodeGen/OpenMP/single_loop.ll b/polly/test/CodeGen/OpenMP/single_loop.ll index b160cf58b319..f79653a08d21 100644 --- a/polly/test/CodeGen/OpenMP/single_loop.ll +++ b/polly/test/CodeGen/OpenMP/single_loop.ll @@ -1,14 +1,14 @@ -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -S -verify-dom-info < %s | FileCheck %s -check-prefix=IR +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -S -verify-dom-info < %s | FileCheck %s -check-prefix=IR -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-import-jscop -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST-STRIDE4 -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-import-jscop -polly-codegen -S < %s | FileCheck %s -check-prefix=IR-STRIDE4 +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-import-jscop -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST-STRIDE4 +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-import-jscop -polly-codegen -S < %s | FileCheck %s -check-prefix=IR-STRIDE4 -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -polly-omp-backend=LLVM -polly-scheduling=static -polly-scheduling-chunksize=43 -S -verify-dom-info < %s | FileCheck %s -check-prefix=LIBOMP-IR-STATIC-CHUNKED -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -polly-omp-backend=LLVM -polly-scheduling=static -S -verify-dom-info < %s | FileCheck %s -check-prefix=LIBOMP-IR-STATIC -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -polly-omp-backend=LLVM -polly-scheduling=dynamic -S -verify-dom-info < %s | FileCheck %s -check-prefix=LIBOMP-IR-DYNAMIC -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -polly-omp-backend=LLVM -polly-scheduling=dynamic -polly-scheduling-chunksize=4 -S -verify-dom-info < %s | FileCheck %s -check-prefix=LIBOMP-IR-DYNAMIC-FOUR -; RUN: opt -opaque-pointers=0 %loadPolly -polly-parallel -polly-parallel-force -polly-import-jscop -polly-codegen -polly-omp-backend=LLVM -S < %s | FileCheck %s -check-prefix=LIBOMP-IR-STRIDE4 +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -polly-omp-backend=LLVM -polly-scheduling=static -polly-scheduling-chunksize=43 -S -verify-dom-info < %s | FileCheck %s -check-prefix=LIBOMP-IR-STATIC-CHUNKED +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -polly-omp-backend=LLVM -polly-scheduling=static -S -verify-dom-info < %s | FileCheck %s -check-prefix=LIBOMP-IR-STATIC +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -polly-omp-backend=LLVM -polly-scheduling=dynamic -S -verify-dom-info < %s | FileCheck %s -check-prefix=LIBOMP-IR-DYNAMIC +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -polly-omp-backend=LLVM -polly-scheduling=dynamic -polly-scheduling-chunksize=4 -S -verify-dom-info < %s | FileCheck %s -check-prefix=LIBOMP-IR-DYNAMIC-FOUR +; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-import-jscop -polly-codegen -polly-omp-backend=LLVM -S < %s | FileCheck %s -check-prefix=LIBOMP-IR-STRIDE4 ; This extensive test case tests the creation of the full set of OpenMP calls ; as well as the subfunction creation using a trivial loop as example. @@ -37,17 +37,15 @@ ; IR-NEXT: %polly.par.userContext = alloca ; IR-LABEL: polly.parallel.for: -; IR-NEXT: %polly.par.userContext1 = bitcast {}* %polly.par.userContext to i8* -; IR-NEXT: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @single_parallel_loop_polly_subfn, i8* %polly.par.userContext1, i32 0, i64 0, i64 1024, i64 1) -; IR-NEXT: call void @single_parallel_loop_polly_subfn(i8* %polly.par.userContext1) +; IR-NEXT: call void @GOMP_parallel_loop_runtime_start(ptr @single_parallel_loop_polly_subfn, ptr %polly.par.userContext, i32 0, i64 0, i64 1024, i64 1) +; IR-NEXT: call void @single_parallel_loop_polly_subfn(ptr %polly.par.userContext) ; IR-NEXT: call void @GOMP_parallel_end() ; IR-NEXT: br label %polly.exiting -; IR: define internal void @single_parallel_loop_polly_subfn(i8* %polly.par.userContext) #1 +; IR: define internal void @single_parallel_loop_polly_subfn(ptr %polly.par.userContext) #1 ; IR-LABEL: polly.par.setup: ; IR-NEXT: %polly.par.LBPtr = alloca i64 ; IR-NEXT: %polly.par.UBPtr = alloca i64 -; IR-NEXT: %polly.par.userContext1 = ; IR: br label %polly.par.checkNext ; IR-LABEL: polly.par.exit: @@ -55,13 +53,13 @@ ; IR-NEXT: ret void ; IR-LABEL: polly.par.checkNext: -; IR-NEXT: %[[parnext:[._a-zA-Z0-9]*]] = call i8 @GOMP_loop_runtime_next(i64* %polly.par.LBPtr, i64* %polly.par.UBPtr) +; IR-NEXT: %[[parnext:[._a-zA-Z0-9]*]] = call i8 @GOMP_loop_runtime_next(ptr %polly.par.LBPtr, ptr %polly.par.UBPtr) ; IR-NEXT: %[[cmp:[._a-zA-Z0-9]*]] = icmp ne i8 %[[parnext]], 0 ; IR-NEXT: br i1 %[[cmp]], label %polly.par.loadIVBounds, label %polly.par.exit ; IR-LABEL: polly.par.loadIVBounds: -; IR-NEXT: %polly.par.LB = load i64, i64* %polly.par.LBPtr -; IR-NEXT: %polly.par.UB = load i64, i64* %polly.par.UBPtr +; IR-NEXT: %polly.par.LB = load i64, ptr %polly.par.LBPtr +; IR-NEXT: %polly.par.UB = load i64, ptr %polly.par.UBPtr ; IR-NEXT: %polly.par.UBAdjusted = sub i64 %polly.par.UB, 1 ; IR-NEXT: br label %polly.loop_preheader @@ -73,8 +71,9 @@ ; IR-NEXT: br label %polly.stmt.S ; IR-LABEL: polly.stmt.S: -; IR-NEXT: %[[gep:[._a-zA-Z0-9]*]] = getelementptr [1024 x float], [1024 x float]* {{.*}}, i64 0, i64 %polly.indvar -; IR-NEXT: store float 1.000000e+00, float* %[[gep]] +; IR-NEXT: %[[offset:[0-9]+]] = shl i64 %polly.indvar, 2 +; IR-NEXT: %[[gep:[._a-zA-Z0-9]*]] = getelementptr i8, ptr {{.*}}, i64 %[[offset]] +; IR-NEXT: store float 1.000000e+00, ptr %[[gep]] ; IR-NEXT: %polly.indvar_next = add nsw i64 %polly.indvar, 1 ; IR-NEXT: %polly.loop_cond = icmp sle i64 %polly.indvar_next, %polly.par.UBAdjusted ; IR-NEXT: br i1 %polly.loop_cond, label %polly.loop_header, label %polly.loop_exit @@ -84,48 +83,46 @@ ; IR: attributes #1 = { "polly.skip.fn" } -; IR-STRIDE4: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @single_parallel_loop_polly_subfn, i8* %polly.par.userContext1, i32 0, i64 0, i64 1024, i64 4) +; IR-STRIDE4: call void @GOMP_parallel_loop_runtime_start(ptr @single_parallel_loop_polly_subfn, ptr %polly.par.userContext, i32 0, i64 0, i64 1024, i64 4) ; IR-STRIDE4: add nsw i64 %polly.indvar, 3 ; IR-STRIDE4: %polly.indvar_next = add nsw i64 %polly.indvar, 4 ; IR-STRIDE4 %polly.adjust_ub = sub i64 %polly.par.UBAdjusted, 4 -; LIBOMP-IR-STATIC-CHUNKED: %struct.ident_t = type { i32, i32, i32, i32, i8* } +; LIBOMP-IR-STATIC-CHUNKED: %struct.ident_t = type { i32, i32, i32, i32, ptr } ; LIBOMP-IR-STATIC-CHUNKED-LABEL: single_parallel_loop() ; LIBOMP-IR-STATIC-CHUNKED-NEXT: entry ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.par.userContext = alloca ; LIBOMP-IR-STATIC-CHUNKED-LABEL: polly.parallel.for: -; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.par.userContext1 = bitcast {}* %polly.par.userContext to i8* -; LIBOMP-IR-STATIC-CHUNKED-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @.loc.dummy, i32 4, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64, i64, i64, i8*)* @single_parallel_loop_polly_subfn to void (i32*, i32*, ...)*), i64 0, i64 1024, i64 1, i8* %polly.par.userContext1) +; LIBOMP-IR-STATIC-CHUNKED-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @.loc.dummy, i32 4, ptr @single_parallel_loop_polly_subfn, i64 0, i64 1024, i64 1, ptr %polly.par.userContext) ; LIBOMP-IR-STATIC-CHUNKED-NEXT: br label %polly.exiting -; LIBOMP-IR-STATIC-CHUNKED: define internal void @single_parallel_loop_polly_subfn(i32* %polly.kmpc.global_tid, i32* %polly.kmpc.bound_tid, i64 %polly.kmpc.lb, i64 %polly.kmpc.ub, i64 %polly.kmpc.inc, i8* %polly.kmpc.shared) +; LIBOMP-IR-STATIC-CHUNKED: define internal void @single_parallel_loop_polly_subfn(ptr %polly.kmpc.global_tid, ptr %polly.kmpc.bound_tid, i64 %polly.kmpc.lb, i64 %polly.kmpc.ub, i64 %polly.kmpc.inc, ptr %polly.kmpc.shared) ; LIBOMP-IR-STATIC-CHUNKED-LABEL: polly.par.setup: ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.par.LBPtr = alloca i64 ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.par.UBPtr = alloca i64 ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.par.lastIterPtr = alloca i32 ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.par.StridePtr = alloca i64 -; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.par.userContext = bitcast i8* %polly.kmpc.shared -; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.par.global_tid = load i32, i32* %polly.kmpc.global_tid -; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.kmpc.lb, i64* %polly.par.LBPtr -; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.kmpc.ub, i64* %polly.par.UBPtr -; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i32 0, i32* %polly.par.lastIterPtr -; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.kmpc.inc, i64* %polly.par.StridePtr +; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.par.global_tid = load i32, ptr %polly.kmpc.global_tid +; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.kmpc.lb, ptr %polly.par.LBPtr +; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.kmpc.ub, ptr %polly.par.UBPtr +; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i32 0, ptr %polly.par.lastIterPtr +; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.kmpc.inc, ptr %polly.par.StridePtr ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.UBAdjusted = add i64 %polly.kmpc.ub, -1 -; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.indvar.UBAdjusted, i64* %polly.par.UBPtr, align 8 -; LIBOMP-IR-STATIC-CHUNKED-NEXT: call void @__kmpc_for_static_init_{{[4|8]}}(%struct.ident_t* @.loc.dummy{{[.0-9]*}}, i32 %polly.par.global_tid, i32 33, i32* %polly.par.lastIterPtr, i64* %polly.par.LBPtr, i64* %polly.par.UBPtr, i64* %polly.par.StridePtr, i64 1, i64 43) -; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.kmpc.stride = load i64, i64* %polly.par.StridePtr, align 8 -; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.LB = load i64, i64* %polly.par.LBPtr -; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.UB.temp = load i64, i64* %polly.par.UBPtr +; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.indvar.UBAdjusted, ptr %polly.par.UBPtr, align 8 +; LIBOMP-IR-STATIC-CHUNKED-NEXT: call void @__kmpc_for_static_init_{{[4|8]}}(ptr @.loc.dummy{{[.0-9]*}}, i32 %polly.par.global_tid, i32 33, ptr %polly.par.lastIterPtr, ptr %polly.par.LBPtr, ptr %polly.par.UBPtr, ptr %polly.par.StridePtr, i64 1, i64 43) +; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.kmpc.stride = load i64, ptr %polly.par.StridePtr, align 8 +; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.LB = load i64, ptr %polly.par.LBPtr +; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.UB.temp = load i64, ptr %polly.par.UBPtr ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.UB.inRange = icmp sle i64 %polly.indvar.UB.temp, %polly.indvar.UBAdjusted ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.UB = select i1 %polly.indvar.UB.inRange, i64 %polly.indvar.UB.temp, i64 %polly.indvar.UBAdjusted -; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.indvar.UB, i64* %polly.par.UBPtr, align 8 +; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.indvar.UB, ptr %polly.par.UBPtr, align 8 ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.hasIteration = icmp sle i64 %polly.indvar.LB, %polly.indvar.UB ; LIBOMP-IR-STATIC-CHUNKED: br i1 %polly.hasIteration, label %polly.par.loadIVBounds, label %polly.par.exit ; LIBOMP-IR-STATIC-CHUNKED-LABEL: polly.par.exit: -; LIBOMP-IR-STATIC-CHUNKED-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @.loc.dummy, i32 %polly.par.global_tid) +; LIBOMP-IR-STATIC-CHUNKED-NEXT: call void @__kmpc_for_static_fini(ptr @.loc.dummy, i32 %polly.par.global_tid) ; LIBOMP-IR-STATIC-CHUNKED-NEXT: ret void ; LIBOMP-IR-STATIC-CHUNKED-LABEL: polly.par.checkNext: @@ -133,14 +130,14 @@ ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %{{[0-9]+}} = add i64 %polly.indvar.UB.entry, %polly.kmpc.stride ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.nextUB.outOfBounds = icmp sgt i64 %{{[0-9]+}}, %polly.indvar.UBAdjusted ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.nextUB = select i1 %polly.indvar.nextUB.outOfBounds, i64 %polly.indvar.UBAdjusted, i64 %{{[0-9]+}} -; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.indvar.nextLB, i64* %polly.par.LBPtr, align 8 -; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.indvar.nextUB, i64* %polly.par.UBPtr, align 8 +; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.indvar.nextLB, ptr %polly.par.LBPtr, align 8 +; LIBOMP-IR-STATIC-CHUNKED-NEXT: store i64 %polly.indvar.nextUB, ptr %polly.par.UBPtr, align 8 ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.hasWork = icmp sle i64 %polly.indvar.nextLB, %polly.indvar.UBAdjusted ; LIBOMP-IR-STATIC-CHUNKED-NEXT: br i1 %polly.hasWork, label %polly.par.loadIVBounds, label %polly.par.exit ; LIBOMP-IR-STATIC-CHUNKED-LABEL: polly.par.loadIVBounds: -; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.LB.entry = load i64, i64* %polly.par.LBPtr, align 8 -; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.UB.entry = load i64, i64* %polly.par.UBPtr, align 8 +; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.LB.entry = load i64, ptr %polly.par.LBPtr, align 8 +; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar.UB.entry = load i64, ptr %polly.par.UBPtr, align 8 ; LIBOMP-IR-STATIC-CHUNKED-NEXT: br label %polly.loop_preheader ; LIBOMP-IR-STATIC-CHUNKED-LABEL: polly.loop_exit: @@ -151,8 +148,9 @@ ; LIBOMP-IR-STATIC-CHUNKED-NEXT: br label %polly.stmt.S ; LIBOMP-IR-STATIC-CHUNKED-LABEL: polly.stmt.S: -; LIBOMP-IR-STATIC-CHUNKED-NEXT: %[[gep:[._a-zA-Z0-9]*]] = getelementptr [1024 x float], [1024 x float]* {{.*}}, i64 0, i64 %polly.indvar -; LIBOMP-IR-STATIC-CHUNKED-NEXT: store float 1.000000e+00, float* %[[gep]] +; LIBOMP-IR-STATIC-CHUNKED-NEXT: %[[offset:[0-9]+]] = shl i64 %polly.indvar, 2 +; LIBOMP-IR-STATIC-CHUNKED-NEXT: %[[gep:[._a-zA-Z0-9]*]] = getelementptr i8, ptr {{.*}}, i64 %[[offset]] +; LIBOMP-IR-STATIC-CHUNKED-NEXT: store float 1.000000e+00, ptr %[[gep]] ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.indvar_next = add nsw i64 %polly.indvar, 1 ; LIBOMP-IR-STATIC-CHUNKED-NEXT: %polly.loop_cond = icmp sle i64 %polly.indvar_next, %polly.indvar.UB.entry ; LIBOMP-IR-STATIC-CHUNKED-NEXT: br i1 %polly.loop_cond, label %polly.loop_header, label %polly.loop_exit @@ -162,13 +160,13 @@ ; LIBOMP-IR-STATIC-CHUNKED: attributes #1 = { "polly.skip.fn" } -; LIBOMP-IR-STATIC: define internal void @single_parallel_loop_polly_subfn(i32* %polly.kmpc.global_tid, i32* %polly.kmpc.bound_tid, i64 %polly.kmpc.lb, i64 %polly.kmpc.ub, i64 %polly.kmpc.inc, i8* %polly.kmpc.shared) +; LIBOMP-IR-STATIC: define internal void @single_parallel_loop_polly_subfn(ptr %polly.kmpc.global_tid, ptr %polly.kmpc.bound_tid, i64 %polly.kmpc.lb, i64 %polly.kmpc.ub, i64 %polly.kmpc.inc, ptr %polly.kmpc.shared) ; LIBOMP-IR-STATIC-LABEL: polly.par.setup: -; LIBOMP-IR-STATIC: call void @__kmpc_for_static_init_{{[4|8]}}(%struct.ident_t* @.loc.dummy{{[.0-9]*}}, i32 %polly.par.global_tid, i32 34, i32* %polly.par.lastIterPtr, i64* %polly.par.LBPtr, i64* %polly.par.UBPtr, i64* %polly.par.StridePtr, i64 1, i64 1) +; LIBOMP-IR-STATIC: call void @__kmpc_for_static_init_{{[4|8]}}(ptr @.loc.dummy{{[.0-9]*}}, i32 %polly.par.global_tid, i32 34, ptr %polly.par.lastIterPtr, ptr %polly.par.LBPtr, ptr %polly.par.UBPtr, ptr %polly.par.StridePtr, i64 1, i64 1) ; LIBOMP-IR-STATIC: br i1 %polly.hasIteration, label %polly.par.loadIVBounds, label %polly.par.exit ; LIBOMP-IR-STATIC-LABEL: polly.par.exit: -; LIBOMP-IR-STATIC-NEXT: call void @__kmpc_for_static_fini(%struct.ident_t* @.loc.dummy, i32 %polly.par.global_tid) +; LIBOMP-IR-STATIC-NEXT: call void @__kmpc_for_static_fini(ptr @.loc.dummy, i32 %polly.par.global_tid) ; LIBOMP-IR-STATIC-NEXT: ret void ; LIBOMP-IR-STATIC-LABEL: polly.par.checkNext: @@ -185,8 +183,9 @@ ; LIBOMP-IR-STATIC-NEXT: br label %polly.stmt.S ; LIBOMP-IR-STATIC-LABEL: polly.stmt.S: -; LIBOMP-IR-STATIC-NEXT: %[[gep:[._a-zA-Z0-9]*]] = getelementptr [1024 x float], [1024 x float]* {{.*}}, i64 0, i64 %polly.indvar -; LIBOMP-IR-STATIC-NEXT: store float 1.000000e+00, float* %[[gep]] +; LIBOMP-IR-STATIC-NEXT: %[[offset:[0-9]+]] = shl i64 %polly.indvar, 2 +; LIBOMP-IR-STATIC-NEXT: %[[gep:[._a-zA-Z0-9]*]] = getelementptr i8, ptr {{.*}}, i64 %[[offset]] +; LIBOMP-IR-STATIC-NEXT: store float 1.000000e+00, ptr %[[gep]] ; LIBOMP-IR-STATIC-NEXT: %polly.indvar_next = add nsw i64 %polly.indvar, 1 ; LIBOMP-IR-STATIC-NEXT: %polly.loop_cond = icmp sle i64 %polly.indvar_next, %polly.indvar.UB ; LIBOMP-IR-STATIC-NEXT: br i1 %polly.loop_cond, label %polly.loop_header, label %polly.loop_exit @@ -194,8 +193,8 @@ ; LIBOMP-IR-STATIC-LABEL: polly.loop_preheader: ; LIBOMP-IR-STATIC-NEXT: br label %polly.loop_header -; LIBOMP-IR-DYNAMIC: call void @__kmpc_dispatch_init_{{[4|8]}}(%struct.ident_t* @.loc.dummy, i32 %polly.par.global_tid, i32 35, i64 %polly.kmpc.lb, i64 %polly.indvar.UBAdjusted, i64 %polly.kmpc.inc, i64 1) -; LIBOMP-IR-DYNAMIC-NEXT: %{{[0-9]+}} = call i32 @__kmpc_dispatch_next_{{[4|8]}}(%struct.ident_t* @.loc.dummy, i32 %polly.par.global_tid, i32* %polly.par.lastIterPtr, i64* %polly.par.LBPtr, i64* %polly.par.UBPtr, i64* %polly.par.StridePtr) +; LIBOMP-IR-DYNAMIC: call void @__kmpc_dispatch_init_{{[4|8]}}(ptr @.loc.dummy, i32 %polly.par.global_tid, i32 35, i64 %polly.kmpc.lb, i64 %polly.indvar.UBAdjusted, i64 %polly.kmpc.inc, i64 1) +; LIBOMP-IR-DYNAMIC-NEXT: %{{[0-9]+}} = call i32 @__kmpc_dispatch_next_{{[4|8]}}(ptr @.loc.dummy, i32 %polly.par.global_tid, ptr %polly.par.lastIterPtr, ptr %polly.par.LBPtr, ptr %polly.par.UBPtr, ptr %polly.par.StridePtr) ; LIBOMP-IR-DYNAMIC-NEXT: %polly.hasIteration = icmp eq i32 %{{[0-9]+}}, 1 ; LIBOMP-IR-DYNAMIC-NEXT: br i1 %polly.hasIteration, label %polly.par.loadIVBounds, label %polly.par.exit @@ -203,18 +202,18 @@ ; LIBOMP-IR-DYNAMIC-NEXT: ret void ; LIBOMP-IR-DYNAMIC-LABEL: polly.par.checkNext: -; LIBOMP-IR-DYNAMIC-NEXT: %{{[0-9]+}} = call i32 @__kmpc_dispatch_next_{{[4|8]}}(%struct.ident_t* @.loc.dummy, i32 %polly.par.global_tid, i32* %polly.par.lastIterPtr, i64* %polly.par.LBPtr, i64* %polly.par.UBPtr, i64* %polly.par.StridePtr) +; LIBOMP-IR-DYNAMIC-NEXT: %{{[0-9]+}} = call i32 @__kmpc_dispatch_next_{{[4|8]}}(ptr @.loc.dummy, i32 %polly.par.global_tid, ptr %polly.par.lastIterPtr, ptr %polly.par.LBPtr, ptr %polly.par.UBPtr, ptr %polly.par.StridePtr) ; LIBOMP-IR-DYNAMIC-NEXT: %polly.hasWork = icmp eq i32 %{{[0-9]+}}, 1 ; LIBOMP-IR-DYNAMIC-NEXT: br i1 %polly.hasWork, label %polly.par.loadIVBounds, label %polly.par.exit ; LIBOMP-IR-DYNAMIC-LABEL: polly.par.loadIVBounds: -; LIBOMP-IR-DYNAMIC-NEXT: %polly.indvar.LB = load i64, i64* %polly.par.LBPtr -; LIBOMP-IR-DYNAMIC-NEXT: %polly.indvar.UB = load i64, i64* %polly.par.UBPtr +; LIBOMP-IR-DYNAMIC-NEXT: %polly.indvar.LB = load i64, ptr %polly.par.LBPtr +; LIBOMP-IR-DYNAMIC-NEXT: %polly.indvar.UB = load i64, ptr %polly.par.UBPtr ; LIBOMP-IR-DYNAMIC-NEXT: br label %polly.loop_preheader -; LIBOMP-IR-DYNAMIC-FOUR: call void @__kmpc_dispatch_init_{{[4|8]}}(%struct.ident_t* @.loc.dummy, i32 %polly.par.global_tid, i32 35, i64 %polly.kmpc.lb, i64 %polly.indvar.UBAdjusted, i64 %polly.kmpc.inc, i64 4) +; LIBOMP-IR-DYNAMIC-FOUR: call void @__kmpc_dispatch_init_{{[4|8]}}(ptr @.loc.dummy, i32 %polly.par.global_tid, i32 35, i64 %polly.kmpc.lb, i64 %polly.indvar.UBAdjusted, i64 %polly.kmpc.inc, i64 4) -; LIBOMP-IR-STRIDE4: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @.loc.dummy, i32 4, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64, i64, i64, i8*)* @single_parallel_loop_polly_subfn to void (i32*, i32*, ...)*), i64 0, i64 1024, i64 4, i8* %polly.par.userContext1) +; LIBOMP-IR-STRIDE4: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @.loc.dummy, i32 4, ptr @single_parallel_loop_polly_subfn, i64 0, i64 1024, i64 4, ptr %polly.par.userContext) target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" @@ -226,12 +225,12 @@ entry: for.i: %indvar = phi i64 [ %indvar.next, %for.inc], [ 0, %entry ] - %scevgep = getelementptr [1024 x float], [1024 x float]* @A, i64 0, i64 %indvar + %scevgep = getelementptr [1024 x float], ptr @A, i64 0, i64 %indvar %exitcond = icmp ne i64 %indvar, 1024 br i1 %exitcond, label %S, label %exit S: - store float 1.0, float* %scevgep + store float 1.0, ptr %scevgep br label %for.inc for.inc: |