1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -run-pass=instruction-select %s -o - \
5 define ptr @frame_index() {
7 %x = alloca i32, align 4
17 - { id: 0, class: gprb, preferred-register: '' }
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: '' }
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
30 PseudoRET implicit $x10