1 ; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true -polly-parallel \
2 ; RUN: -polly-parallel-force -S < %s | FileCheck %s
4 ; Test to verify that we hand down the preloaded A[0] to the OpenMP subfunction.
7 ; for (int i = 1; i < 1000; i++)
8 ; A[i] += /* split bb */ A[0];
11 ; CHECK: %polly.par.userContext = alloca { float, ptr, ptr }
13 ; CHECK: %polly.subfn.storeaddr.polly.access.A.load = getelementptr inbounds
14 ; CHECK: store float %polly.access.A.load, ptr %polly.subfn.storeaddr.polly.access.A.load
16 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
18 define void @f(ptr nocapture %A) {
22 for.cond.cleanup: ; preds = %for.body
25 for.body: ; preds = %for.body, %entry
26 %indvars.iv = phi i64 [ 1, %entry ], [ %indvars.iv.next, %for.body.split ]
27 %tmp = load float, ptr %A, align 4
28 br label %for.body.split
31 %arrayidx1 = getelementptr inbounds float, ptr %A, i64 %indvars.iv
32 %tmp1 = load float, ptr %arrayidx1, align 4
33 %add = fadd float %tmp, %tmp1
34 store float %add, ptr %arrayidx1, align 4
35 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
36 %exitcond = icmp eq i64 %indvars.iv.next, 1000
37 br i1 %exitcond, label %for.cond.cleanup, label %for.body