1 ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s -match-full-lines
2 ; Derived from test-suite/MultiSource/Applications/sgefa/blas.c
4 ; The exit value of %i.0320 in land.rhs is not computable.
5 ; It is still synthesizable in %if.end13---%for.end170 because
6 ; %i.0320 is fixed within the SCoP and therefore just another parameter.
8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 define void @snrm2(i32 %n) local_unnamed_addr {
14 land.rhs: ; preds = %while.body, %entry
15 %i.0320 = phi i32 [ 0, %entry ], [ %inc, %while.body ]
16 br i1 undef, label %while.body, label %if.end13
18 while.body: ; preds = %land.rhs
19 %inc = add nuw nsw i32 %i.0320, 1
22 if.end13: ; preds = %land.rhs
23 %i.4284 = add nsw i32 %i.0320, 1
24 %cmp131285 = icmp slt i32 %i.4284, %n
25 br i1 %cmp131285, label %for.body133.lr.ph, label %for.end170
27 for.body133.lr.ph: ; preds = %if.end13
30 for.body133: ; preds = %for.body133, %for.body133.lr.ph
31 %i.4289 = phi i32 [ %i.4284, %for.body133.lr.ph ], [ %i.4, %for.body133 ]
32 %xmax.2287 = phi float [ undef, %for.body133.lr.ph ], [ undef, %for.body133 ]
33 %i.4 = add nsw i32 %i.4289, 1
34 %exitcond = icmp eq i32 %i.4, %n
35 br i1 %exitcond, label %for.end170, label %for.body133
37 for.end170: ; preds = %for.body133, %if.end13
42 ; CHECK: Region: %if.end13---%for.end170
45 ; CHECK-NEXT: Stmt_for_body133_lr_ph
46 ; CHECK-NEXT: Domain :=
47 ; CHECK-NEXT: [p_0, n] -> { Stmt_for_body133_lr_ph[] : n >= 2 + p_0 };
48 ; CHECK-NEXT: Schedule :=
49 ; CHECK-NEXT: [p_0, n] -> { Stmt_for_body133_lr_ph[] -> [0, 0] };
50 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
51 ; CHECK-NEXT: [p_0, n] -> { Stmt_for_body133_lr_ph[] -> MemRef_xmax_2287__phi[] };
52 ; CHECK-NEXT: Stmt_for_body133
53 ; CHECK-NEXT: Domain :=
54 ; CHECK-NEXT: [p_0, n] -> { Stmt_for_body133[i0] : 0 <= i0 <= -2 - p_0 + n };
55 ; CHECK-NEXT: Schedule :=
56 ; CHECK-NEXT: [p_0, n] -> { Stmt_for_body133[i0] -> [1, i0] };
57 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
58 ; CHECK-NEXT: [p_0, n] -> { Stmt_for_body133[i0] -> MemRef_xmax_2287__phi[] };
59 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
60 ; CHECK-NEXT: [p_0, n] -> { Stmt_for_body133[i0] -> MemRef_xmax_2287__phi[] };