1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-linux -enable-misched=false | FileCheck %s
5 define i32 @test1(i8 %x) nounwind readnone {
8 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %eax
9 ; CHECK-NEXT: andl $-32, %eax
12 %B = zext i8 %A to i32
16 ;; Multiple uses of %x but easily extensible.
17 define i32 @test2(i8 %x) nounwind readnone {
20 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %eax
21 ; CHECK-NEXT: movl %eax, %ecx
22 ; CHECK-NEXT: andl $-32, %ecx
23 ; CHECK-NEXT: orl $63, %eax
24 ; CHECK-NEXT: addl %ecx, %eax
27 %B = zext i8 %A to i32
29 %D = zext i8 %C to i32
34 declare void @use(i32, i8)
36 ;; Multiple uses of %x where we shouldn't extend the load.
37 define void @test3(i8 %x) nounwind readnone {
40 ; CHECK-NEXT: subl $12, %esp
41 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %eax
42 ; CHECK-NEXT: subl $8, %esp
43 ; CHECK-NEXT: pushl %eax
44 ; CHECK-NEXT: andl $-32, %eax
45 ; CHECK-NEXT: pushl %eax
46 ; CHECK-NEXT: calll use
47 ; CHECK-NEXT: addl $28, %esp
50 %B = zext i8 %A to i32
51 call void @use(i32 %B, i8 %x)