Update Polly tests to handle explicitly typed gep changes in LLVM
[polly-mirror.git] / test / Isl / CodeGen / OpenMP / loop-body-references-outer-values.ll
blob129c8f9140ae41aa12d1e7fd3b134228531bbaae
1 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-parallel -polly-parallel-force -polly-ast -analyze < %s | FileCheck %s -check-prefix=AST
2 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-parallel -polly-parallel-force -polly-codegen-isl -S < %s | FileCheck %s -check-prefix=IR
3 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-parallel -polly-parallel-force -polly-codegen-isl -S < %s | FileCheck %s -check-prefix=IR
5 ; Make sure we correctly forward the reference to 'A' to the OpenMP subfunction.
7 ; void loop_references_outer_ids(float *A) {
8 ;   for (long i = 0; i < 100; i++)
9 ;     A[i] = i;
10 ; }
13 ; AST: #pragma simd
14 ; AST: #pragma omp parallel for
15 ; AST: for (int c0 = 0; c0 <= 99; c0 += 1)
16 ; AST:   Stmt_for_body(c0);
18 ; IR-LABEL: polly.start:
19 ; IR-NEXT:  %0 = bitcast { float* }* %polly.par.userContext to i8*
20 ; IR-NEXT:  call void @llvm.lifetime.start(i64 8, i8* %0)
21 ; IR-NEXT:  %1 = getelementptr inbounds { float* }, { float* }* %polly.par.userContext, i32 0, i32 0
22 ; IR-NEXT:  store float* %A, float** %1
23 ; IR-NEXT:  %polly.par.userContext1 = bitcast { float* }* %polly.par.userContext to i8*
25 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
27 define void @loop_references_outer_ids(float* %A) {
28 entry:
29   br label %for.cond
31 for.cond:                                         ; preds = %for.inc, %entry
32   %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.inc ]
33   %exitcond = icmp ne i64 %i.0, 100
34   br i1 %exitcond, label %for.body, label %for.end
36 for.body:                                         ; preds = %for.cond
37   %conv = sitofp i64 %i.0 to float
38   %arrayidx = getelementptr inbounds float, float* %A, i64 %i.0
39   store float %conv, float* %arrayidx, align 4
40   br label %for.inc
42 for.inc:                                          ; preds = %for.body
43   %inc = add nsw i64 %i.0, 1
44   br label %for.cond
46 for.end:                                          ; preds = %for.cond
47   ret void