brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · f5b07ea Raw
25 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals2; RUN: opt -S -passes=rewrite-statepoints-for-gc < %s | FileCheck %s3; Ensure statepoints copy (valid) attributes from callsites.4 5declare void @f(ptr addrspace(1) %obj)6 7; copy over norecurse noimplicitfloat to statepoint call8define void @test1(ptr addrspace(1) %arg) gc "statepoint-example" {9; CHECK-LABEL: @test1(10; CHECK-NEXT:    [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void (ptr addrspace(1))) @f, i32 1, i32 0, ptr addrspace(1) [[ARG:%.*]], i32 0, i32 0) #[[ATTR1:[0-9]+]] [ "gc-live"(ptr addrspace(1) [[ARG]]) ]11; CHECK-NEXT:    [[ARG_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)12; CHECK-NEXT:    ret void13;14 15  call void @f(ptr addrspace(1) %arg) #116  ret void17}18 19 20attributes #1 = { norecurse noimplicitfloat }21;.22; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(none) }23; CHECK: attributes #[[ATTR1]] = { noimplicitfloat norecurse }24;.25