1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=x86 -run-pass none -o - %s | FileCheck %s 3# This test ensures that the MIR parser parses stack object machine operands 4# correctly. 5 6--- | 7 8 define i32 @test(i32 %a) { 9 entry: 10 %b = alloca i32 11 %0 = alloca i32 12 store i32 %a, i32* %b 13 store i32 2, i32* %0 14 %c = load i32, i32* %b 15 ret i32 %c 16 } 17 18... 19--- 20name: test 21tracksRegLiveness: true 22registers: 23 - { id: 0, class: gr32 } 24 - { id: 1, class: gr32 } 25frameInfo: 26 maxAlignment: 4 27fixedStack: 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: test 35 ; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm %fixed-stack.0, 1, $noreg, 0, $noreg 36 ; CHECK: MOV32mr %stack.0.b, 1, $noreg, 0, $noreg, [[MOV32rm]] 37 ; CHECK: MOV32mi %stack.1, 1, $noreg, 0, $noreg, 2 38 ; CHECK: [[MOV32rm1:%[0-9]+]]:gr32 = MOV32rm %stack.0.b, 1, $noreg, 0, $noreg 39 ; CHECK: $eax = COPY [[MOV32rm1]] 40 ; CHECK: RETL $eax 41 %0 = MOV32rm %fixed-stack.0, 1, _, 0, _ 42 MOV32mr %stack.0.b, 1, _, 0, _, %0 43 MOV32mi %stack.1, 1, _, 0, _, 2 44 %1 = MOV32rm %stack.0, 1, _, 0, _ 45 $eax = COPY %1 46 RETL $eax 47... 48