32 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 52; RUN: opt -S -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx90a -passes=amdgpu-attributor %s | FileCheck %s3 4; Make sure we do not infer anything about implicit inputs through an5; intrinsic call which is not nocallback.6 7declare zeroext i32 @return_i32()8 9define i32 @test_i32_return() gc "statepoint-example" {10; CHECK-LABEL: define i32 @test_i32_return(11; CHECK-SAME: ) #[[ATTR0:[0-9]+]] gc "statepoint-example" {12; CHECK-NEXT: [[ENTRY:.*:]]13; CHECK-NEXT: [[SAFEPOINT_TOKEN:%.*]] = tail call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(i32 ()) @return_i32, i32 0, i32 0, i32 0, i32 0)14; CHECK-NEXT: [[CALL1:%.*]] = call zeroext i32 @llvm.experimental.gc.result.i32(token [[SAFEPOINT_TOKEN]])15; CHECK-NEXT: ret i32 [[CALL1]]16;17entry:18 %safepoint_token = tail call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(i32 ()) @return_i32, i32 0, i32 0, i32 0, i32 0)19 %call1 = call zeroext i32 @llvm.experimental.gc.result.i32(token %safepoint_token)20 ret i32 %call121}22 23declare token @llvm.experimental.gc.statepoint.p0(i64 immarg, i32 immarg, ptr, i32 immarg, i32 immarg, ...)24declare i32 @llvm.experimental.gc.result.i32(token) #025 26attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }27;.28; CHECK: attributes #[[ATTR0]] = { "target-cpu"="gfx90a" "uniform-work-group-size"="false" }29; CHECK: attributes #[[ATTR1:[0-9]+]] = { "target-cpu"="gfx90a" }30; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(none) "target-cpu"="gfx90a" }31;.32