1# RUN: llc -march=x86 -start-after machine-sink -stop-after machine-sink -o - %s | FileCheck %s 2# This test ensures that the MIR parser parses stack object machine operands 3# correctly. 4 5--- | 6 7 define i32 @test(i32 %a) { 8 entry: 9 %b = alloca i32 10 %0 = alloca i32 11 store i32 %a, i32* %b 12 store i32 2, i32* %0 13 %c = load i32, i32* %b 14 ret i32 %c 15 } 16 17... 18--- 19name: test 20isSSA: true 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 ; CHECK: bb.0.entry: 34 ; CHECK-NEXT: %0 = MOV32rm %fixed-stack.0, 1, _, 0, _ 35 ; CHECK-NEXT: MOV32mr %stack.0.b, 1, _, 0, _, %0 36 ; CHECK-NEXT: MOV32mi %stack.1, 1, _, 0, _, 2 37 ; CHECK-NEXT: %1 = MOV32rm %stack.0.b, 1, _, 0, _ 38 bb.0.entry: 39 %0 = MOV32rm %fixed-stack.0, 1, _, 0, _ 40 MOV32mr %stack.0.b, 1, _, 0, _, %0 41 MOV32mi %stack.1, 1, _, 0, _, 2 42 %1 = MOV32rm %stack.0, 1, _, 0, _ 43 %eax = COPY %1 44 RETL %eax 45... 46