brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · cf5b533 Raw
48 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; Check that both a signed as well as an unsigned extended i1 parameter4; is represented correctly.5;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];9;    }10;11; CHECK:       Context:12; CHECK-NEXT:    [p1, p0] -> {  : -1 <= p1 <= 0 and -1 <= p0 <= 0 }13;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] };18;19target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"20 21define void @f(i1 %p0, i1 %p1, ptr %A) {22entry:23  %tmp4 = sext i1 %p0 to i6424  %tmp = zext i1 %p1 to i6425  br label %for.cond26 27for.cond:                                         ; preds = %for.inc, %entry28  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]29  %exitcond = icmp ne i64 %indvars.iv, 10030  br i1 %exitcond, label %for.body, label %for.end31 32for.body:                                         ; preds = %for.cond33  %tmp5 = add nsw i64 %indvars.iv, %tmp34  %arrayidx = getelementptr inbounds i32, ptr %A, i64 %tmp535  %tmp6 = load i32, ptr %arrayidx, align 436  %tmp7 = add nsw i64 %indvars.iv, %tmp437  %arrayidx3 = getelementptr inbounds i32, ptr %A, i64 %tmp738  store i32 %tmp6, ptr %arrayidx3, align 439  br label %for.inc40 41for.inc:                                          ; preds = %for.body42  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 143  br label %for.cond44 45for.end:                                          ; preds = %for.cond46  ret void47}48