[llvm] [AMDGPU][InstCombine] Fold unused m0 operand to poison for sendmsg intrinsics (PR #183755)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 06:37:55 PST 2026
================
@@ -2484,6 +2484,30 @@ uint64_t encodeMsg(uint64_t MsgId, uint64_t OpId, uint64_t StreamId) {
return MsgId | (OpId << OP_SHIFT_) | (StreamId << STREAM_ID_SHIFT_);
}
+bool msgDoesNotUseM0(int64_t MsgId) {
+ // Explicitly list message types that are known to not use m0.
+ // This is safer than excluding only GS_ALLOC_REQ, in case new message
+ // types are added in the future that do use m0.
+ switch (MsgId) {
+ case ID_INTERRUPT:
+ case ID_GS_PreGFX11:
+ case ID_GS_DONE_PreGFX11:
----------------
jayfoad wrote:
GS and GS_DONE use m0
https://github.com/llvm/llvm-project/pull/183755
More information about the llvm-commits
mailing list