[PATCH] D138661: [AMDGPU][MC] Correct handling of mandatory literals

Changpeng Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 16:30:08 PST 2023


cfang added inline comments.
Herald added a subscriber: StephenFan.


================
Comment at: llvm/lib/Target/AMDGPU/SIDefines.h:207
+  OPERAND_KIMM_FIRST = OPERAND_KIMM32,
+  OPERAND_KIMM_LAST = OPERAND_KIMM16,
+
----------------
These two definitions caused an issue. it makes OPERAND_INPUT_MODS = OPERAND_KIMM16 + 1,  which is actually
OPERAND_REG_INLINE_AC_INT16 ( next enumerator). As a result, two unrelated enumerators have the same value.

I create a patch to address the issue -- we can put uninitialized enumerators together.
https://reviews.llvm.org/D141643


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138661/new/

https://reviews.llvm.org/D138661



More information about the llvm-commits mailing list