Skip to content

Commit

Permalink
[NFC][Thumb] Update frame-chain codegen test to use thumbv6m
Browse files Browse the repository at this point in the history
The `llvm/test/CodeGen/Thumb/frame-chain.ll`, recently added by D125094,
currently fails when expensive checks are enabled due to a tMOVr
instruction that is only valid from V6 onwards.

The use of the invalid instruction is unrelated to the contents of the
original patch, and continues to be triggered by this test if its
CodeGen changes are reverted, so this patch updates the test to use V6-M
while the issue is not resolved.
  • Loading branch information
pratlucas committed Jun 14, 2022
1 parent 989bd57 commit cbcce82
Showing 1 changed file with 18 additions and 32 deletions.
50 changes: 18 additions & 32 deletions llvm/test/CodeGen/Thumb/frame-chain.ll
@@ -1,12 +1,12 @@
; RUN: llc -mtriple thumb-arm-none-eabi -filetype asm -o - %s -frame-pointer=all | FileCheck %s --check-prefixes=FP,LEAF-FP
; RUN: llc -mtriple thumb-arm-none-eabi -filetype asm -o - %s -frame-pointer=all -mattr=+aapcs-frame-chain | FileCheck %s --check-prefixes=FP-AAPCS,LEAF-FP
; RUN: llc -mtriple thumb-arm-none-eabi -filetype asm -o - %s -frame-pointer=all -mattr=+aapcs-frame-chain-leaf | FileCheck %s --check-prefixes=FP-AAPCS,LEAF-FP-AAPCS
; RUN: llc -mtriple thumb-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf | FileCheck %s --check-prefixes=FP,LEAF-NOFP
; RUN: llc -mtriple thumb-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf -mattr=+aapcs-frame-chain | FileCheck %s --check-prefixes=FP-AAPCS,LEAF-NOFP
; RUN: llc -mtriple thumb-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf -mattr=+aapcs-frame-chain-leaf | FileCheck %s --check-prefixes=FP-AAPCS,LEAF-NOFP-AAPCS
; RUN: llc -mtriple thumb-arm-none-eabi -filetype asm -o - %s -frame-pointer=none | FileCheck %s --check-prefixes=NOFP,LEAF-NOFP
; RUN: llc -mtriple thumb-arm-none-eabi -filetype asm -o - %s -frame-pointer=none -mattr=+aapcs-frame-chain | FileCheck %s --check-prefixes=NOFP-AAPCS,LEAF-NOFP
; RUN: llc -mtriple thumb-arm-none-eabi -filetype asm -o - %s -frame-pointer=none -mattr=+aapcs-frame-chain-leaf | FileCheck %s --check-prefixes=NOFP-AAPCS,LEAF-NOFP-AAPCS
; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=all --verify-machineinstrs | FileCheck %s --check-prefixes=FP,LEAF-FP
; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=all -mattr=+aapcs-frame-chain --verify-machineinstrs | FileCheck %s --check-prefixes=FP-AAPCS,LEAF-FP
; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=all -mattr=+aapcs-frame-chain-leaf --verify-machineinstrs | FileCheck %s --check-prefixes=FP-AAPCS,LEAF-FP-AAPCS
; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf --verify-machineinstrs | FileCheck %s --check-prefixes=FP,LEAF-NOFP
; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf -mattr=+aapcs-frame-chain --verify-machineinstrs | FileCheck %s --check-prefixes=FP-AAPCS,LEAF-NOFP
; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=non-leaf -mattr=+aapcs-frame-chain-leaf --verify-machineinstrs | FileCheck %s --check-prefixes=FP-AAPCS,LEAF-NOFP-AAPCS
; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=none --verify-machineinstrs | FileCheck %s --check-prefixes=NOFP,LEAF-NOFP
; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=none -mattr=+aapcs-frame-chain --verify-machineinstrs | FileCheck %s --check-prefixes=NOFP-AAPCS,LEAF-NOFP
; RUN: llc -mtriple thumbv6m-arm-none-eabi -filetype asm -o - %s -frame-pointer=none -mattr=+aapcs-frame-chain-leaf --verify-machineinstrs | FileCheck %s --check-prefixes=NOFP-AAPCS,LEAF-NOFP-AAPCS

define dso_local noundef i32 @leaf(i32 noundef %0) {
; LEAF-FP-LABEL: leaf:
Expand Down Expand Up @@ -34,8 +34,7 @@ define dso_local noundef i32 @leaf(i32 noundef %0) {
; LEAF-FP-AAPCS-NEXT: add sp, #4
; LEAF-FP-AAPCS-NEXT: pop {r1}
; LEAF-FP-AAPCS-NEXT: mov r11, r1
; LEAF-FP-AAPCS-NEXT: pop {r1}
; LEAF-FP-AAPCS-NEXT: bx r1
; LEAF-FP-AAPCS-NEXT: pop {pc}
;
; LEAF-NOFP-LABEL: leaf:
; LEAF-NOFP: @ %bb.0:
Expand Down Expand Up @@ -74,9 +73,7 @@ define dso_local noundef i32 @non_leaf(i32 noundef %0) {
; FP-NEXT: bl leaf
; FP-NEXT: adds r0, r0, #1
; FP-NEXT: add sp, #8
; FP-NEXT: pop {r7}
; FP-NEXT: pop {r1}
; FP-NEXT: bx r1
; FP-NEXT: pop {r7, pc}
;
; FP-AAPCS-LABEL: non_leaf:
; FP-AAPCS: @ %bb.0:
Expand All @@ -95,8 +92,7 @@ define dso_local noundef i32 @non_leaf(i32 noundef %0) {
; FP-AAPCS-NEXT: add sp, #8
; FP-AAPCS-NEXT: pop {r1}
; FP-AAPCS-NEXT: mov r11, r1
; FP-AAPCS-NEXT: pop {r1}
; FP-AAPCS-NEXT: bx r1
; FP-AAPCS-NEXT: pop {pc}
;
; NOFP-LABEL: non_leaf:
; NOFP: @ %bb.0:
Expand All @@ -108,9 +104,7 @@ define dso_local noundef i32 @non_leaf(i32 noundef %0) {
; NOFP-NEXT: bl leaf
; NOFP-NEXT: adds r0, r0, #1
; NOFP-NEXT: add sp, #8
; NOFP-NEXT: pop {r7}
; NOFP-NEXT: pop {r1}
; NOFP-NEXT: bx r1
; NOFP-NEXT: pop {r7, pc}
;
; NOFP-AAPCS-LABEL: non_leaf:
; NOFP-AAPCS: @ %bb.0:
Expand All @@ -122,9 +116,7 @@ define dso_local noundef i32 @non_leaf(i32 noundef %0) {
; NOFP-AAPCS-NEXT: bl leaf
; NOFP-AAPCS-NEXT: adds r0, r0, #1
; NOFP-AAPCS-NEXT: add sp, #8
; NOFP-AAPCS-NEXT: pop {r7}
; NOFP-AAPCS-NEXT: pop {r1}
; NOFP-AAPCS-NEXT: bx r1
; NOFP-AAPCS-NEXT: pop {r7, pc}
%2 = alloca i32, align 4
store i32 %0, i32* %2, align 4
%3 = load i32, i32* %2, align 4
Expand Down Expand Up @@ -162,9 +154,7 @@ define dso_local void @required_fp(i32 %0, i32 %1) {
; FP-NEXT: subs r4, r7, #7
; FP-NEXT: subs r4, #1
; FP-NEXT: mov sp, r4
; FP-NEXT: pop {r4, r6, r7}
; FP-NEXT: pop {r0}
; FP-NEXT: bx r0
; FP-NEXT: pop {r4, r6, r7, pc}
;
; FP-AAPCS-LABEL: required_fp:
; FP-AAPCS: @ %bb.0:
Expand Down Expand Up @@ -201,8 +191,7 @@ define dso_local void @required_fp(i32 %0, i32 %1) {
; FP-AAPCS-NEXT: pop {r4, r6}
; FP-AAPCS-NEXT: pop {r0}
; FP-AAPCS-NEXT: mov r11, r0
; FP-AAPCS-NEXT: pop {r0}
; FP-AAPCS-NEXT: bx r0
; FP-AAPCS-NEXT: pop {pc}
;
; NOFP-LABEL: required_fp:
; NOFP: @ %bb.0:
Expand Down Expand Up @@ -231,9 +220,7 @@ define dso_local void @required_fp(i32 %0, i32 %1) {
; NOFP-NEXT: subs r4, r7, #7
; NOFP-NEXT: subs r4, #1
; NOFP-NEXT: mov sp, r4
; NOFP-NEXT: pop {r4, r6, r7}
; NOFP-NEXT: pop {r0}
; NOFP-NEXT: bx r0
; NOFP-NEXT: pop {r4, r6, r7, pc}
;
; NOFP-AAPCS-LABEL: required_fp:
; NOFP-AAPCS: @ %bb.0:
Expand Down Expand Up @@ -270,8 +257,7 @@ define dso_local void @required_fp(i32 %0, i32 %1) {
; NOFP-AAPCS-NEXT: pop {r4, r6}
; NOFP-AAPCS-NEXT: pop {r0}
; NOFP-AAPCS-NEXT: mov r11, r0
; NOFP-AAPCS-NEXT: pop {r0}
; NOFP-AAPCS-NEXT: bx r0
; NOFP-AAPCS-NEXT: pop {pc}
%3 = alloca i32, align 4
%4 = alloca i32, align 4
%5 = alloca i8*, align 8
Expand Down

0 comments on commit cbcce82

Please sign in to comment.