brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 53bbe15 Raw
56 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2;3; TODO: The new domain generation cannot handle modulo domain constraints,4;       hence modulo handling has been disabled completely. Once this is5;       resolved this test should work again. Until then we approximate the6;       whole loop body.7;8; CHECK:   Domain :=9; CHECK:       { Stmt_for_body[i0] : 0 <= i0 <= 15 };10;11;    void foo(float *A) {12;      for (long i = 0; i < 16; i++) {13;        A[i] += 1;14;        if (i % 2)15;          A[i] += 2;16;      }17;    }18;19target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"20 21define void @foo(ptr %A) {22entry:23  br label %for.cond24 25for.cond:                                         ; preds = %for.inc, %entry26  %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.inc ]27  %exitcond = icmp ne i64 %i.0, 1628  br i1 %exitcond, label %for.body, label %for.end29 30for.body:                                         ; preds = %for.cond31  %arrayidx0 = getelementptr inbounds float, ptr %A, i64 %i.032  %tmp0 = load float, ptr %arrayidx0, align 433  %add0 = fadd float %tmp0, 2.000000e+0034  store float %add0, ptr %arrayidx0, align 435  %rem1 = srem i64 %i.0, 236  %tobool = icmp eq i64 %rem1, 037  br i1 %tobool, label %if.end, label %if.then38 39if.then:                                          ; preds = %for.body40  %arrayidx = getelementptr inbounds float, ptr %A, i64 %i.041  %tmp = load float, ptr %arrayidx, align 442  %add = fadd float %tmp, 2.000000e+0043  store float %add, ptr %arrayidx, align 444  br label %if.end45 46if.end:                                           ; preds = %for.body, %if.then47  br label %for.inc48 49for.inc:                                          ; preds = %if.end50  %inc = add nuw nsw i64 %i.0, 151  br label %for.cond52 53for.end:                                          ; preds = %for.cond54  ret void55}56