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
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 = bitcast i32* %b to i8*
26 %1 = ptrtoint i32* %b to i32
27 %sub = sub nsw i32 %1, ptrtoint (i32 ()* @a to i32)
28 %call = call i32 bitcast (i32 (...)* @d to i32 (i32)*)(i32 inreg %sub)
29 %cmp = icmp ugt i32* %b, bitcast (i32 ()* @a to i32*)
30 br i1 %cmp, label %for.cond, label %for.end.split
32 for.cond: ; preds = %entry, %for.cond
35 for.end.split: ; preds = %entry