[llvm] [TableGen] Added submulticlass typechecking to template arg values. (PR #112904)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 18 08:09:22 PDT 2024
================
@@ -37,7 +37,7 @@ defvar VOPDX_Max_Index = 12;
class VOPD_Component<bits<5> OpIn, string vOPDName> {
Instruction BaseVOP = !cast<Instruction>(NAME);
- string VOPDName = "v_dual_" # !substr(vOPDName, 2);
+ string VOPDName = "v_dual_" # !if(!le(!size(vOPDName), 2), "", !substr(vOPDName, 2));
----------------
jofrn wrote:
It is in the dynamic nature of TableGen. Typechecking resolves fields when it needs to do so. Adding CheckTemplateArgValues to this location mirrors the location it is at within `ParseSubClassReference`, so fields are also resolved when parsing non-multi sub classes.
https://github.com/llvm/llvm-project/pull/112904
More information about the llvm-commits
mailing list