1; RUN: llc <%s -mtriple=aarch64-eabi -verify-machine-dom-info | FileCheck %s 2 3; CHECK-LABEL: test: 4; CHECK-LABEL: %cond.false12.i 5; CHECK: b.gt 6; CHECK-NEXT: LBB0_8: 7; CHECK-NEXT: mov x8, x9 8; CHECK-NEXT: LBB0_9: 9define i64 @test(i64 %n, i64* %a, i64* %b, i64* %c, i64* %d, i64* %e, i64* %f) { 10entry: 11 %cmp28 = icmp sgt i64 %n, 1 12 br i1 %cmp28, label %for.body, label %for.end 13 14for.body: ; preds = %for.body.lr.ph, %if.end 15 %j = phi i64 [ %n, %entry ], [ %div, %if.end ] 16 %div = lshr i64 %j, 1 17 %a.arrayidx = getelementptr inbounds i64, i64* %a, i64 %div 18 %a.j = load i64, i64* %a.arrayidx 19 %b.arrayidx = getelementptr inbounds i64, i64* %b, i64 %div 20 %b.j = load i64, i64* %b.arrayidx 21 %cmp.i = icmp slt i64 %a.j, %b.j 22 br i1 %cmp.i, label %for.end.loopexit, label %cond.false.i 23 24cond.false.i: ; preds = %for.body 25 %cmp4.i = icmp sgt i64 %a.j, %b.j 26 br i1 %cmp4.i, label %if.end, label %cond.false6.i 27 28cond.false6.i: ; preds = %cond.false.i 29 %c.arrayidx = getelementptr inbounds i64, i64* %c, i64 %div 30 %c.j = load i64, i64* %c.arrayidx 31 %d.arrayidx = getelementptr inbounds i64, i64* %d, i64 %div 32 %d.j = load i64, i64* %d.arrayidx 33 %cmp9.i = icmp slt i64 %c.j, %d.j 34 br i1 %cmp9.i, label %for.end.loopexit, label %cond.false11.i 35 36cond.false11.i: ; preds = %cond.false6.i 37 %cmp14.i = icmp sgt i64 %c.j, %d.j 38 br i1 %cmp14.i, label %if.end, label %cond.false12.i 39 40cond.false12.i: ; preds = %cond.false11.i 41 %e.arrayidx = getelementptr inbounds i64, i64* %e, i64 %div 42 %e.j = load i64, i64* %e.arrayidx 43 %f.arrayidx = getelementptr inbounds i64, i64* %f, i64 %div 44 %f.j = load i64, i64* %f.arrayidx 45 %cmp19.i = icmp sgt i64 %e.j, %f.j 46 br i1 %cmp19.i, label %if.end, label %for.end.loopexit 47 48if.end: ; preds = %cond.false12.i, %cond.false11.i, %cond.false.i 49 %cmp = icmp ugt i64 %j, 3 50 br i1 %cmp, label %for.body, label %for.end.loopexit 51 52for.end.loopexit: ; preds = %cond.false12.i, %cond.false6.i, %for.body, %if.end 53 %j.0.lcssa.ph = phi i64 [ %j, %cond.false12.i ], [ %j, %cond.false6.i ], [ %j, %for.body ], [ %div, %if.end ] 54 br label %for.end 55 56for.end: ; preds = %for.end.loopexit, %entry 57 %j.0.lcssa = phi i64 [ %n, %entry ], [ %j.0.lcssa.ph, %for.end.loopexit ] 58 %j.2 = add i64 %j.0.lcssa, %n 59 %j.3 = mul i64 %j.2, %n 60 %j.4 = add i64 %j.3, 10 61 ret i64 %j.4 62} 63