1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; The constraint that r2 has to be bigger than r1 is implicitly contained in
4 ; the domain, hence we do not want to see it explicitly.
6 ; CHECK-NOT: r2 >= 1 + r1
8 ; void wraps(int *A, int p, short q, char r1, char r2) {
9 ; for (char i = r1; i < r2; i++)
10 ; A[p + q] = A[(int)r1 + (int)r2];
13 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
15 define void @wraps(ptr %A, i32 %p, i16 signext %q, i8 signext %r1, i8 signext %r2) {
19 for.cond: ; preds = %for.inc, %entry
20 %i.0 = phi i8 [ %r1, %entry ], [ %inc, %for.inc ]
21 %cmp = icmp slt i8 %i.0, %r2
22 br i1 %cmp, label %for.body, label %for.end
24 for.body: ; preds = %for.cond
25 %conv3 = sext i8 %r1 to i64
26 %conv4 = sext i8 %r2 to i64
27 %add = add nsw i64 %conv3, %conv4
28 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %add
29 %tmp = load i32, ptr %arrayidx, align 4
30 %conv5 = sext i16 %q to i32
31 %add6 = add nsw i32 %conv5, %p
32 %idxprom7 = sext i32 %add6 to i64
33 %arrayidx8 = getelementptr inbounds i32, ptr %A, i64 %idxprom7
34 store i32 %tmp, ptr %arrayidx8, align 4
37 for.inc: ; preds = %for.body
41 for.end: ; preds = %for.cond