Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / ARM / seh-checks2.s
blobc8c525649f975595957ca6c90c4d55b2e64886f1
1 // This test checks error reporting for missing ending/starting of prologues/epilogues
3 // RUN: not llvm-mc -triple thumbv7-pc-win32 -filetype=obj -o /dev/null %s 2>&1 | FileCheck %s
5 // CHECK: error: Stray .seh_endepilogue in func1
6 // CHECK: error: Prologue in func2 not correctly terminated
7 // CHECK: error: Epilogue in func3 not correctly terminated
8 // CHECK: error: Epilogue in func4 not correctly terminated
10 .text
11 .syntax unified
13 .seh_proc func1
14 func1:
15 sub sp, #16
16 .seh_stackalloc 16
17 .seh_endprologue
18 nop
19 // Missing .seh_startepilogue
20 add sp, #16
21 .seh_stackalloc 16
22 bx lr
23 .seh_nop
24 .seh_endepilogue
25 .seh_endproc
27 .seh_proc func2
28 func2:
29 sub sp, #16
30 .seh_stackalloc 16
31 // Missing .seh_endprologue
32 nop
33 .seh_startepilogue
34 add sp, #16
35 .seh_stackalloc 16
36 bx lr
37 .seh_nop
38 .seh_endepilogue
39 .seh_endproc
41 .seh_proc func3
42 func3:
43 sub sp, #16
44 .seh_stackalloc 16
45 .seh_endprologue
46 nop
47 .seh_startepilogue
48 add sp, #16
49 .seh_stackalloc 16
50 bx lr
51 .seh_nop
52 // Missing .seh_endepilogue
53 .seh_endproc
55 .seh_proc func4
56 func4:
57 sub sp, #16
58 .seh_stackalloc 16
59 .seh_endprologue
60 nop
61 .seh_startepilogue
62 add sp, #16
63 .seh_stackalloc 16
64 bx lr
65 .seh_nop
66 // Missing .seh_endepilogue
67 nop
68 .seh_startepilogue
69 add sp, #16
70 .seh_stackalloc 16
71 bx lr
72 .seh_nop
73 .seh_endepilogue
74 .seh_endproc