xref: /llvm-project/llvm/test/CodeGen/AArch64/addg_subg.mir (revision c5d68ca1c82f35ed1d75a598d1862aeb10a905cb)
1# RUN: llc -mtriple=aarch64 -mattr=+mte -run-pass=prologepilog,aarch64-expand-pseudo %s -o - | FileCheck %s
2
3# CHECK: renamable $x8 = IRG $sp, $xzr
4
5# CHECK: renamable $x0 = ADDG $x8, 0, 0
6# CHECK: renamable $x0 = ADDG $x8, 5, 0
7# CHECK: renamable $x0 = ADDG $x8, 63, 0
8# CHECK: $[[R:x[0-9]+]] = ADDXri $x8, 16, 0
9# CHECK: renamable $x0 = ADDG killed $[[R]], 63, 0
10
11# CHECK: renamable $x0 = SUBG $x8, 5, 0
12# CHECK: renamable $x0 = SUBG $x8, 63, 0
13# CHECK: $[[R:x[0-9]+]] = SUBXri $x8, 16, 0
14# CHECK: renamable $x0 = SUBG killed $[[R]], 63, 0
15
16---
17name: subg
18stack:
19  - { id: 0, type: default, offset: 0, size: 16, alignment: 16,
20      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
21      local-offset: -16, debug-info-variable: '', debug-info-expression: '',
22      debug-info-location: '' }
23body:             |
24  bb.0.entry:
25    renamable $x8 = IRGstack $sp, $xzr
26
27    renamable $x0 = TAGPstack %stack.0, 0, killed renamable $x8, 0
28    renamable $x0 = TAGPstack %stack.0, 5, killed renamable $x8, 0
29    renamable $x0 = TAGPstack %stack.0, 63, killed renamable $x8, 0
30    renamable $x0 = TAGPstack %stack.0, 64, killed renamable $x8, 0
31
32    renamable $x0 = TAGPstack %stack.0, -5, killed renamable $x8, 0
33    renamable $x0 = TAGPstack %stack.0, -63, killed renamable $x8, 0
34    renamable $x0 = TAGPstack %stack.0, -64, killed renamable $x8, 0
35    RET_ReallyLR
36
37...
38