brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · d94fc5f Raw
57 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; Check that there is no alias group because we either access A or B never both.4;5; CHECK: Alias Groups (0):6;7;    void jd(int b, int *A, int *B) {8;      for (int i = 0; i < 1024; i++) {9;        if (b)10;          A[i] = A[i - 1];11;        else12;          B[i] = B[i - 1];13;      }14;    }15;16target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"17 18define void @jd(i32 %b, ptr %A, ptr %B) {19entry:20  br label %for.cond21 22for.cond:                                         ; preds = %for.inc, %entry23  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]24  %exitcond = icmp ne i64 %indvars.iv, 102425  br i1 %exitcond, label %for.body, label %for.end26 27for.body:                                         ; preds = %for.cond28  %tobool = icmp eq i32 %b, 029  br i1 %tobool, label %if.else, label %if.then30 31if.then:                                          ; preds = %for.body32  %tmp = add nsw i64 %indvars.iv, -133  %arrayidx = getelementptr inbounds i32, ptr %A, i64 %tmp34  %tmp3 = load i32, ptr %arrayidx, align 435  %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv36  store i32 %tmp3, ptr %arrayidx2, align 437  br label %if.end38 39if.else:                                          ; preds = %for.body40  %tmp4 = add nsw i64 %indvars.iv, -141  %arrayidx5 = getelementptr inbounds i32, ptr %B, i64 %tmp442  %tmp5 = load i32, ptr %arrayidx5, align 443  %arrayidx7 = getelementptr inbounds i32, ptr %B, i64 %indvars.iv44  store i32 %tmp5, ptr %arrayidx7, align 445  br label %if.end46 47if.end:                                           ; preds = %if.else, %if.then48  br label %for.inc49 50for.inc:                                          ; preds = %if.end51  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 152  br label %for.cond53 54for.end:                                          ; preds = %for.cond55  ret void56}57