brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 0fdd0be Raw
47 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2 3; void f(int a[], int N, float *P) {4;   int i;5;   for (i = 0; i < N; ++i)6;     if (*P != 0)7;       a[i] = i;8; }9 10target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"11 12define void @f(ptr nocapture %a, i64 %N, ptr %P) nounwind {13entry:14  br label %bb15 16bb:17  %i = phi i64 [ 0, %entry ], [ %i.inc, %bb.backedge ]18  %brcond = icmp ne ptr %P, null19  br i1 %brcond, label %store, label %bb.backedge20 21store:22  %scevgep = getelementptr inbounds i64, ptr %a, i64 %i23  store i64 %i, ptr %scevgep24  br label %bb.backedge25 26bb.backedge:27  %i.inc = add nsw i64 %i, 128  %exitcond = icmp eq i64 %i.inc, %N29  br i1 %exitcond, label %return, label %bb30 31return:32  ret void33}34 35; CHECK:      Assumed Context:36; CHECK-NEXT:   {  :  }37; CHECK-NEXT: Invalid Context:38; CHECK-NEXT:   { : N >= 1152921504606846977 and (P < 0 or P > 0) }39 40; CHECK:  Stmt_store41; CHECK:        Domain :=42; CHECK:            [P, N] -> { Stmt_store[i0] : 0 <= i0 < N and (P < 0 or P > 0) };43; CHECK:        Schedule :=44; CHECK:            [P, N] -> { Stmt_store[i0] -> [i0] : P < 0 or P > 0 };45; CHECK:        MustWriteAccess := [Reduction Type: NONE]46; CHECK:            [P, N] -> { Stmt_store[i0] -> MemRef_a[i0] };47