brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 7512da4 Raw
44 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; The constraint that r2 has to be bigger than r1 is implicitly contained in4; the domain, hence we do not want to see it explicitly.5;6; CHECK-NOT:  r2 >= 1 + r17;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];11;    }12;13target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"14 15define void @wraps(ptr %A, i32 %p, i16 signext %q, i8 signext %r1, i8 signext %r2) {16entry:17  br label %for.cond18 19for.cond:                                         ; preds = %for.inc, %entry20  %i.0 = phi i8 [ %r1, %entry ], [ %inc, %for.inc ]21  %cmp = icmp slt i8 %i.0, %r222  br i1 %cmp, label %for.body, label %for.end23 24for.body:                                         ; preds = %for.cond25  %conv3 = sext i8 %r1 to i6426  %conv4 = sext i8 %r2 to i6427  %add = add nsw i64 %conv3, %conv428  %arrayidx = getelementptr inbounds i32, ptr %A, i64 %add29  %tmp = load i32, ptr %arrayidx, align 430  %conv5 = sext i16 %q to i3231  %add6 = add nsw i32 %conv5, %p32  %idxprom7 = sext i32 %add6 to i6433  %arrayidx8 = getelementptr inbounds i32, ptr %A, i64 %idxprom734  store i32 %tmp, ptr %arrayidx8, align 435  br label %for.inc36 37for.inc:                                          ; preds = %for.body38  %inc = add i8 %i.0, 139  br label %for.cond40 41for.end:                                          ; preds = %for.cond42  ret void43}44