brintos

brintos / llvm-project-archived public Read only

0
0
Text · 967 B · 3052299 Raw
36 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-detect -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; TODO: We do not allow unbounded loops at the moment.4;5; CHECK-NOT: Stmt_for_body6;7;   void f(int *A, int N, int M) {8;     for (int i = M; i > N; i++)9;       A[i] = i;10;   }11;12target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"13 14define void @f(ptr %A, i32 %N, i32 %M) {15entry:16  br label %entry.split17 18entry.split:19  %cmp.1 = icmp sgt i32 %M, %N20  br i1 %cmp.1, label %for.body, label %for.end21 22for.body:23  %indvars.iv = phi i32 [ %indvars.iv.next, %for.body ], [ %M, %entry.split ]24  %arrayidx = getelementptr inbounds i32, ptr %A, i32 %indvars.iv25  store i32 %indvars.iv, ptr %arrayidx, align 426  %cmp = icmp slt i32 %M, %N27  %indvars.iv.next = add i32 %indvars.iv, 128  br i1 %cmp, label %for.cond.for.end_crit_edge, label %for.body29 30for.cond.for.end_crit_edge:31  br label %for.end32 33for.end:34  ret void35}36