1 # RUN: llc -mtriple thumbv7m-none-eabi -run-pass prologepilog %s -o - | FileCheck %s
4 define void @throw() noreturn { unreachable }
6 define void @ret() nounwind { ret void }
8 define void @tables() nounwind noreturn uwtable { ret void }
10 define void @noret() noreturn nounwind {
18 # This function may return by exception. Check that $r4 is saved and restored.
19 # CHECK-LABEL: name: throw
29 # This function may return. Check that $r4 is saved and restored.
30 # CHECK-LABEL: name: ret
40 # This function needs correct unwind tables anyway. Check that $r4 is saved and
42 # CHECK-LABEL: name: tables
52 # This function does not return. We need not save any CSR, but
53 # other stack adjustments in the prologue are still necessary.
54 # CHECK-LABEL: name: noret
55 # CHECK-NOT: killed $r4
57 # CHECK: $sp = frame-setup
60 - { id: 0, name: p, offset: 0, size: 4, alignment: 4, local-offset: -4 }