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: # kill: def $eax killed $eax def $ax
26 ; SOURCE-SCHED-NEXT: divb %dl
27 ; SOURCE-SCHED-NEXT: movzbl %ah, %eax
28 ; SOURCE-SCHED-NEXT: .LBB0_2: # %bb12
29 ; SOURCE-SCHED-NEXT: xorl %edx, %edx
30 ; SOURCE-SCHED-NEXT: testb %al, %al
31 ; SOURCE-SCHED-NEXT: setne %dl
32 ; SOURCE-SCHED-NEXT: subl $4, %esp
33 ; SOURCE-SCHED-NEXT: pushl $0
34 ; SOURCE-SCHED-NEXT: pushl %ecx
35 ; SOURCE-SCHED-NEXT: pushl %edx
36 ; SOURCE-SCHED-NEXT: calll func_48
37 ; SOURCE-SCHED-NEXT: addl $28, %esp
38 ; SOURCE-SCHED-NEXT: retl
40 %0 = load i32, i32* @g_5, align 4
42 %2 = icmp sgt i32 %1, 1
43 %3 = zext i1 %2 to i32
44 %4 = load i32, i32* @g_73, align 4
45 %5 = zext i16 %p_46 to i64
47 %7 = trunc i64 %6 to i8
48 %8 = trunc i32 %4 to i8
50 br i1 %9, label %bb11, label %bb12
57 %.014.in = phi i8 [ %10, %bb11 ], [ %7, %entry ]
58 %11 = icmp ne i8 %.014.in, 0
59 %12 = zext i1 %11 to i32
60 %13 = tail call i32 (...) @func_48( i32 %12, i32 %3, i32 0 ) nounwind
64 declare i32 @func_48(...)