48 lines · plain
1# RUN: llc -mtriple=x86_64 -run-pass none -o - %s | FileCheck %s2# This test ensures that the MIR parser parses the cfi offset operands3# correctly.4 5--- |6 7 declare void @foo(i32)8 9 define i32 @test(i32 %a, i32 %b, i32 %c, i32 %d) {10 entry:11 %add = add nsw i32 %b, %a12 %add1 = add nsw i32 %add, %c13 %add2 = add nsw i32 %add1, %d14 tail call void @foo(i32 %add2)15 %add6 = add nsw i32 %add2, %add216 ret i32 %add617 }18 19...20---21name: test22tracksRegLiveness: true23frameInfo:24 stackSize: 825 adjustsStack: true26 hasCalls: true27fixedStack:28 - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16 }29body: |30 bb.0.entry:31 liveins: $ecx, $edi, $edx, $esi, $rbx32 33 PUSH64r killed $rbx, implicit-def $rsp, implicit $rsp34 CFI_INSTRUCTION def_cfa_offset 1635 ; CHECK: CFI_INSTRUCTION offset $rbx, -1636 CFI_INSTRUCTION offset $rbx, -1637 $ebx = COPY $edi, implicit-def $rbx38 $ebx = ADD32rr $ebx, killed $esi, implicit-def dead $eflags39 $ebx = ADD32rr $ebx, killed $edx, implicit-def dead $eflags40 $ebx = ADD32rr $ebx, killed $ecx, implicit-def dead $eflags41 $edi = COPY $ebx42 CALL64pcrel32 @foo, csr_64, implicit $rsp, implicit $edi, implicit-def $rsp43 $eax = LEA64_32r killed $rbx, 1, $rbx, 0, _44 $rbx = POP64r implicit-def $rsp, implicit $rsp45 RET64 $eax46...47 48