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