88 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -o - %s -fixup-allow-gcptr-in-csr=false -run-pass fixup-statepoint-caller-saved | FileCheck %s3# RUN: llc -o - %s -fixup-allow-gcptr-in-csr=false -passes='fixup-statepoint-caller-saved' | FileCheck %s4--- |5 ; ModuleID = 'test/CodeGen/X86/statepoint-fixup-call.ll'6 source_filename = "test/CodeGen/X86/statepoint-fixup-call.ll"7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"8 target triple = "x86_64-pc-linux-gnu"9 10 declare void @foo()11 12 define ptr addrspace(1) @test_one(ptr addrspace(1) %p) gc "statepoint-example" {13 entry:14 %token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) %p) ]15 %p2 = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %token, i32 0, i32 0) ; (%p, %p)16 ret ptr addrspace(1) %p217 }18 19 declare token @llvm.experimental.gc.statepoint.p0(i64 immarg, i32 immarg, ptr, i32 immarg, i32 immarg, ...)20 21 ; Function Attrs: nounwind readonly22 declare ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token, i32 immarg, i32 immarg) #023 24 ; Function Attrs: nounwind25 declare void @llvm.stackprotector(ptr, ptr) #126 27 attributes #0 = { nounwind readonly }28 attributes #1 = { nounwind }29 30...31---32name: test_one33alignment: 1634exposesReturnsTwice: false35legalized: false36regBankSelected: false37selected: false38failedISel: false39tracksRegLiveness: true40hasWinCFI: false41registers: []42liveins:43 - { reg: '$rdi', virtual-reg: '' }44frameInfo:45 isFrameAddressTaken: false46 isReturnAddressTaken: false47 hasStackMap: false48 hasPatchPoint: false49 stackSize: 050 offsetAdjustment: 051 maxAlignment: 152 adjustsStack: false53 hasCalls: true54 stackProtector: ''55 maxCallFrameSize: 429496729556 cvBytesOfCalleeSavedRegisters: 057 hasOpaqueSPAdjustment: false58 hasVAStart: false59 hasMustTailInVarArgFunc: false60 localFrameSize: 061 savePoint: []62 restorePoint: []63fixedStack: []64stack: []65callSites: []66constants: []67machineFunctionInfo: {}68body: |69 bb.0.entry:70 liveins: $rdi71 72 ; CHECK-LABEL: name: test_one73 ; CHECK: liveins: $rdi74 ; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp75 ; CHECK: MOV64mr %stack.0, 1, $noreg, 0, $noreg, killed $rdi :: (store (s64) into %stack.0)76 ; CHECK: STATEPOINT 0, 0, 0, @foo, 2, 0, 2, 0, 2, 0, 2, 1, 1, 8, %stack.0, 0, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp :: (load store (s64) on %stack.0)77 ; CHECK: $rdi = MOV64rm %stack.0, 1, $noreg, 0, $noreg :: (load (s64) from %stack.0)78 ; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp79 ; CHECK: $rax = COPY killed renamable $rdi80 ; CHECK: RET 0, killed $rax81 ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp82 renamable $rdi = STATEPOINT 0, 0, 0, @foo, 2, 0, 2, 0, 2, 0, 2, 1, killed renamable $rdi(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp83 ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp84 $rax = COPY killed renamable $rdi85 RET 0, killed $rax86 87...88