1; RUN: llc -mtriple=amdgcn-amd-amdhsa -global-isel -stop-after=irtranslator -o - %s | FileCheck %s 2 3; Make sure that an intrinsic declaration that has side effects, but 4; called with a readnone call site is translated to 5; G_INTRINSIC_W_SIDE_EFFECTS 6 7; CHECK-LABEL: name: getreg_callsite_attributes 8; CHECK: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.s.getreg) 9; CHECK: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.s.getreg) 10define amdgpu_kernel void @getreg_callsite_attributes() { 11 %reg0 = call i32 @llvm.amdgcn.s.getreg(i32 0) 12 store volatile i32 %reg0, i32 addrspace(1)* undef 13 %reg1 = call i32 @llvm.amdgcn.s.getreg(i32 0) #1 14 store volatile i32 %reg1, i32 addrspace(1)* undef 15 ret void 16} 17 18declare i32 @llvm.amdgcn.s.getreg(i32) #0 19 20attributes #0 = { nounwind readonly inaccessiblememonly } 21attributes #1 = { nounwind readnone } 22