brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · e5ece1f Raw
44 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<ast>' -polly-print-ast -disable-output < %s | FileCheck %s2;3;    void jd(int *A, int *B, int c) {4;      for (int i = 0; i < 1024; i++)5;        A[i] = B[c - 10] + B[5];6;    }7;8; CHECK: if (1 && 0 == c <= -{{[0-9]*}} && (&MemRef_B[max(6, c - 9)] <= &MemRef_A[0] || &MemRef_A[1024] <= &MemRef_B[min(5, c - 10)]))9; CHECK:     for (int c0 = 0; c0 <= 1023; c0 += 1)10; CHECK:       Stmt_for_body(c0);11; CHECK: else12; CHECK:    /* original code */13;14target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"15 16define void @jd(ptr %A, ptr %B, i32 %c) {17entry:18  br label %for.cond19 20for.cond:                                         ; preds = %for.inc, %entry21  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]22  %exitcond = icmp ne i64 %indvars.iv, 102423  br i1 %exitcond, label %for.body, label %for.end24 25for.body:                                         ; preds = %for.cond26  %sub = add nsw i32 %c, -1027  %idxprom = sext i32 %sub to i6428  %arrayidx = getelementptr inbounds i32, ptr %B, i64 %idxprom29  %tmp = load i32, ptr %arrayidx, align 430  %arrayidx1 = getelementptr inbounds i32, ptr %B, i64 531  %tmp1 = load i32, ptr %arrayidx1, align 432  %add = add nsw i32 %tmp, %tmp133  %arrayidx3 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv34  store i32 %add, ptr %arrayidx3, align 435  br label %for.inc36 37for.inc:                                          ; preds = %for.body38  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 139  br label %for.cond40 41for.end:                                          ; preds = %for.cond42  ret void43}44