48 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=i686 -run-pass none -o - %s | FileCheck %s3# This test ensures that the MIR parser parses stack object machine operands4# correctly.5 6--- |7 8 define i32 @test(i32 %a) {9 entry:10 %b = alloca i3211 %0 = alloca i3212 store i32 %a, ptr %b13 store i32 2, ptr %014 %c = load i32, ptr %b15 ret i32 %c16 }17 18...19---20name: test21tracksRegLiveness: true22registers:23 - { id: 0, class: gr32 }24 - { id: 1, class: gr32 }25frameInfo:26 maxAlignment: 427fixedStack:28 - { id: 0, offset: 0, size: 4, isImmutable: true, isAliased: false }29stack:30 - { id: 0, name: b, size: 4, alignment: 4 }31 - { id: 1, size: 4, alignment: 4 }32body: |33 bb.0.entry:34 ; CHECK-LABEL: name: test35 ; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm %fixed-stack.0, 1, $noreg, 0, $noreg36 ; CHECK: MOV32mr %stack.0.b, 1, $noreg, 0, $noreg, [[MOV32rm]]37 ; CHECK: MOV32mi %stack.1, 1, $noreg, 0, $noreg, 238 ; CHECK: [[MOV32rm1:%[0-9]+]]:gr32 = MOV32rm %stack.0.b, 1, $noreg, 0, $noreg39 ; CHECK: $eax = COPY [[MOV32rm1]]40 ; CHECK: RET32 $eax41 %0 = MOV32rm %fixed-stack.0, 1, _, 0, _42 MOV32mr %stack.0.b, 1, _, 0, _, %043 MOV32mi %stack.1, 1, _, 0, _, 244 %1 = MOV32rm %stack.0, 1, _, 0, _45 $eax = COPY %146 RET32 $eax47...48