1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/CodeGen/ARM/machine-outliner-stack-use.mir
Yvan Roux 53e36ecab0 [ARM][MachineOutliner] Fix costs model.
Fix candidates calls costs models allocation and prepare stack fixups
handling.

Differential Revision: https://reviews.llvm.org/D92933
2020-12-17 16:08:23 +01:00

59 lines
1.9 KiB
YAML

# RUN: llc -mtriple=arm-- -run-pass=machine-outliner -verify-machineinstrs \
# RUN: %s -o - | FileCheck %s
--- |
define void @stack_use_no_lr_save_1() #0 { ret void }
define void @stack_use_no_lr_save_2() #0 { ret void }
attributes #0 = { minsize optsize }
...
---
name: stack_use_no_lr_save_1
tracksRegLiveness: true
body: |
bb.0:
; CHECK-LABEL: name: stack_use_no_lr_save_1
; CHECK: BL @OUTLINED_FUNCTION_0
$r0 = MOVi 1, 14, $noreg, $noreg
$r0 = MOVi 1, 14, $noreg, $noreg
$r0 = LDRi12 $sp, 0, 14, $noreg
$r0 = LDRi12 $sp, 0, 14, $noreg
$r0 = LDRi12 $sp, 0, 14, $noreg
$r0 = MOVi 1, 14, $noreg, $noreg
$r0 = LDRi12 $sp, 0, 14, $noreg
$r0 = MOVi 1, 14, $noreg, $noreg
bb.1:
liveins: $r0, $r1, $r2, $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11
BX_RET 14, $noreg
...
---
name: stack_use_no_lr_save_2
tracksRegLiveness: true
body: |
bb.0:
; CHECK-LABEL: name: stack_use_no_lr_save_2
; CHECK: BL @OUTLINED_FUNCTION_0
$r0 = MOVi 1, 14, $noreg, $noreg
$r0 = MOVi 1, 14, $noreg, $noreg
$r0 = LDRi12 $sp, 0, 14, $noreg
$r0 = LDRi12 $sp, 0, 14, $noreg
$r0 = LDRi12 $sp, 0, 14, $noreg
$r0 = MOVi 1, 14, $noreg, $noreg
$r0 = LDRi12 $sp, 0, 14, $noreg
$r0 = MOVi 1, 14, $noreg, $noreg
bb.1:
BX_RET 14, $noreg
;CHECK: name: OUTLINED_FUNCTION_0
;CHECK: $r0 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
;CHECK-NEXT: $r0 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
;CHECK-NEXT: $r0 = LDRi12 $sp, 0, 14 /* CC::al */, $noreg
;CHECK-NEXT: $r0 = LDRi12 $sp, 0, 14 /* CC::al */, $noreg
;CHECK-NEXT: $r0 = LDRi12 $sp, 0, 14 /* CC::al */, $noreg
;CHECK-NEXT: $r0 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
;CHECK-NEXT: $r0 = LDRi12 $sp, 0, 14 /* CC::al */, $noreg
;CHECK-NEXT: $r0 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
;CHECK-NEXT: MOVPCLR 14 /* CC::al */, $noreg