1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s 2; 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; else 12; 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, i32* %A, i32* %B) { 19entry: 20 br label %for.cond 21 22for.cond: ; preds = %for.inc, %entry 23 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] 24 %exitcond = icmp ne i64 %indvars.iv, 1024 25 br i1 %exitcond, label %for.body, label %for.end 26 27for.body: ; preds = %for.cond 28 %tobool = icmp eq i32 %b, 0 29 br i1 %tobool, label %if.else, label %if.then 30 31if.then: ; preds = %for.body 32 %tmp = add nsw i64 %indvars.iv, -1 33 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %tmp 34 %tmp3 = load i32, i32* %arrayidx, align 4 35 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv 36 store i32 %tmp3, i32* %arrayidx2, align 4 37 br label %if.end 38 39if.else: ; preds = %for.body 40 %tmp4 = add nsw i64 %indvars.iv, -1 41 %arrayidx5 = getelementptr inbounds i32, i32* %B, i64 %tmp4 42 %tmp5 = load i32, i32* %arrayidx5, align 4 43 %arrayidx7 = getelementptr inbounds i32, i32* %B, i64 %indvars.iv 44 store i32 %tmp5, i32* %arrayidx7, align 4 45 br label %if.end 46 47if.end: ; preds = %if.else, %if.then 48 br label %for.inc 49 50for.inc: ; preds = %if.end 51 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 52 br label %for.cond 53 54for.end: ; preds = %for.cond 55 ret void 56} 57