brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 0aa25f4 Raw
48 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; CHECK: Domain :=4; CHECK:   [N, P] -> { Stmt_if_end[i0] : 0 <= i0 < N and (i0 > P or i0 < P) };5;6;    void f(int *A, int N, int P, int Q) {7;      for (int i = 0; i < N; i++) {8;        if (i == P)9;          continue;10;        A[i]++;11;      }12;    }13;14target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"15 16define void @f(ptr %A, i32 %N, i32 %P, i32 %Q) {17entry:18  %tmp = sext i32 %N to i6419  br label %for.cond20 21for.cond:                                         ; preds = %for.inc, %entry22  %indvars.iv = phi i64 [ %indvars.iv.next, %if.then ], [ %indvars.iv.next, %for.inc ], [ 0, %entry ]23  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 124  %cmp = icmp slt i64 %indvars.iv, %tmp25  br i1 %cmp, label %for.body, label %for.end26 27for.body:                                         ; preds = %for.cond28  %tmp1 = trunc i64 %indvars.iv to i3229  %cmp1 = icmp eq i32 %tmp1, %P30  br i1 %cmp1, label %if.then, label %if.end31 32if.then:                                          ; preds = %for.body33  br label %for.cond34 35if.end:                                           ; preds = %for.body36  %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv37  %tmp2 = load i32, ptr %arrayidx, align 438  %inc = add nsw i32 %tmp2, 139  store i32 %inc, ptr %arrayidx, align 440  br label %for.inc41 42for.inc:                                          ; preds = %if.end, %if.then43  br label %for.cond44 45for.end:                                          ; preds = %for.cond46  ret void47}48