llvm/llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-frame-index-rv32.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - \
# RUN: | FileCheck %s
--- |

  define ptr @alloca32() {
  entry:
    %ptr0 = alloca i32, align 4
    ret ptr %ptr0
  }

...
---
name:            alloca32
stack:
  - { id: 0, name: ptr0, type: default, offset: 0, size: 4, alignment: 4,
      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
body:             |
  bb.1.entry:
    ; CHECK-LABEL: name: alloca32
    ; CHECK: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %stack.0.ptr0
    ; CHECK-NEXT: $x10 = COPY [[FRAME_INDEX]](p0)
    ; CHECK-NEXT: PseudoRET implicit $x10
    %0:_(p0) = G_FRAME_INDEX %stack.0.ptr0
    $x10 = COPY %0(p0)
    PseudoRET implicit $x10

...