llvm-project/llvm/test/CodeGen/Hexagon/cext-opt-stack-no-rr.mir
Matt Arsenault fae05692a3 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

36 lines
1.1 KiB
YAML

# RUN: llc -march=hexagon -run-pass hexagon-cext-opt -hexagon-cext-threshold=1 -o - %s | FileCheck %s
# Make sure that the stores to the stack slot are not converted into rr forms.
# CHECK: %[[REG:[0-9]+]]:intregs = PS_fi %stack.0, 267
# CHECK: S2_pstorerbt_io %{{[0-9]+}}, %[[REG]], 0
# CHECK: S2_pstorerbt_io %{{[0-9]+}}, %[[REG]], 0
---
name: fred
stack:
- { id: 0, type: default, size: 272, alignment: 4 }
body: |
bb.0:
successors: %bb.1, %bb.2
%0:intregs = IMPLICIT_DEF
%1:intregs = L2_loadrub_io killed %0:intregs, 0 :: (load (s8) from `i8* undef`, align 2)
%2:predregs = C2_cmpeqi %1:intregs, 5
%3:intregs = A2_tfrsi 0
S2_pstorerbt_io %2:predregs, %stack.0, 267, killed %3:intregs :: (store (s8) into %stack.0)
J2_jumpt %2:predregs, %bb.2, implicit-def $pc
bb.1:
successors: %bb.2
%4:predregs = C2_cmpeqi %1:intregs, 6
%5:intregs = A2_tfrsi 2
S2_pstorerbt_io %4:predregs, %stack.0, 267, killed %5:intregs :: (store (s8) into %stack.0)
bb.2:
%6:intregs = A2_tfrsi 32968
S2_storerh_io %stack.0, 0, killed %6:intregs :: (store (s16) into %stack.0, align 4)
PS_jmpret $r31, implicit-def dead $pc
...