1;RUN: llc < %s -march=x86 | FileCheck %s 2 3define void @foo(i32 inreg %dns) minsize { 4entry: 5; CHECK-LABEL: foo 6; CHECK: dec 7 br label %for.body 8 9for.body: 10 %i.05 = phi i16 [ %dec, %for.body ], [ 0, %entry ] 11 %dec = add i16 %i.05, -1 12 %conv = zext i16 %dec to i32 13 %cmp = icmp slt i32 %conv, %dns 14 br i1 %cmp, label %for.body, label %for.end 15 16for.end: 17 ret void 18} 19 20define void @bar(i32 inreg %dns) minsize { 21entry: 22; CHECK-LABEL: bar 23; CHECK: inc 24 br label %for.body 25 26for.body: 27 %i.05 = phi i16 [ %inc, %for.body ], [ 0, %entry ] 28 %inc = add i16 %i.05, 1 29 %conv = zext i16 %inc to i32 30 %cmp = icmp slt i32 %conv, %dns 31 br i1 %cmp, label %for.body, label %for.end 32for.end: 33 ret void 34} 35