1 ; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=AST
2 ; RUN: opt %loadPolly -polly-parallel -polly-parallel-force -polly-codegen -S -verify-dom-info < %s | FileCheck %s -check-prefix=IR
5 ; - Test the case where scalar evolution references a loop that is outside
6 ; of the scop, but does not contain the scop.
9 ; AST-NEXT: #pragma simd
10 ; AST-NEXT: #pragma omp parallel for
11 ; AST-NEXT: for (int c0 = 0; c0 < -p_0 + symbol; c0 += 1)
12 ; AST-NEXT: Stmt_while_body(c0);
13 ; AST-NEXT: if (p_0 >= symbol)
14 ; AST-NEXT: Stmt_while_body(0);
17 ; IR: @update_model_polly_subfn
18 ; IR-NOT: @update_model_polly_subfn_1
20 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
22 @cum_freq = external global [258 x i64], align 16
24 define void @update_model(i64 %symbol) {
29 %i.1 = phi i64 [ %dec07, %for.one ], [ %symbol, %entry ]
30 %dec07 = add nsw i64 %i.1, -1
31 br i1 undef, label %for.one, label %while.body
34 %indvar = phi i64 [ %sub42, %while.body ], [ %i.1, %for.one ]
35 %sub42 = add nsw i64 %indvar, -1
36 %arrayidx44 = getelementptr inbounds [258 x i64], ptr @cum_freq, i64 0, i64 %sub42
37 store i64 1, ptr %arrayidx44, align 4
38 %cmp40 = icmp sgt i64 %sub42, 0
39 br i1 %cmp40, label %while.body, label %while.end