brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 6e27bc0 Raw
45 lines · plain
1# RUN: llc -mtriple=x86_64 -run-pass none -o - %s | FileCheck %s2# This test ensures that the MIR parser parses variable sized stack objects3# correctly.4 5--- |6 7  define i32 @test(i32 %a) {8  entry:9    %b = alloca i3210    %x = alloca i6411    %y = alloca i32, i32 %a12    store i32 %a, ptr %b13    store i64 2, ptr %x14    %c = load i32, ptr %b15    ret i32 %c16  }17 18...19---20name:            test21frameInfo:22  stackSize:       2423  offsetAdjustment: -1624  maxAlignment:    825  adjustsStack:    true26# CHECK: stack:27# CHECK-NEXT: - { id: 0, name: '', type: default, offset: -20, size: 4, alignment: 4,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: 1, name: '', type: default, offset: -32, size: 8, alignment: 8,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: '' }33# CHECK-NEXT: - { id: 2, name: y, type: variable-sized, offset: -32, alignment: 1,34stack:35  - { id: 0, offset: -20, size: 4, alignment: 4 }36  - { id: 1, offset: -32, size: 8, alignment: 8 }37  - { id: 2, name: y, type: variable-sized, offset: -32, alignment: 1 }38body: |39  bb.0.entry:40    MOV32mr $rsp, 1, _, -4, _, $edi41    MOV64mi32 $rsp, 1, _, -16, _, 242    $eax = MOV32rm $rsp, 1, _, -4, _43    RET64 $eax44...45