1 ; RUN: llc < %s -mtriple=i686-pc-linux | FileCheck %s
4 ; Function Attrs: optsize
5 declare void @foo(i32, i32)
6 declare x86_stdcallcc void @stdfoo(i32, i32)
8 ; CHECK-LABEL: testNoUnwind:
9 ; CHECK: subl $20, %esp
10 ; CHECK-NOT: subl $12, %esp
11 ; CHECK-NOT: subl $8, %esp
13 ; CHECK: addl $8, %esp
14 ; CHECK-NOT: addl $16, %esp
15 ; CHECK-NOT: subl $8, %esp
17 ; CHECK: addl $20, %esp
18 ; CHECK-NOT: addl $8, %esp
19 ; CHECK-NOT: addl $12, %esp
20 define void @testNoUnwind() nounwind {
22 tail call void @foo(i32 1, i32 2)
23 tail call x86_stdcallcc void @stdfoo(i32 3, i32 4)
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
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
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
42 define void @testWithUnwind() {
44 tail call void @foo(i32 1, i32 2)
45 tail call x86_stdcallcc void @stdfoo(i32 3, i32 4)