[llvm] [AMDGPU] MCExpr-ify MC layer kernel descriptor (PR #80855)

Janek van Oirschot via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 13:39:06 PDT 2024


================
@@ -39,12 +39,12 @@
 // OBJDUMP-NEXT: 0080 00000000 00000000 00000000 00000000
 // OBJDUMP-NEXT: 0090 00000000 00000000 00000000 00000000
 // OBJDUMP-NEXT: 00a0 00000000 00000000 00000000 00000000
-// OBJDUMP-NEXT: 00b0 00000060 80000000 00000000 00000000
+// OBJDUMP-NEXT: 00b0 00000060 80000000 00040000 00000000
----------------
JanekvO wrote:

This change is caused by the unintentional bug fix in this patch: the `AMDHSA_BITS_SET` macro is not encapsulated so expressions put into said macro may deviated from its intention: https://github.com/llvm/llvm-project/blob/e74bcecd36a59a9271c7d4133e73448a3def74c1/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp#L1242-L1244

In the aforementioned case this means that the expansion will always result in 0. Now that the bits are set through MCExprs this expansion will be correct and means that, in this test case, the bit is now appropriately set.

https://github.com/llvm/llvm-project/pull/80855


More information about the llvm-commits mailing list