xref: /llvm-project/llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/frame-index-rv32.mir (revision ae3ba725b7902ec9058a07de0db49f17419c6daa)
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=riscv32 -run-pass=instruction-select %s -o - \
3# RUN: | FileCheck %s
4--- |
5  define ptr @frame_index() {
6  entry:
7    %x = alloca i32, align 4
8    ret ptr %x
9  }
10
11...
12---
13name:            frame_index
14legalized:       true
15regBankSelected: true
16registers:
17  - { id: 0, class: gprb, preferred-register: '' }
18stack:
19  - { id: 0, name: x, type: default, offset: 0, size: 4, alignment: 4,
20      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
21      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
22body:             |
23  bb.1.entry:
24    ; CHECK-LABEL: name: frame_index
25    ; CHECK: [[ADDI:%[0-9]+]]:gpr = ADDI %stack.0.x, 0
26    ; CHECK-NEXT: $x10 = COPY [[ADDI]]
27    ; CHECK-NEXT: PseudoRET implicit $x10
28    %0:gprb(p0) = G_FRAME_INDEX %stack.0.x
29    $x10 = COPY %0(p0)
30    PseudoRET implicit $x10
31
32...
33