diff --git a/llvm/include/llvm/IR/IntrinsicsAMDGPU.td b/llvm/include/llvm/IR/IntrinsicsAMDGPU.td --- a/llvm/include/llvm/IR/IntrinsicsAMDGPU.td +++ b/llvm/include/llvm/IR/IntrinsicsAMDGPU.td @@ -1860,7 +1860,7 @@ def int_amdgcn_s_get_waveid_in_workgroup : GCCBuiltin<"__builtin_amdgcn_s_get_waveid_in_workgroup">, Intrinsic<[llvm_i32_ty], [], - [IntrReadMem, IntrInaccessibleMemOnly, IntrWillReturn]>; + [IntrNoMem, IntrHasSideEffects, IntrWillReturn]>; class AMDGPUGlobalAtomicRtn : Intrinsic < [vt], diff --git a/llvm/lib/Target/AMDGPU/SMInstructions.td b/llvm/lib/Target/AMDGPU/SMInstructions.td --- a/llvm/lib/Target/AMDGPU/SMInstructions.td +++ b/llvm/lib/Target/AMDGPU/SMInstructions.td @@ -235,7 +235,7 @@ " $sdst", [(set i32:$sdst, (node))]> { let hasSideEffects = 1; let mayStore = 0; - let mayLoad = 1; + let mayLoad = 0; let has_sbase = 0; }