1; RUN: llc < %s -mtriple=i686-pc-linux | FileCheck %s 2 3 4; Function Attrs: optsize 5declare void @foo(i32, i32) 6declare x86_stdcallcc void @stdfoo(i32, i32) 7 8; CHECK-LABEL: testNoUnwind: 9; CHECK: subl $20, %esp 10; CHECK-NOT: subl $12, %esp 11; CHECK-NOT: subl $8, %esp 12; CHECK: calll foo 13; CHECK: addl $8, %esp 14; CHECK-NOT: addl $16, %esp 15; CHECK-NOT: subl $8, %esp 16; CHECK: calll stdfoo 17; CHECK: addl $20, %esp 18; CHECK-NOT: addl $8, %esp 19; CHECK-NOT: addl $12, %esp 20define void @testNoUnwind() nounwind { 21entry: 22 tail call void @foo(i32 1, i32 2) 23 tail call x86_stdcallcc void @stdfoo(i32 3, i32 4) 24 ret void 25} 26 27; CHECK-LABEL: testWithUnwind: 28; CHECK: subl $20, %esp 29; CHECK-NEXT: .cfi_adjust_cfa_offset 20 30; CHECK-NOT: subl $12, %esp 31; CHECK-NOT: subl $8, %esp 32; CHECK: calll foo 33; CHECK: addl $8, %esp 34; CHECK-NEXT: .cfi_adjust_cfa_offset -8 35; CHECK-NOT: addl $16, %esp 36; CHECK-NOT: subl $8, %esp 37; CHECK: calll stdfoo 38; CHECK: addl $20, %esp 39; CHECK-NEXT: .cfi_adjust_cfa_offset -20 40; CHECK-NOT: addl $8, %esp 41; CHECK-NOT: addl $12, %esp 42define void @testWithUnwind() { 43entry: 44 tail call void @foo(i32 1, i32 2) 45 tail call x86_stdcallcc void @stdfoo(i32 3, i32 4) 46 ret void 47} 48