1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-- < %s | FileCheck %s 3 4@.str = internal constant [4 x i8] c"%d\0A\00" 5 6declare i32 @printf(i8* noalias , ...) nounwind 7 8define i32 @main() nounwind { 9; CHECK-LABEL: main: 10; CHECK: # %bb.0: # %entry 11; CHECK-NEXT: pushq %rbx 12; CHECK-NEXT: movl $10271, %ebx # imm = 0x281F 13; CHECK-NEXT: .p2align 4, 0x90 14; CHECK-NEXT: .LBB0_1: # %forbody 15; CHECK-NEXT: # =>This Inner Loop Header: Depth=1 16; CHECK-NEXT: movl $.str, %edi 17; CHECK-NEXT: movl %ebx, %esi 18; CHECK-NEXT: xorl %eax, %eax 19; CHECK-NEXT: callq printf 20; CHECK-NEXT: addl $-10, %ebx 21; CHECK-NEXT: cmpl $1, %ebx 22; CHECK-NEXT: jne .LBB0_1 23; CHECK-NEXT: # %bb.2: # %afterfor 24; CHECK-NEXT: xorl %eax, %eax 25; CHECK-NEXT: popq %rbx 26; CHECK-NEXT: retq 27entry: 28 br label %forbody 29 30forbody: 31 %i.0 = phi i32 [ 0, %entry ], [ %inc, %forbody ] ; <i32>[#uses=3] 32 %sub14 = sub i32 1027, %i.0 ; <i32> [#uses=1] 33 %mul15 = mul i32 %sub14, 10 ; <i32> [#uses=1] 34 %add166 = or i32 %mul15, 1 ; <i32> [#uses=1] * 35 call i32 (i8*, ...) @printf( i8* noalias getelementptr ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %add166 ) nounwind 36 %inc = add i32 %i.0, 1 ; <i32> [#uses=3] 37 %cmp = icmp ne i32 %inc, 1027 ; <i1> [#uses=1] 38 br i1 %cmp, label %forbody, label %afterfor 39 40afterfor: ; preds = %forcond 41 ret i32 0 42} 43