1 ; RUN: opt %loadNPMPolly '-passes=print<polly-function-scops>' -disable-output < %s 2>&1 | FileCheck %s
3 ; Check that there is no alias group because we either access A or B never both.
5 ; CHECK: Alias Groups (0):
7 ; void jd(int b, int *A, int *B) {
8 ; for (int i = 0; i < 1024; i++) {
16 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
18 define void @jd(i32 %b, ptr %A, ptr %B) {
22 for.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
27 for.body: ; preds = %for.cond
28 %tobool = icmp eq i32 %b, 0
29 br i1 %tobool, label %if.else, label %if.then
31 if.then: ; preds = %for.body
32 %tmp = add nsw i64 %indvars.iv, -1
33 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %tmp
34 %tmp3 = load i32, ptr %arrayidx, align 4
35 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
36 store i32 %tmp3, ptr %arrayidx2, align 4
39 if.else: ; preds = %for.body
40 %tmp4 = add nsw i64 %indvars.iv, -1
41 %arrayidx5 = getelementptr inbounds i32, ptr %B, i64 %tmp4
42 %tmp5 = load i32, ptr %arrayidx5, align 4
43 %arrayidx7 = getelementptr inbounds i32, ptr %B, i64 %indvars.iv
44 store i32 %tmp5, ptr %arrayidx7, align 4
47 if.end: ; preds = %if.else, %if.then
50 for.inc: ; preds = %if.end
51 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
54 for.end: ; preds = %for.cond