brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · ad69141 Raw
53 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; CHECK:      Assumed Context:4; CHECK-NEXT:   [N] -> {  :  }5; CHECK:      Invalid Context:6; CHECK-NEXT:   [N] -> {  : N >= 102 }7;8;    void g(void);9;    void f(int *A, int N) {10;      for (int i = 0; i < N; i++) {11;        if (i > 100)12;          g();13;        A[i]++;14;      }15;    }16;17target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"18 19define void @f(ptr %A, i32 %N) {20entry:21  %tmp = sext i32 %N to i6422  br label %for.cond23 24for.cond:                                         ; preds = %for.inc, %entry25  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]26  %cmp = icmp slt i64 %indvars.iv, %tmp27  br i1 %cmp, label %for.body, label %for.end28 29for.body:                                         ; preds = %for.cond30  %cmp1 = icmp sgt i64 %indvars.iv, 10031  br i1 %cmp1, label %if.then, label %if.end32 33if.then:                                          ; preds = %for.body34  call void @g() #235  br label %if.end36 37if.end:                                           ; preds = %if.then, %for.body38  %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv39  %tmp1 = load i32, ptr %arrayidx, align 440  %inc = add nsw i32 %tmp1, 141  store i32 %inc, ptr %arrayidx, align 442  br label %for.inc43 44for.inc:                                          ; preds = %if.end45  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 146  br label %for.cond47 48for.end:                                          ; preds = %for.cond49  ret void50}51 52declare void @g()53