brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 461af09 Raw
45 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts>' < %s2;3; Regression test for a bug in the runtime check generation.4 5; This was extracted from the blas testcase. It crashed in one6; part of the runtime check generation at some point. To be7; precise, we couldn't find a suitable block to put the RTC code in.8;9; int sscal(int n, float sa, float *sx) {10;   for(int i=0; i<n; i++, sx++)11;     *sx *= sa;12;   return 0;13; }14;15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"16 17define i32 @sscal(i32 %n, float %sa, ptr %sx) {18entry:19  br label %entry.split20 21entry.split:                                      ; preds = %entry22  %cmp1 = icmp sgt i32 %n, 023  br i1 %cmp1, label %for.body.lr.ph, label %for.end24 25for.body.lr.ph:                                   ; preds = %entry.split26  %0 = zext i32 %n to i6427  br label %for.body28 29for.body:                                         ; preds = %for.body.lr.ph, %for.body30  %indvar = phi i64 [ 0, %for.body.lr.ph ], [ %indvar.next, %for.body ]31  %sx.addr.02 = getelementptr float, ptr %sx, i64 %indvar32  %tmp = load float, ptr %sx.addr.02, align 433  %mul = fmul float %tmp, %sa34  store float %mul, ptr %sx.addr.02, align 435  %indvar.next = add i64 %indvar, 136  %exitcond = icmp ne i64 %indvar.next, %037  br i1 %exitcond, label %for.body, label %for.cond.for.end_crit_edge38 39for.cond.for.end_crit_edge:                       ; preds = %for.body40  br label %for.end41 42for.end:                                          ; preds = %for.cond.for.end_crit_edge, %entry.split43  ret i32 044}45