1 # RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s
2 # This test ensures that the MIR parser parses the save and restore points in
3 # the machine frame info correctly.
7 define i32 @foo(i32 %a, i32 %b) {
9 %tmp = alloca i32, align 4
10 %tmp2 = icmp slt i32 %a, %b
11 br i1 %tmp2, label %true, label %false
14 store i32 %a, i32* %tmp, align 4
15 %tmp4 = call i32 @doSomething(i32 0, i32* %tmp)
19 %tmp.0 = phi i32 [ %tmp4, %true ], [ %a, %entry ]
23 declare i32 @doSomething(i32, i32*)
28 tracksRegLiveness: true
33 # CHECK: savePoint: '%bb.2'
34 # CHECK-NEXT: restorePoint: '%bb.2'
42 - { id: 0, name: tmp, offset: 0, size: 4, alignment: 4 }
45 successors: %bb.2, %bb.1
49 CMP32rr $eax, killed $esi, implicit-def $eflags
50 JCC_1 %bb.2, 12, implicit killed $eflags
62 MOV32mr %stack.0.tmp, 1, _, 0, _, killed $eax
63 ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eflags, implicit $rsp, implicit $ssp
64 $rsi = LEA64r %stack.0.tmp, 1, _, 0, _
65 $edi = MOV32r0 implicit-def dead $eflags
66 CALL64pcrel32 @doSomething, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit $rsi, implicit-def $rsp, implicit-def $ssp, implicit-def $eax
67 ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eflags, implicit $rsp, implicit $ssp