[Transforms] Silence a warning in SROA.cpp (NFC)
[llvm-project.git] / llvm / test / CodeGen / Thumb / frame-chain-reserved-fp.ll
blobd62eb20b84593996720ddbd20d10e751e5aad281
1 ; RUN: not llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=all                                2>&1 | FileCheck %s --check-prefix=R7-RESERVED --check-prefix=R11-FREE
2 ; RUN: not llc -mtriple thumbv6m-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 thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf                           2>&1 | FileCheck %s --check-prefix=R7-RESERVED --check-prefix=R11-FREE
4 ; RUN: not llc -mtriple thumbv6m-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 thumbv6m-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 thumbv6m-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 thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=reserved                           2>&1 | FileCheck %s --check-prefix=R7-RESERVED --check-prefix=R11-FREE
8 ; RUN: not llc -mtriple thumbv6m-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)
16   ret void
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)
23   ret void