1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686--
3 ; RUN: llc -pre-RA-sched=source < %s -mtriple=i686-unknown-linux -mcpu=corei7 | FileCheck %s --check-prefix=SOURCE-SCHED
6 @g_73 = external global i32
7 @g_5 = external global i32
9 define i32 @func_44(i16 signext %p_46) nounwind {
10 ; SOURCE-SCHED-LABEL: func_44:
11 ; SOURCE-SCHED: # %bb.0: # %entry
12 ; SOURCE-SCHED-NEXT: subl $12, %esp
13 ; SOURCE-SCHED-NEXT: movl g_5, %eax
14 ; SOURCE-SCHED-NEXT: sarl %eax
15 ; SOURCE-SCHED-NEXT: xorl %ecx, %ecx
16 ; SOURCE-SCHED-NEXT: cmpl $1, %eax
17 ; SOURCE-SCHED-NEXT: setg %cl
18 ; SOURCE-SCHED-NEXT: movb g_73, %dl
19 ; SOURCE-SCHED-NEXT: xorl %eax, %eax
20 ; SOURCE-SCHED-NEXT: subb {{[0-9]+}}(%esp), %al
21 ; SOURCE-SCHED-NEXT: testb %dl, %dl
22 ; SOURCE-SCHED-NEXT: jne .LBB0_2
23 ; SOURCE-SCHED-NEXT: # %bb.1: # %bb11
24 ; SOURCE-SCHED-NEXT: movzbl %al, %eax
25 ; SOURCE-SCHED-NEXT: divb %dl
26 ; SOURCE-SCHED-NEXT: movzbl %ah, %eax
27 ; SOURCE-SCHED-NEXT: .LBB0_2: # %bb12
28 ; SOURCE-SCHED-NEXT: xorl %edx, %edx
29 ; SOURCE-SCHED-NEXT: testb %al, %al
30 ; SOURCE-SCHED-NEXT: setne %dl
31 ; SOURCE-SCHED-NEXT: subl $4, %esp
32 ; SOURCE-SCHED-NEXT: pushl $0
33 ; SOURCE-SCHED-NEXT: pushl %ecx
34 ; SOURCE-SCHED-NEXT: pushl %edx
35 ; SOURCE-SCHED-NEXT: calll func_48
36 ; SOURCE-SCHED-NEXT: addl $28, %esp
37 ; SOURCE-SCHED-NEXT: retl
39 %0 = load i32, i32* @g_5, align 4
41 %2 = icmp sgt i32 %1, 1
42 %3 = zext i1 %2 to i32
43 %4 = load i32, i32* @g_73, align 4
44 %5 = zext i16 %p_46 to i64
46 %7 = trunc i64 %6 to i8
47 %8 = trunc i32 %4 to i8
49 br i1 %9, label %bb11, label %bb12
56 %.014.in = phi i8 [ %10, %bb11 ], [ %7, %entry ]
57 %11 = icmp ne i8 %.014.in, 0
58 %12 = zext i1 %11 to i32
59 %13 = tail call i32 (...) @func_48( i32 %12, i32 %3, i32 0 ) nounwind
63 declare i32 @func_48(...)