1 ; RUN: llc -march=lanai < %s | FileCheck %s
2 ; RUN: llc -march=lanai --lanai-nop-delay-filler < %s | \
3 ; RUN: FileCheck %s --check-prefix=NOP
10 ; ModuleID = 'delay_filler.c'
11 target datalayout = "E-m:e-p:32:32-i64:64-a:0:32-n32-S64"
12 target triple = "lanai"
14 ; Function Attrs: nounwind
15 define i32 @g(i32 inreg %n) #0 {
17 %cmp5 = icmp sgt i32 %n, 0
18 br i1 %cmp5, label %for.body.preheader, label %for.cond.cleanup
20 for.body.preheader: ; preds = %entry
23 for.cond.cleanup.loopexit: ; preds = %for.body
24 %call.lcssa = phi i32 [ %call, %for.body ]
25 br label %for.cond.cleanup
27 for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry
28 %a.0.lcssa = phi i32 [ undef, %entry ], [ %call.lcssa, %for.cond.cleanup.loopexit ]
31 for.body: ; preds = %for.body.preheader, %for.body
32 %i.07 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]
33 %a.06 = phi i32 [ %call, %for.body ], [ undef, %for.body.preheader ]
34 %call = tail call i32 @f(i32 inreg %a.06) #2
35 %inc = add nuw nsw i32 %i.07, 1
36 %exitcond = icmp eq i32 %inc, %n
37 br i1 %exitcond, label %for.cond.cleanup.loopexit, label %for.body
40 declare i32 @f(i32 inreg) #1