[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / CodeGen / Thumb / frame-chain-reserved-fp.ll
blob37dd16bd9dd92d55928af1cf07ed766ccaf1b73e
1 ; RUN: not llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=all 2>&1 | FileCheck %s --check-prefix=RESERVED-R7
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=RESERVED-R11
3 ; RUN: not llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=all -mattr=+aapcs-frame-chain-leaf 2>&1 | FileCheck %s --check-prefix=RESERVED-R11
4 ; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf 2>&1 | FileCheck %s --check-prefix=RESERVED-NONE
5 ; 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=RESERVED-R11
6 ; RUN: not llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf -mattr=+aapcs-frame-chain-leaf 2>&1 | FileCheck %s --check-prefix=RESERVED-R11
7 ; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=none 2>&1 | FileCheck %s --check-prefix=RESERVED-NONE
8 ; RUN: not llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=none -mattr=+aapcs-frame-chain 2>&1 | FileCheck %s --check-prefix=RESERVED-R11
9 ; RUN: not llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=none -mattr=+aapcs-frame-chain-leaf 2>&1 | FileCheck %s --check-prefix=RESERVED-R11
11 declare void @leaf(i32 %input)
13 define void @reserved_r7(i32 %input) {
14 ; RESERVED-NONE-NOT: error: write to reserved register 'R7'
15 ; RESERVED-R7: error: write to reserved register 'R7'
16 ; RESERVED-R11-NOT: error: write to reserved register 'R7'
17   %1 = call i32 asm sideeffect "mov $0, $1", "={r7},r"(i32 %input)
18   ret void
21 define void @reserved_r11(i32 %input) {
22 ; RESERVED-NONE-NOT: error: write to reserved register 'R11'
23 ; RESERVED-R7-NOT: error: write to reserved register 'R11'
24 ; RESERVED-R11: error: write to reserved register 'R11'
25   %1 = call i32 asm sideeffect "mov $0, $1", "={r11},r"(i32 %input)
26   ret void