1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; Check that both a signed as well as an unsigned extended i1 parameter
4 ; is represented correctly.
6 ; void f(signed i1 p0, unsigned i1 p1, int *A) {
7 ; for (int i = 0; i < 100; i++)
8 ; A[i + p0] = A[i + p1];
12 ; CHECK-NEXT: [p1, p0] -> { : -1 <= p1 <= 0 and -1 <= p0 <= 0 }
14 ; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
15 ; CHECK-NEXT: [p1, p0] -> { Stmt_for_body[i0] -> MemRef_A[1 + i0] : p1 = -1; Stmt_for_body[i0] -> MemRef_A[i0] : p1 = 0 };
16 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
17 ; CHECK-NEXT: [p1, p0] -> { Stmt_for_body[i0] -> MemRef_A[p0 + i0] };
19 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
21 define void @f(i1 %p0, i1 %p1, ptr %A) {
23 %tmp4 = sext i1 %p0 to i64
24 %tmp = zext i1 %p1 to i64
27 for.cond: ; preds = %for.inc, %entry
28 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
29 %exitcond = icmp ne i64 %indvars.iv, 100
30 br i1 %exitcond, label %for.body, label %for.end
32 for.body: ; preds = %for.cond
33 %tmp5 = add nsw i64 %indvars.iv, %tmp
34 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %tmp5
35 %tmp6 = load i32, ptr %arrayidx, align 4
36 %tmp7 = add nsw i64 %indvars.iv, %tmp4
37 %arrayidx3 = getelementptr inbounds i32, ptr %A, i64 %tmp7
38 store i32 %tmp6, ptr %arrayidx3, align 4
41 for.inc: ; preds = %for.body
42 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
45 for.end: ; preds = %for.cond