1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=i686-- | FileCheck %s 3; PR2835 4 5@g_407 = internal global i32 0 ; <ptr> [#uses=1] 6@llvm.used = appending global [1 x ptr] [ ptr @main ], section "llvm.metadata" ; <ptr> [#uses=0] 7 8define i32 @main() nounwind { 9; CHECK-LABEL: main: 10; CHECK: # %bb.0: # %entry 11; CHECK-NEXT: movl g_407, %eax 12; CHECK-NEXT: movzbl %al, %eax 13; CHECK-NEXT: pushl %eax 14; CHECK-NEXT: calll func_45@PLT 15; CHECK-NEXT: addl $4, %esp 16; CHECK-NEXT: xorl %eax, %eax 17; CHECK-NEXT: retl 18entry: 19 %0 = load volatile i32, ptr @g_407, align 4 ; <i32> [#uses=1] 20 %1 = trunc i32 %0 to i8 ; <i8> [#uses=1] 21 %2 = tail call i32 @func_45(i8 zeroext %1) nounwind ; <i32> [#uses=0] 22 ret i32 0 23} 24 25declare i32 @func_45(i8 zeroext) nounwind 26