1 ; RUN: not llc -mtriple arm-arm-none-eabi -filetype asm -o - %s -frame-pointer=all 2>&1 | FileCheck %s --check-prefix=R7-FREE --check-prefix=R11-RESERVED
2 ; RUN: not llc -mtriple arm-arm-none-eabi -filetype asm -o - %s -frame-pointer=all -mattr=+aapcs-frame-chain 2>&1 | FileCheck %s --check-prefix=R7-FREE --check-prefix=R11-RESERVED
3 ; RUN: not llc -mtriple arm-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf 2>&1 | FileCheck %s --check-prefix=R7-FREE --check-prefix=R11-RESERVED
4 ; RUN: not llc -mtriple arm-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf -mattr=+aapcs-frame-chain 2>&1 | FileCheck %s --check-prefix=R7-FREE --check-prefix=R11-RESERVED
5 ; RUN: llc -mtriple arm-arm-none-eabi -filetype asm -o - %s -frame-pointer=none 2>&1 | FileCheck %s --check-prefix=R7-FREE --check-prefix=R11-FREE
6 ; RUN: llc -mtriple arm-arm-none-eabi -filetype asm -o - %s -frame-pointer=none -mattr=+aapcs-frame-chain 2>&1 | FileCheck %s --check-prefix=R7-FREE --check-prefix=R11-FREE
7 ; RUN: not llc -mtriple arm-arm-none-eabi -filetype asm -o - %s -frame-pointer=reserved 2>&1 | FileCheck %s --check-prefix=R7-FREE --check-prefix=R11-RESERVED
8 ; RUN: not llc -mtriple arm-arm-none-eabi -filetype asm -o - %s -frame-pointer=reserved -mattr=+aapcs-frame-chain 2>&1 | FileCheck %s --check-prefix=R7-FREE --check-prefix=R11-RESERVED
10 declare void @leaf(i32 %input)
12 define void @reserved_r7(i32 %input) {
13 ; R7-RESERVED: error: write to reserved register 'R7'
14 ; R7-FREE-NOT: error: write to reserved register 'R7'
15 %1 = call i32 asm sideeffect "mov $0, $1", "={r7},r"(i32 %input)
19 define void @reserved_r11(i32 %input) {
20 ; R11-RESERVED: error: write to reserved register 'R11'
21 ; R11-FREE-NOT: error: write to reserved register 'R11'
22 %1 = call i32 asm sideeffect "mov $0, $1", "={r11},r"(i32 %input)