brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 0eaf6b9 Raw
44 lines · plain
1# RUN: llc -mtriple=x86_64 -run-pass none -o - %s | FileCheck %s2# This test ensures that the MIR parser parses stack objects correctly.3 4--- |5 6  define i32 @test(i32 %a) #0 {7  entry:8    %b = alloca i329    %x = alloca i6410    store i32 %a, ptr %b11    store i64 2, ptr %x12    %c = load i32, ptr %b13    ret i32 %c14  }15 16  attributes #0 = { "frame-pointer"="none" }17 18...19---20name:            test21frameInfo:22  maxAlignment:    823# CHECK: stack:24# CHECK-NEXT: - { id: 0, name: b, type: default, offset: -12, size: 4, alignment: 4,25# CHECK-NEXT: stack-id: default, callee-saved-register: '', callee-saved-restored: true,26# CHECK-NEXT: debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }27# CHECK-NEXT: - { id: 1, name: x, type: default, offset: -24, size: 8, alignment: 8,28# CHECK-NEXT: stack-id: default, callee-saved-register: '', callee-saved-restored: true,29# CHECK-NEXT: debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }30# CHECK-NEXT: - { id: 2, name: '', type: spill-slot, offset: -32, size: 4, alignment: 4,31# CHECK-NEXT: stack-id: default, callee-saved-register: '', callee-saved-restored: true,32# CHECK-NEXT: debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }33stack:34  - { id: 0, name: b, offset: -12, size: 4, alignment: 4 }35  - { id: 1, name: x, offset: -24, size: 8, alignment: 8 }36  - { id: 2, type: spill-slot, offset: -32, size: 4, alignment: 4 }37body: |38  bb.0.entry:39    MOV32mr $rsp, 1, _, -4, _, $edi40    MOV64mi32 $rsp, 1, _, -16, _, 241    $eax = MOV32rm $rsp, 1, _, -4, _42    RET64 $eax43...44