[llvm] [AMDGPU][True16][MC] 16bit vsrc and vdst support in MC (PR #104510)

Brox Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 06:33:03 PDT 2024


================
@@ -1242,12 +1244,19 @@ class FPInputMods <FPInputModsMatchClass matchClass> : InputMods <matchClass> {
 }
 
 def FP16InputMods : FPInputMods<FP16InputModsMatchClass>;
-def FPT16InputMods : FPInputMods<FPT16InputModsMatchClass>;
+class FPT16InputMods<bit IsFake16> : FPInputMods<FPT16InputModsMatchClass<IsFake16>> {
+  let EncoderMethod = "getMachineOpValueT16";
+}
 def FP32InputMods : FPInputMods<FP32InputModsMatchClass>;
+def FP32T16DstInputMods : FPInputMods<FP32InputModsMatchClass> {
+  let EncoderMethod = "getMachineOpValueT16";
+}
 def FP64InputMods : FPInputMods<FP64InputModsMatchClass>;
 
-class FP16VCSrcInputMods<bit IsFake16>
-  : FPInputMods<FP16VCSrcInputModsMatchClass<IsFake16>>;
+class FPT16VCSrcInputMods<bit IsFake16 = 1>
----------------
broxigarchen wrote:

Yes we don't really need to have a default value. But it does not harm anything though. Should I remove it?

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


More information about the llvm-commits mailing list