1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-unknown-linux-gnu | FileCheck %s
4 define i32 @a() nounwind {
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: pushl %esi
8 ; CHECK-NEXT: subl $8, %esp
9 ; CHECK-NEXT: leal {{[0-9]+}}(%esp), %esi
10 ; CHECK-NEXT: movl %esi, %eax
11 ; CHECK-NEXT: subl $a, %eax
12 ; CHECK-NEXT: calll d@PLT
13 ; CHECK-NEXT: cmpl $a, %esi
14 ; CHECK-NEXT: jbe .LBB0_2
15 ; CHECK-NEXT: .p2align 4, 0x90
16 ; CHECK-NEXT: .LBB0_1: # %for.cond
17 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
18 ; CHECK-NEXT: jmp .LBB0_1
19 ; CHECK-NEXT: .LBB0_2: # %for.end.split
20 ; CHECK-NEXT: addl $8, %esp
21 ; CHECK-NEXT: popl %esi
24 %b = alloca i32, align 4
25 %0 = ptrtoint ptr %b to i32
26 %sub = sub nsw i32 %0, ptrtoint (ptr @a to i32)
27 %call = call i32 @d(i32 inreg %sub)
28 %cmp = icmp ugt ptr %b, @a
29 br i1 %cmp, label %for.cond, label %for.end.split
31 for.cond: ; preds = %entry, %for.cond
34 for.end.split: ; preds = %entry