xref: /llvm-project/llvm/test/CodeGen/Hexagon/cext-opt-stack-no-rr.mir (revision 2208c97c1bec2512d4e47b6223db6d95a7037956)
1# RUN: llc -mtriple=hexagon -run-pass hexagon-cext-opt -hexagon-cext-threshold=1 -o - %s | FileCheck %s
2
3# Make sure that the stores to the stack slot are not converted into rr forms.
4# CHECK: %[[REG:[0-9]+]]:intregs = PS_fi %stack.0, 267
5# CHECK: S2_pstorerbt_io %{{[0-9]+}}, %[[REG]], 0
6# CHECK: S2_pstorerbt_io %{{[0-9]+}}, %[[REG]], 0
7
8---
9name: fred
10stack:
11  - { id: 0, type: default, size: 272, alignment: 4 }
12body: |
13  bb.0:
14    successors: %bb.1, %bb.2
15
16    %0:intregs = IMPLICIT_DEF
17    %1:intregs = L2_loadrub_io killed %0:intregs, 0 :: (load (s8) from `ptr undef`, align 2)
18    %2:predregs = C2_cmpeqi %1:intregs, 5
19    %3:intregs = A2_tfrsi 0
20    S2_pstorerbt_io %2:predregs, %stack.0, 267, killed %3:intregs :: (store (s8) into %stack.0)
21    J2_jumpt %2:predregs, %bb.2, implicit-def $pc
22
23  bb.1:
24    successors: %bb.2
25
26    %4:predregs = C2_cmpeqi %1:intregs, 6
27    %5:intregs = A2_tfrsi 2
28    S2_pstorerbt_io %4:predregs, %stack.0, 267, killed %5:intregs :: (store (s8) into %stack.0)
29
30  bb.2:
31    %6:intregs = A2_tfrsi 32968
32    S2_storerh_io %stack.0, 0, killed %6:intregs :: (store (s16) into %stack.0, align 4)
33    PS_jmpret $r31, implicit-def dead $pc
34...
35
36