1 # RUN: llc -o - %s -run-pass fixup-statepoint-caller-saved -verify-machineinstrs | FileCheck %s
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
5 target triple = "x86_64-pc-linux-gnu"
9 define i8 addrspace(1)* @test_cp(i64 %a, i64 %b, i64 %c, i8 addrspace(1)* %p) gc "statepoint-example" {
10 ret i8 addrspace(1)* undef
16 tracksRegLiveness: true
18 - { reg: '$rdi', virtual-reg: '' }
22 liveins: $rax, $rdi, $rbp
24 ; CHECK: renamable $rdi = COPY renamable $rax
25 ; CHECK: MOV64mr %stack.1, 1, $noreg, 0, $noreg, killed $rax :: (store (s64) into %stack.1)
26 ; CHECK: renamable $rax = MOV64rm renamable $rdi, 1, $noreg, 16, $noreg
27 ; CHECK: MOV64mr %stack.0, 1, $noreg, 0, $noreg, killed $rax :: (store (s64) into %stack.0)
28 ; CHECK: STATEPOINT 0, 0, 0, @foo, 2, 0, 2, 0, 2, 1, 1, 8, %stack.0, 0, 2, 1, 1, 8, %stack.1, 0, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp :: (load (s64) from %stack.0), (load store (s64) on %stack.1)
29 renamable $rdi = COPY killed renamable $rax
30 renamable $rax = MOV64rm renamable $rdi, 1, $noreg, 16, $noreg
31 renamable $rdi = STATEPOINT 0, 0, 0, @foo, 2, 0, 2, 0, 2, 1, renamable $rax, 2, 1, killed renamable $rdi(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
32 $rax = COPY killed renamable $rdi