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 ; <i32*> [#uses=1] 6 @llvm.used = appending global [1 x i8*] [ i8* bitcast (i32 ()* @main to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] 7 8 define i32 @main() nounwind { 9 ; CHECK-LABEL: main: 10 ; CHECK: # %bb.0: # %entry 11 ; CHECK-NEXT: movl $255, %eax 12 ; CHECK-NEXT: andl g_407, %eax 13 ; CHECK-NEXT: pushl %eax 14 ; CHECK-NEXT: calll func_45 15 ; CHECK-NEXT: addl $4, %esp 16 ; CHECK-NEXT: xorl %eax, %eax 17 ; CHECK-NEXT: retl 18 entry: 19 %0 = load volatile i32, i32* @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 25 declare i32 @func_45(i8 zeroext) nounwind 26