brintos

brintos / llvm-project-archived public Read only

0
0
Text · 930 B · 853e3c3 Raw
20 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=rewrite-statepoints-for-gc < %s | FileCheck %s3 4target triple = "x86_64-unknown-linux-gnu"5target datalayout = "e-ni:1:6"6 7declare void @foo()8 9define ptr addrspace(1) @test(i64 %i) gc "statepoint-example" {10; CHECK-LABEL: @test(11; CHECK-NEXT:    [[P:%.*]] = inttoptr i64 [[I:%.*]] to ptr addrspace(1)12; CHECK-NEXT:    [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[P]]) ]13; CHECK-NEXT:    [[P_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)14; CHECK-NEXT:    ret ptr addrspace(1) [[P_RELOCATED]]15;16  %p = inttoptr i64 %i to ptr addrspace(1)17  call void @foo()18  ret ptr addrspace(1) %p19}20