1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/CodeGen/Mips/micromips-short-delay-slot.mir
Matt Arsenault cc12b285b6 CodeGen: Print/parse LLTs in MachineMemOperands
This will currently accept the old number of bytes syntax, and convert
it to a scalar. This should be removed in the near future (I think I
converted all of the tests already, but likely missed a few).

Not sure what the exact syntax and policy should be. We can continue
printing the number of bytes for non-generic instructions to avoid
test churn and only allow non-scalar types for generic instructions.

This will currently print the LLT in parentheses, but accept parsing
the existing integers and implicitly converting to scalar. The
parentheses are a bit ugly, but the parser logic seems unable to deal
without either parentheses or some keyword to indicate the start of a
type.
2021-06-30 16:54:13 -04:00

72 lines
1.9 KiB
YAML

# RUN: llc -march=mips -mcpu=mips32r2 -mattr=+micromips %s -o - \
# RUN: -start-after=block-placement | FileCheck %s
# Test that the micromips jal instruction is correctly handled by the delay slot
# filler by converting it to a short delay slot for the li instruction.
# CHECK-LABEL: caller13
# CHECK: jals callee13
# CHECK-NEXT: li16
--- |
declare i32 @callee13(i32, i32)
define i32 @caller13() {
entry:
%call = tail call i32 (i32, i32) @callee13(i32 1, i32 2)
ret i32 %call
}
...
---
name: caller13
alignment: 4
exposesReturnsTwice: false
legalized: false
regBankSelected: false
selected: false
tracksRegLiveness: true
registers:
liveins:
frameInfo:
isFrameAddressTaken: false
isReturnAddressTaken: false
hasStackMap: false
hasPatchPoint: false
stackSize: 24
offsetAdjustment: 0
maxAlignment: 4
adjustsStack: true
hasCalls: true
stackProtector: ''
maxCallFrameSize: 16
hasOpaqueSPAdjustment: false
hasVAStart: false
hasMustTailInVarArgFunc: false
savePoint: ''
restorePoint: ''
fixedStack:
stack:
- { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '$ra', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
constants:
body: |
bb.0.entry:
liveins: $ra
$sp = ADDiu $sp, -24
CFI_INSTRUCTION def_cfa_offset 24
SW killed $ra, $sp, 20 :: (store (s32) into %stack.0)
CFI_INSTRUCTION offset $ra_64, -4
$a0 = LI16_MM 1
$a1 = LI16_MM 2
JAL_MM @callee13, csr_o32, implicit-def dead $ra, implicit killed $a0, implicit killed $a1, implicit-def $sp, implicit-def $v0
$ra = LW $sp, 20 :: (load (s32) from %stack.0)
$sp = ADDiu $sp, 24
PseudoReturn undef $ra, implicit $v0
...