Skip to content

[RISC-V][MC] Support RVY AUIPC instruction - #177074

Draft
arichardson wants to merge 1 commit into
users/arichardson/spr/main.risc-vmc-support-rvy-auipc-instructionfrom
users/arichardson/spr/risc-vmc-support-rvy-auipc-instruction
Draft

arichardson wants to merge 1 commit into
users/arichardson/spr/main.risc-vmc-support-rvy-auipc-instructionfrom
users/arichardson/spr/risc-vmc-support-rvy-auipc-instruction

Conversation

@arichardson

Copy link
Copy Markdown
Member

For RVY, the AUIPC instruction is mode-dependent, writing back a full
capability (X*_Y) register in capability mode and a plain X register
otherwise. This introduces the NullReg RegisterByHwMode to support the
lpad InstAlias that uses a fixed register and therefore we have to use a
register that varies by HwMode in the pattern.

This was made possible by the previous commits that introduced
RegisterByHwMode. An alternative would have been to try to support static
resolution of the RegClassByHwMode based on the predicates, but that
requires duplicating all InstAliases, which would be fine in the single
case here, but we also need this for JALR with lots of InstAliases.

Created using spr 1.3.8-beta.1
@arichardson

arichardson commented Jan 21, 2026 •

Copy link
Copy Markdown
Member Author

@llvmbot

llvmbot commented Jan 21, 2026

Copy link
Copy Markdown
Member

@llvm/pr-subscribers-backend-risc-v

Author: Alexander Richardson (arichardson)

Changes

For RVY, the AUIPC instruction is mode-dependent, writing back a full
capability (X*_Y) register in capability mode and a plain X register
otherwise. This introduces the NullReg RegisterByHwMode to support the
lpad InstAlias that uses a fixed register and therefore we have to use a
register that varies by HwMode in the pattern.

This was made possible by the previous commits that introduced
RegisterByHwMode. An alternative would have been to try to support static
resolution of the RegClassByHwMode based on the predicates, but that
requires duplicating all InstAliases, which would be fine in the single
case here, but we also need this for JALR with lots of InstAliases.


Patch is 21.19 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/177074.diff

4 Files Affected:

  • (modified) llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp (+20-8)
  • (modified) llvm/lib/Target/RISCV/RISCVInstrInfo.td (+8-15)
  • (modified) llvm/lib/Target/RISCV/RISCVRegisterInfo.td (+22-4)
  • (added) llvm/test/MC/RISCV/rvy/rvy-auipc.s (+194)
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index 556c78dcc5617..8c87587220b2c 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -84,6 +84,17 @@ class RISCVAsmParser : public MCTargetAsmParser {
   SMLoc getLoc() const { return getParser().getTok().getLoc(); }
   bool isRV64() const { return getSTI().hasFeature(RISCV::Feature64Bit); }
   bool isRVE() const { return getSTI().hasFeature(RISCV::FeatureStdExtE); }
+  /// \return When true, pointers should use YGPR instead of GPR
+  bool isCapMode() const { return getSTI().hasFeature(RISCV::FeatureCapMode); }
+  unsigned getPtrAddiOpcode() const {
+    return isCapMode() ? RISCV::ADDIY : RISCV::ADDI;
+  }
+  unsigned getPtrLoadOpcode() const {
+    if (isCapMode())
+      return RISCV::LY;
+    return isRV64() ? RISCV::LD : RISCV::LW;
+  }
+
   bool enableExperimentalExtension() const {
     return getSTI().hasFeature(RISCV::Experimental);
   }
@@ -1372,11 +1383,13 @@ unsigned RISCVAsmParser::validateTargetOperandClass(MCParsedAsmOperand &AsmOp,
       RISCVMCRegisterClasses[RISCV::FPR64CRegClassID].contains(Reg);
   bool IsRegVR = RISCVMCRegisterClasses[RISCV::VRRegClassID].contains(Reg);
 
-  // In RVY mode, the BasePtrRC register class should select capability
+  // In RVY mode, the various Ptr register class should select capability
   // registers for the base pointer operands, otherwise we use GPRs.
   // TODO: Is there any way we could do this in tablegen automatically?
-  if (Kind == MCK_RegByHwMode_BasePtrRC)
-    Kind = STI->hasFeature(RISCV::FeatureCapMode) ? MCK_YGPRNoX0 : MCK_GPR;
+  if (Kind == MCK_RegByHwMode_PtrReg)
+    Kind = isCapMode() ? MCK_YGPR : MCK_GPR;
+  else if (Kind == MCK_RegByHwMode_BasePtrRC)
+    Kind = isCapMode() ? MCK_YGPRNoX0 : MCK_GPR;
 
   if (Op.isGPR() && (Kind == MCK_YGPR || Kind == MCK_YGPRNoX0)) {
     // GPR and capability GPR use the same register names, convert if required.
@@ -3601,7 +3614,7 @@ void RISCVAsmParser::emitLoadLocalAddress(MCInst &Inst, SMLoc IDLoc,
   MCRegister DestReg = Inst.getOperand(0).getReg();
   const MCExpr *Symbol = Inst.getOperand(1).getExpr();
   emitAuipcInstPair(DestReg, DestReg, Symbol, ELF::R_RISCV_PCREL_HI20,
-                    RISCV::ADDI, IDLoc, Out);
+                    getPtrAddiOpcode(), IDLoc, Out);
 }
 
 void RISCVAsmParser::emitLoadGlobalAddress(MCInst &Inst, SMLoc IDLoc,
@@ -3614,7 +3627,7 @@ void RISCVAsmParser::emitLoadGlobalAddress(MCInst &Inst, SMLoc IDLoc,
   //             Lx rdest, %pcrel_lo(TmpLabel)(rdest)
   MCRegister DestReg = Inst.getOperand(0).getReg();
   const MCExpr *Symbol = Inst.getOperand(1).getExpr();
-  unsigned SecondOpcode = isRV64() ? RISCV::LD : RISCV::LW;
+  unsigned SecondOpcode = getPtrLoadOpcode();
   emitAuipcInstPair(DestReg, DestReg, Symbol, ELF::R_RISCV_GOT_HI20,
                     SecondOpcode, IDLoc, Out);
 }
@@ -3644,9 +3657,8 @@ void RISCVAsmParser::emitLoadTLSIEAddress(MCInst &Inst, SMLoc IDLoc,
   //             Lx rdest, %pcrel_lo(TmpLabel)(rdest)
   MCRegister DestReg = Inst.getOperand(0).getReg();
   const MCExpr *Symbol = Inst.getOperand(1).getExpr();
-  unsigned SecondOpcode = isRV64() ? RISCV::LD : RISCV::LW;
   emitAuipcInstPair(DestReg, DestReg, Symbol, ELF::R_RISCV_TLS_GOT_HI20,
-                    SecondOpcode, IDLoc, Out);
+                    getPtrLoadOpcode(), IDLoc, Out);
 }
 
 void RISCVAsmParser::emitLoadTLSGDAddress(MCInst &Inst, SMLoc IDLoc,
@@ -3660,7 +3672,7 @@ void RISCVAsmParser::emitLoadTLSGDAddress(MCInst &Inst, SMLoc IDLoc,
   MCRegister DestReg = Inst.getOperand(0).getReg();
   const MCExpr *Symbol = Inst.getOperand(1).getExpr();
   emitAuipcInstPair(DestReg, DestReg, Symbol, ELF::R_RISCV_TLS_GD_HI20,
-                    RISCV::ADDI, IDLoc, Out);
+                    getPtrAddiOpcode(), IDLoc, Out);
 }
 
 void RISCVAsmParser::emitLoadStoreSymbol(MCInst &Inst, unsigned Opcode,
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.td b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
index 36fe4dfa66610..bd534401318cf 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfo.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
@@ -227,13 +227,6 @@ def GPRMemZeroOffset : MemOperand<GPR> {
 }
 
 def GPRMem : MemOperand<GPR>;
-// Note: For RVY, the encodings using x0/zero (a null capability) as the base
-// are reserved. Therefore, we use YGPRNoX0 to reject them in the assembler
-// while allowing the encodings for RVI mode.
-def BasePtrRC : RegClassByHwMode<
-  [RV32I, RV64I, RV32Y, RV64Y],
-  [GPR, GPR, YGPRNoX0, YGPRNoX0]>;
-
 def BasePtr : MemOperand<BasePtrRC>;
 
 
@@ -760,7 +753,7 @@ let isReMaterializable = 1, isAsCheapAsAMove = 1,
 def LUI : RVInstU<OPC_LUI, (outs GPR:$rd), (ins uimm20_lui:$imm20),
                   "lui", "$rd, $imm20">, Sched<[WriteIALU]>;
 
-def AUIPC : RVInstU<OPC_AUIPC, (outs GPR:$rd), (ins uimm20_auipc:$imm20),
+def AUIPC : RVInstU<OPC_AUIPC, (outs PtrReg:$rd), (ins uimm20_auipc:$imm20),
                     "auipc", "$rd, $imm20">, Sched<[WriteIALU]>;
 
 def JAL : RVInstJ<OPC_JAL, (outs GPR:$rd), (ins simm21_lsb0_jal:$imm20),
@@ -1240,7 +1233,7 @@ def : MnemonicAlias<"sbreak", "ebreak">;
 def : InstAlias<"zext.b $rd, $rs", (ANDI GPR:$rd, GPR:$rs, 0xFF)>;
 
 let Predicates = [HasStdExtZicfilp] in {
-def : InstAlias<"lpad $imm20", (AUIPC X0, uimm20:$imm20)>;
+def : InstAlias<"lpad $imm20", (AUIPC NullReg, uimm20:$imm20)>;
 }
 
 //===----------------------------------------------------------------------===//
@@ -1897,7 +1890,7 @@ def PseudoMovImm : Pseudo<(outs GPR:$dst), (ins i32imm:$imm), []>,
 
 let hasSideEffects = 0, mayLoad = 0, mayStore = 0, Size = 8, isCodeGenOnly = 0,
     isAsmParserOnly = 1 in
-def PseudoLLA : Pseudo<(outs GPR:$dst), (ins bare_symbol:$src), [],
+def PseudoLLA : Pseudo<(outs PtrReg:$dst), (ins bare_symbol:$src), [],
                        "lla", "$dst, $src">;
 
 // Refer to comment on PseudoLI for explanation of Size=32
@@ -1912,12 +1905,12 @@ def : Pat<(riscv_lla tconstpool:$in), (PseudoLLA tconstpool:$in)>;
 
 let hasSideEffects = 0, mayLoad = 1, mayStore = 0, Size = 8, isCodeGenOnly = 0,
     isAsmParserOnly = 1 in
-def PseudoLGA : Pseudo<(outs GPR:$dst), (ins bare_symbol:$src), [],
+def PseudoLGA : Pseudo<(outs PtrReg:$dst), (ins bare_symbol:$src), [],
                        "lga", "$dst, $src">;
 
 let hasSideEffects = 0, mayLoad = 1, mayStore = 0, Size = 8, isCodeGenOnly = 0,
     isAsmParserOnly = 1 in
-def PseudoLA : Pseudo<(outs GPR:$dst), (ins bare_symbol:$src), [],
+def PseudoLA : Pseudo<(outs PtrReg:$dst), (ins bare_symbol:$src), [],
                       "la", "$dst, $src">;
 
 // Refer to comment on PseudoLI for explanation of Size=32
@@ -1928,16 +1921,16 @@ def PseudoLAImm : Pseudo<(outs GPR:$rd), (ins ixlenimm_li_restricted:$imm), [],
 
 let hasSideEffects = 0, mayLoad = 1, mayStore = 0, Size = 8, isCodeGenOnly = 0,
     isAsmParserOnly = 1 in
-def PseudoLA_TLS_IE : Pseudo<(outs GPR:$dst), (ins bare_symbol:$src), [],
+def PseudoLA_TLS_IE : Pseudo<(outs PtrReg:$dst), (ins bare_symbol:$src), [],
                              "la.tls.ie", "$dst, $src">;
 
 let hasSideEffects = 0, mayLoad = 0, mayStore = 0, Size = 8, isCodeGenOnly = 0,
     isAsmParserOnly = 1 in
-def PseudoLA_TLS_GD : Pseudo<(outs GPR:$dst), (ins bare_symbol:$src), [],
+def PseudoLA_TLS_GD : Pseudo<(outs PtrReg:$dst), (ins bare_symbol:$src), [],
                              "la.tls.gd", "$dst, $src">;
 
 let hasSideEffects = 0, mayLoad = 1, mayStore = 0, Size = 32, isCodeGenOnly = 0 in
-def PseudoLA_TLSDESC : Pseudo<(outs GPR:$dst), (ins bare_symbol:$src), [],
+def PseudoLA_TLSDESC : Pseudo<(outs PtrReg:$dst), (ins bare_symbol:$src), [],
                              "la.tlsdesc", "$dst, $src">;
 
 def TLSDESCCallSymbol : AsmOperandClass {
diff --git a/llvm/lib/Target/RISCV/RISCVRegisterInfo.td b/llvm/lib/Target/RISCV/RISCVRegisterInfo.td
index 5fb69d7bcf80d..642a55f2c32c6 100644
--- a/llvm/lib/Target/RISCV/RISCVRegisterInfo.td
+++ b/llvm/lib/Target/RISCV/RISCVRegisterInfo.td
@@ -272,8 +272,8 @@ def XLenVT : ValueTypeByHwMode<[RV32I, RV64I, RV32Y, RV64Y],
 defvar XLenPairVT = untyped;
 
 // Allow f64 in GPR for ZDINX on RV64.
-def XLenFVT : ValueTypeByHwMode<[RV64I, RV64Y],
-                                [f64,   f64]>;
+def XLenFVT : ValueTypeByHwMode<[DefaultMode, RV64I, RV64Y],
+                                [/*XLen*/i32, f64,   f64]>;
 def XLenPairFVT : ValueTypeByHwMode<[RV32I, RV32Y],
                                     [f64,   f64]>;
 
@@ -282,8 +282,8 @@ def XLenVecI8VT : ValueTypeByHwMode<[RV32I, RV64I, RV32Y, RV64Y],
                                     [v4i8,  v8i8,  v4i8,  v8i8]>;
 def XLenVecI16VT : ValueTypeByHwMode<[RV32I, RV64I, RV32Y, RV64Y],
                                      [v2i16, v4i16, v2i16, v4i16]>;
-def XLenVecI32VT : ValueTypeByHwMode<[RV64I, RV64Y],
-                                     [v2i32, v2i32]>;
+def XLenVecI32VT : ValueTypeByHwMode<[DefaultMode, RV64I, RV64Y],
+                                     [/*XLen*/i32, v2i32, v2i32]>;
 def XLenRI : RegInfoByHwMode<
       [RV32I,             RV64I,             RV32Y,             RV64Y],
       [RegInfo<32,32,32>, RegInfo<64,64,64>, RegInfo<32,32,32>, RegInfo<64,64,64>]>;
@@ -333,6 +333,18 @@ def YGPR : RegisterClass<"RISCV", [YLenVT], 64,
   let RegInfos = YLenRI;
 }
 
+// Note: We have to use a multiclass here instead of inheriting from
+// RegClassByHwMode since tablegen does not allow subclasses.
+// TODO: could add a usage assert here that AddrRC is XLenVT and CapRC YLenVT?
+multiclass PtrRegClassByHwMode<RegisterClass AddrRC, RegisterClass CapRC> {
+  def "" : RegClassByHwMode<[RV32I,  RV64I,  RV32Y, RV64Y],
+                            [AddrRC, AddrRC, CapRC, CapRC]>;
+}
+
+// This register class represents a pointer: YLen in capability mode, XLen
+// otherwise. Used for mode-dependent instructions such as AUIPC/JALR.
+defm PtrReg : PtrRegClassByHwMode<GPR, YGPR>;
+
 def GPRX0 : GPRRegisterClass<(add X0)>;
 
 def GPRX1 : GPRRegisterClass<(add X1)> {
@@ -353,6 +365,10 @@ def YGPRNoX0 : GPRRegisterClass<(sub YGPR, X0_Y)> {
   let DiagnosticType = "InvalidRegClassYGPRNoNull";
   let DiagnosticString = GPRNoX0.DiagnosticString;
 }
+// Note: For RVY, the encodings using x0/zero (a null capability) as the base
+// are reserved. Therefore, we use YGPRNoX0 to reject them in the assembler
+// while allowing the encodings for RVI mode.
+defm BasePtrRC : PtrRegClassByHwMode<GPR, YGPRNoX0>;
 
 def GPRNoX2 : GPRRegisterClass<(sub GPR, X2)> {
   let DiagnosticType = "InvalidRegClassGPRNoX2";
@@ -405,6 +421,8 @@ def GPRNoX31 : GPRRegisterClass<(sub GPR, X31)> {
   let DiagnosticString = "register must be a GPR excluding t6 (x31)";
 }
 
+def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
+                                       [X0,    X0,    X0_Y,  X0_Y]>;
 //===----------------------------------------------------------------------===//
 // Even-Odd GPR Pairs
 //===----------------------------------------------------------------------===//
diff --git a/llvm/test/MC/RISCV/rvy/rvy-auipc.s b/llvm/test/MC/RISCV/rvy/rvy-auipc.s
new file mode 100644
index 0000000000000..187b54ab70470
--- /dev/null
+++ b/llvm/test/MC/RISCV/rvy/rvy-auipc.s
@@ -0,0 +1,194 @@
+# RUN: llvm-mc --triple=riscv32 --mattr=+experimental-y,+cap-mode --riscv-no-aliases --show-encoding --show-inst < %s \
+# RUN:   | FileCheck --check-prefixes=CHECK,CHECK-ASM,CHECK-CAP %s
+# RUN: llvm-mc --triple=riscv32 --mattr=+experimental-y,-cap-mode --riscv-no-aliases --show-encoding --show-inst < %s \
+# RUN:   | FileCheck --check-prefixes=CHECK,CHECK-ASM,CHECK-INT,CHECK-INT-32 %s
+# RUN: llvm-mc --triple=riscv64 --mattr=+experimental-y,+cap-mode --riscv-no-aliases --show-encoding --show-inst < %s \
+# RUN:   | FileCheck --check-prefixes=CHECK,CHECK-ASM,CHECK-CAP %s
+# RUN: llvm-mc --triple=riscv64 --mattr=+experimental-y,-cap-mode --riscv-no-aliases --show-encoding --show-inst < %s \
+# RUN:   | FileCheck --check-prefixes=CHECK,CHECK-ASM,CHECK-INT,CHECK-INT-64 %s
+## Check that the capmode output can be dissassembled correctly (this previous triggered an assertion in RISCVMCInstrAnalysis)
+# RUN: llvm-mc --filetype=obj --triple=riscv32 --mattr=+experimental-y,+cap-mode < %s -o - \
+# RUN:   | llvm-objdump --mattr=+experimental-y,-cap-mode -M no-aliases -d -r --no-print-imm-hex - \
+# RUN:   | FileCheck --check-prefixes=CHECK,CHECK-OBJ %s
+
+# RUN: llvm-mc --triple=riscv64 --mattr=+experimental-y,+cap-mode --riscv-no-aliases --show-encoding --show-inst --defsym=RV64=1 < %s \
+# RUN:   | FileCheck --check-prefixes=CHECK,CHECK-ASM,CHECK-CAP %s
+# RUN: llvm-mc --triple=riscv64 --mattr=+experimental-y,-cap-mode --riscv-no-aliases --show-encoding --show-inst --defsym=RV64=1 < %s \
+# RUN:   | FileCheck --check-prefixes=CHECK,CHECK-ASM,CHECK-INT,CHECK-INT-64 %s
+# DISABLED: llvm-mc --filetype=obj --triple=riscv64 --mattr=+experimental-y,+cap-mode --defsym=RV64=1 < %s -o %t64.o
+# DISABLED: llvm-objdump --mattr=+experimental-y,-cap-mode -M no-aliases -d -r --no-print-imm-hex %t64.o \
+# DISABLED:   | FileCheck --check-prefixes=CHECK,CHECK-OBJ %s
+# CHECK: auipc		a0, 0
+# CHECK-ASM-SAME: # encoding: [0x17,0x05,0x00,0x00]
+# CHECK-ASM-NEXT: # <MCInst #[[#]] AUIPC{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Imm:0>>
+auipc a0, 0
+# CHECK-NEXT: auipc		a0, 1
+# CHECK-ASM-SAME: # encoding: [0x17,0x15,0x00,0x00]
+# CHECK-ASM-NEXT: # <MCInst #[[#]] AUIPC{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Imm:1>>
+auipc a0, 1
+# CHECK-ASM-NEXT: auipc		a0, %pcrel_hi(sym)
+# CHECK-ASM-SAME: # encoding: [0x17,0bAAAA0101,A,A]
+# CHECK-ASM-NEXT: #   fixup A - offset: 0, value: %pcrel_hi(sym), kind: fixup_riscv_pcrel_hi20
+# CHECK-ASM-NEXT: # <MCInst #[[#]] AUIPC{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Expr:%pcrel_hi(sym)>>
+# CHECK-OBJ-NEXT: auipc		a0, 0
+# CHECK-OBJ-NEXT: R_RISCV_PCREL_HI20 sym
+auipc a0, %pcrel_hi(sym)
+#
+## Test the pseudo expansions using AUIPC:
+#
+# CHECK-OBJ-EMPTY:
+# CHECK-NEXT: .Lpcrel_hi0
+# CHECK-ASM-NEXT: auipc		a0, %pcrel_hi(sym)
+# CHECK-ASM-SAME: # encoding: [0x17,0bAAAA0101,A,A]
+# CHECK-ASM-NEXT: #   fixup A - offset: 0, value: %pcrel_hi(sym), kind: fixup_riscv_pcrel_hi20
+# CHECK-ASM-NEXT: # <MCInst #[[#]] AUIPC{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Expr:%pcrel_hi(sym)>>
+# CHECK-INT-NEXT: addi		a0, a0, %pcrel_lo(.Lpcrel_hi0)
+# CHECK-INT-SAME: # encoding: [0x13,0x05,0bAAAA0101,A]
+# CHECK-INT-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi0), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-INT-NEXT: # <MCInst #[[#]] ADDI{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: addiy		a0, a0, %pcrel_lo(.Lpcrel_hi0)
+# CHECK-CAP-SAME: # encoding: [0x1b,0x25,0bAAAA0101,A]
+# CHECK-CAP-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi0), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-CAP-NEXT: # <MCInst #[[#]] ADDIY{{$}}
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Expr:%pcrel_lo(.Lpcrel_hi0)>>
+# CHECK-OBJ-NEXT: auipc		a0, 0
+# CHECK-OBJ-NEXT: R_RISCV_PCREL_HI20 sym
+# CHECK-OBJ-NEXT: addiy a0, a0, 0
+# CHECK-OBJ-NEXT: R_RISCV_PCREL_LO12_I .Lpcrel_hi0
+la a0, sym
+# CHECK-OBJ-EMPTY:
+# CHECK-NEXT: .Lpcrel_hi1
+# CHECK-ASM-NEXT: auipc		a0, %pcrel_hi(sym)
+# CHECK-ASM-SAME: # encoding: [0x17,0bAAAA0101,A,A]
+# CHECK-ASM-NEXT: #   fixup A - offset: 0, value: %pcrel_hi(sym), kind: fixup_riscv_pcrel_hi20
+# CHECK-ASM-NEXT: # <MCInst #[[#]] AUIPC{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Expr:%pcrel_hi(sym)>>
+# CHECK-INT-NEXT: addi		a0, a0, %pcrel_lo(.Lpcrel_hi1)
+# CHECK-INT-SAME: # encoding: [0x13,0x05,0bAAAA0101,A]
+# CHECK-INT-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi1), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-INT-NEXT: # <MCInst #[[#]] ADDI{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: addiy		a0, a0, %pcrel_lo(.Lpcrel_hi1)
+# CHECK-CAP-SAME: # encoding: [0x1b,0x25,0bAAAA0101,A]
+# CHECK-CAP-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi1), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-CAP-NEXT: # <MCInst #[[#]] ADDIY{{$}}
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Expr:%pcrel_lo(.Lpcrel_hi1)>>
+# CHECK-OBJ-NEXT: auipc a0, 0
+# CHECK-OBJ-NEXT: R_RISCV_PCREL_HI20 sym
+# CHECK-OBJ-NEXT: addiy a0, a0, 0
+# CHECK-OBJ-NEXT: R_RISCV_PCREL_LO12_I .Lpcrel_hi1
+lla a0, sym
+# CHECK-OBJ-EMPTY:
+# CHECK-NEXT: .Lpcrel_hi2
+# CHECK-ASM-NEXT: auipc		a0, %got_pcrel_hi(sym)
+# CHECK-ASM-SAME: # encoding: [0x17,0x05,0x00,0x00]
+# CHECK-ASM-NEXT: #   fixup A - offset: 0, value: %got_pcrel_hi(sym), relocation type: 20
+# CHECK-ASM-NEXT: # <MCInst #[[#]] AUIPC{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Expr:%got_pcrel_hi(sym)>>
+# CHECK-INT-32-NEXT: lw		a0, %pcrel_lo(.Lpcrel_hi2)(a0)
+# CHECK-INT-32-SAME: # encoding: [0x03,0x25,0bAAAA0101,A]
+# CHECK-INT-32-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi2), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-INT-32-NEXT: # <MCInst #[[#]] LW{{$}}
+# CHECK-INT-64-NEXT: ld		a0, %pcrel_lo(.Lpcrel_hi2)(a0)
+# CHECK-INT-64-SAME: # encoding: [0x03,0x35,0bAAAA0101,A]
+# CHECK-INT-64-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi2), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-INT-64-NEXT: # <MCInst #[[#]] LD{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: ly		a0, %pcrel_lo(.Lpcrel_hi2)(a0)
+# CHECK-CAP-SAME: # encoding: [0x0f,0x45,0bAAAA0101,A]
+# CHECK-CAP-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi2), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-CAP-NEXT: # <MCInst #[[#]] LY{{$}}
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Expr:%pcrel_lo(.Lpcrel_hi2)>>
+# CHECK-OBJ-NEXT: auipc a0, 0
+# CHECK-OBJ-NEXT: R_RISCV_GOT_HI20 sym
+# CHECK-OBJ-NEXT: ly a0, 0(a0)
+# CHECK-OBJ-NEXT: R_RISCV_PCREL_LO12_I .Lpcrel_hi2
+lga a0, sym
+# CHECK-OBJ-EMPTY:
+# CHECK-NEXT: .Lpcrel_hi3
+# CHECK-ASM-NEXT: auipc		a0, %tls_ie_pcrel_hi(sym)
+# CHECK-ASM-SAME: # encoding: [0x17,0x05,0x00,0x00]
+# CHECK-ASM-NEXT: #   fixup A - offset: 0, value: %tls_ie_pcrel_hi(sym), relocation type: 21
+# CHECK-ASM-NEXT: # <MCInst #[[#]] AUIPC{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Expr:%tls_ie_pcrel_hi(sym)>>
+# CHECK-INT-32-NEXT: lw		a0, %pcrel_lo(.Lpcrel_hi3)(a0)
+# CHECK-INT-32-SAME: # encoding: [0x03,0x25,0bAAAA0101,A]
+# CHECK-INT-32-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi3), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-INT-32-NEXT: # <MCInst #[[#]] LW{{$}}
+# CHECK-INT-64-NEXT: ld		a0, %pcrel_lo(.Lpcrel_hi3)(a0)
+# CHECK-INT-64-SAME: # encoding: [0x03,0x35,0bAAAA0101,A]
+# CHECK-INT-64-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi3), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-INT-64-NEXT: # <MCInst #[[#]] LD{{$}}
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-INT-NEXT: #  <MCOperand Reg:X10>
+# CHECK-CAP-NEXT: ly		a0, %pcrel_lo(.Lpcrel_hi3)(a0)
+# CHECK-CAP-SAME: # encoding: [0x0f,0x45,0bAAAA0101,A]
+# CHECK-CAP-NEXT: #   fixup A - offset: 0, value: %pcrel_lo(.Lpcrel_hi3), kind: fixup_riscv_pcrel_lo12_i
+# CHECK-CAP-NEXT: # <MCInst #[[#]] LY{{$}}
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-CAP-NEXT: #  <MCOperand Reg:X10_Y>
+# CHECK-ASM-NEXT: #  <MCOperand Expr:%pcrel_lo(.Lpcrel_hi3)>>
+# CHECK-OBJ-NEXT: auipc a0, 0
+# CHECK-OBJ-NEXT: R_RISCV_TLS_GOT_HI20 sym
+# CHECK-OBJ-NEXT: ly a0, 0(a0)
+# CHECK-OBJ-NEXT: R_RISCV_PCREL_LO12_I .Lpcrel_hi3
+la.tls.ie a0, sym
+# CHECK-OBJ-EMPTY:
+# CHECK-NEXT: .Lpcrel_hi4
+# CHECK-ASM-NEXT: auipc		a0, %tls_gd_pcrel_hi(sym)
+# CHECK-ASM-SAME: # encoding: [0x17,0x05,0x00,0x00]
+# CHECK-ASM-NEXT: #   fixup A - offse...
[truncated]

@jrtc27 jrtc27 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The address (really pointer) generating pseudos need more changes due to the semantic differences (provenance) from CHERI, as done downstream. Also the TLS ones are ABI-dependent and we're in the process of changing them so I think it's premature to allow them for CHERI upstream.

@github-actions

Copy link
Copy Markdown

🐧 Linux x64 Test Results

The build failed before running any tests. Click on a failure below to see the details.

include/llvm/TargetParser/RISCVTargetParserDef.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/include/llvm/TargetParser/RISCVTargetParserDef.inc
FAILED: include/llvm/TargetParser/RISCVTargetParserDef.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/include/llvm/TargetParser/RISCVTargetParserDef.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/include/llvm/TargetParser && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-min-tblgen -gen-riscv-target-def -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/TargetParser -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVTargetParserDef.inc -d RISCVTargetParserDef.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/TargetParser /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/include/llvm/TargetParser /home/gha/actions-runner/_work/llvm-project/llvm-project/build/include/llvm/TargetParser/RISCVTargetParserDef.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/c78eb929381f282953aba4349d32ac32e778d5f526226618059e0b1af421e300.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenAsmMatcher.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenAsmMatcher.inc
FAILED: lib/Target/RISCV/RISCVGenAsmMatcher.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenAsmMatcher.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-asm-matcher -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenAsmMatcher.inc -d RISCVGenAsmMatcher.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenAsmMatcher.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/915b554b132086d3da02cdea74d94a003c08792bcc0ca3bfb5909d2925a4c136.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenCompressInstEmitter.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenCompressInstEmitter.inc
FAILED: lib/Target/RISCV/RISCVGenCompressInstEmitter.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenCompressInstEmitter.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-compress-inst-emitter -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenCompressInstEmitter.inc -d RISCVGenCompressInstEmitter.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenCompressInstEmitter.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/5d38af19ab56a7d0782d26e319854b1750074d80187cf0bc103b17a5a01aed43.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenDAGISel.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenDAGISel.inc
FAILED: lib/Target/RISCV/RISCVGenDAGISel.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenDAGISel.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-dag-isel -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target -omit-comments /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenDAGISel.inc -d RISCVGenDAGISel.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenDAGISel.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/8ca1878d0a1fdfb0fad63f9972a74db68a141ff27684a208d3b636f73a1453b3.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenGlobalISel.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenGlobalISel.inc
FAILED: lib/Target/RISCV/RISCVGenGlobalISel.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenGlobalISel.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-global-isel -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o RISCVGenGlobalISel.inc -d RISCVGenGlobalISel.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenGlobalISel.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/bb563f5b2bcb89784730324f005b6cdec791e38c1be9a18ce447237e09f335b7.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td:16:
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenDisassemblerTables.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenDisassemblerTables.inc
FAILED: lib/Target/RISCV/RISCVGenDisassemblerTables.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenDisassemblerTables.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-disassembler --specialize-decoders-per-bitwidth -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenDisassemblerTables.inc -d RISCVGenDisassemblerTables.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenDisassemblerTables.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/5b17ffb24385e99a4006473ddfcd7f9913e969403334b1566a57ccf7b8ecfeff.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenExegesis.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenExegesis.inc
FAILED: lib/Target/RISCV/RISCVGenExegesis.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenExegesis.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-exegesis -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenExegesis.inc -d RISCVGenExegesis.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenExegesis.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/1ef150d24f878eb2767469438a9f5ec97d39589b52f54139298c20ca353ea2c0.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenMCCodeEmitter.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMCCodeEmitter.inc
FAILED: lib/Target/RISCV/RISCVGenMCCodeEmitter.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMCCodeEmitter.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-emitter -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenMCCodeEmitter.inc -d RISCVGenMCCodeEmitter.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMCCodeEmitter.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/bf5cf5ce04a5c7fad810304fc5b309b53cc7054e56ba6f1bd062aba510944ca0.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenMCPseudoLowering.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMCPseudoLowering.inc
FAILED: lib/Target/RISCV/RISCVGenMCPseudoLowering.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMCPseudoLowering.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-pseudo-lowering -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenMCPseudoLowering.inc -d RISCVGenMCPseudoLowering.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMCPseudoLowering.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/def05cfd76b75cc1d0a76c4d1a7be379b166f6b24c0d9986c7203ac10834386a.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenInstrInfo.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenInstrInfo.inc
FAILED: lib/Target/RISCV/RISCVGenInstrInfo.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenInstrInfo.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-instr-info -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenInstrInfo.inc -d RISCVGenInstrInfo.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenInstrInfo.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/bc41cbed9873a8493515da1b53c5deeb13db6d92aa196b14e57eafae36a81387.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenAsmWriter.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenAsmWriter.inc
FAILED: lib/Target/RISCV/RISCVGenAsmWriter.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenAsmWriter.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-asm-writer -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenAsmWriter.inc -d RISCVGenAsmWriter.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenAsmWriter.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/59dc96cc1dca139c3121011bc2927594f517ee61a8325a5fe721c68cb72e33f0.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc
FAILED: lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-global-isel-combiner -combiners="RISCVO0PreLegalizerCombiner" -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o RISCVGenO0PreLegalizeGICombiner.inc -d RISCVGenO0PreLegalizeGICombiner.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/9c6cbfc841173580f002d568ae22300e3c31fc5ed84eb2a3984d6885275a2569.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td:16:
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenRegisterBank.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterBank.inc
FAILED: lib/Target/RISCV/RISCVGenRegisterBank.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterBank.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-register-bank -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenRegisterBank.inc -d RISCVGenRegisterBank.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterBank.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/574a3502ac36814a779293592104a9d99e2bd5f5d38dbfbc0bf8c8a3ff64fe11.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenMacroFusion.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMacroFusion.inc
FAILED: lib/Target/RISCV/RISCVGenMacroFusion.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMacroFusion.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-macro-fusion-pred -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenMacroFusion.inc -d RISCVGenMacroFusion.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMacroFusion.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/3cd780dbb47ef723b6aa2d5b60fa7185e293e2deaa6ec888f1ddff9181aa971d.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc
FAILED: lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-global-isel-combiner -combiners="RISCVPreLegalizerCombiner" -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o RISCVGenPreLegalizeGICombiner.inc -d RISCVGenPreLegalizeGICombiner.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/a332a82bf532a854dce3abbb095be4fb099e07aec239dee7f6077cd1fe16da86.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td:16:
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenRegisterInfo.inc lib/Target/RISCV/RISCVGenRegisterInfoEnums.inc lib/Target/RISCV/RISCVGenRegisterInfoHeader.inc lib/Target/RISCV/RISCVGenRegisterInfoMCDesc.inc lib/Target/RISCV/RISCVGenRegisterInfoTargetDesc.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfo.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfoEnums.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfoHeader.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfoMCDesc.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfoTargetDesc.inc
FAILED: lib/Target/RISCV/RISCVGenRegisterInfo.inc lib/Target/RISCV/RISCVGenRegisterInfoEnums.inc lib/Target/RISCV/RISCVGenRegisterInfoHeader.inc lib/Target/RISCV/RISCVGenRegisterInfoMCDesc.inc lib/Target/RISCV/RISCVGenRegisterInfoTargetDesc.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfo.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfoEnums.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfoHeader.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfoMCDesc.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfoTargetDesc.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-register-info -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenRegisterInfo.inc -d RISCVGenRegisterInfo.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfo.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/9b709b9ddb3b2be712a4cdbfcf4e52afa6c758c914bbf5807da1d21dd5938ba0.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc
FAILED: lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-global-isel-combiner -combiners="RISCVPostLegalizerCombiner" -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o RISCVGenPostLegalizeGICombiner.inc -d RISCVGenPostLegalizeGICombiner.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/a5102c535f7fc87a6adceb6123b16058fe41d7d143c67e8751b4a9f3047f539e.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td:16:
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenSearchableTables.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSearchableTables.inc
FAILED: lib/Target/RISCV/RISCVGenSearchableTables.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSearchableTables.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-searchable-tables -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenSearchableTables.inc -d RISCVGenSearchableTables.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSearchableTables.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/7126c902674a7ca9b10a37bab93fada4e520c556de1ce1014f9942f0365f72fd.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenSDNodeInfo.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSDNodeInfo.inc
FAILED: lib/Target/RISCV/RISCVGenSDNodeInfo.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSDNodeInfo.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-sd-node-info -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenSDNodeInfo.inc -d RISCVGenSDNodeInfo.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSDNodeInfo.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/12e44879a010bac828635804e3f0254d86ee986291bea96c395130278e28d347.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
lib/Target/RISCV/RISCVGenSubtargetInfo.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSubtargetInfo.inc
FAILED: lib/Target/RISCV/RISCVGenSubtargetInfo.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSubtargetInfo.inc
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-tblgen -gen-subtarget -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVGenSubtargetInfo.inc -d RISCVGenSubtargetInfo.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSubtargetInfo.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/17e1e5a84561aeb9c2ac34cb94c770adbd5c69b6c6746fb101d3914169ead771.d
Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

@github-actions

Copy link
Copy Markdown

🪟 Windows x64 Test Results

The build failed before running any tests. Click on a failure below to see the details.

[code=1] include/llvm/TargetParser/RISCVTargetParserDef.inc
FAILED: [code=1] include/llvm/TargetParser/RISCVTargetParserDef.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\include\llvm\TargetParser && C:\_work\llvm-project\llvm-project\build\bin\llvm-min-tblgen.exe -gen-riscv-target-def -IC:/_work/llvm-project/llvm-project/llvm/include/llvm/TargetParser -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/include/llvm/TargetParser/RISCVTargetParserDef.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenAsmMatcher.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenAsmMatcher.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-asm-matcher -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenAsmMatcher.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenAsmWriter.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenAsmWriter.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-asm-writer -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenAsmWriter.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenDAGISel.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenDAGISel.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-dag-isel -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target -omit-comments --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenDAGISel.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenCompressInstEmitter.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenCompressInstEmitter.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-compress-inst-emitter -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenCompressInstEmitter.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenDisassemblerTables.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenDisassemblerTables.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-disassembler --specialize-decoders-per-bitwidth -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenDisassemblerTables.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenGlobalISel.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenGlobalISel.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-global-isel -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenGlobalISel.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td:16:
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenInstrInfo.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenInstrInfo.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-instr-info -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenInstrInfo.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenExegesis.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenExegesis.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-exegesis -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenExegesis.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenMCCodeEmitter.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenMCCodeEmitter.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-emitter -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMCCodeEmitter.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenMCPseudoLowering.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenMCPseudoLowering.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-pseudo-lowering -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMCPseudoLowering.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenMacroFusion.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenMacroFusion.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-macro-fusion-pred -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenMacroFusion.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-global-isel-combiner -combiners="RISCVPreLegalizerCombiner" -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td:16:
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-global-isel-combiner -combiners="RISCVO0PreLegalizerCombiner" -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td:16:
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-global-isel-combiner -combiners="RISCVPostLegalizerCombiner" -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td:16:
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenSDNodeInfo.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenSDNodeInfo.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-sd-node-info -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSDNodeInfo.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenSearchableTables.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenSearchableTables.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-searchable-tables -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSearchableTables.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenSubtargetInfo.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenSubtargetInfo.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-subtarget -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenSubtargetInfo.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenRegisterBank.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenRegisterBank.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-register-bank -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterBank.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^
[code=1] lib/Target/RISCV/RISCVGenRegisterInfo.inc lib/Target/RISCV/RISCVGenRegisterInfoEnums.inc lib/Target/RISCV/RISCVGenRegisterInfoHeader.inc lib/Target/RISCV/RISCVGenRegisterInfoMCDesc.inc lib/Target/RISCV/RISCVGenRegisterInfoTargetDesc.inc
FAILED: [code=1] lib/Target/RISCV/RISCVGenRegisterInfo.inc lib/Target/RISCV/RISCVGenRegisterInfoEnums.inc lib/Target/RISCV/RISCVGenRegisterInfoHeader.inc lib/Target/RISCV/RISCVGenRegisterInfoMCDesc.inc lib/Target/RISCV/RISCVGenRegisterInfoTargetDesc.inc
cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\lib\Target\RISCV && C:\_work\llvm-project\llvm-project\build\bin\llvm-tblgen.exe -gen-register-info -IC:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV -IC:/_work/llvm-project/llvm-project/build/include -IC:/_work/llvm-project/llvm-project/llvm/include -I C:/_work/llvm-project/llvm-project/llvm/lib/Target --long-string-literals=0 C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o C:/_work/llvm-project/llvm-project/build/lib/Target/RISCV/RISCVGenRegisterInfo.inc"
Included from C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV/RISCV.td:33:
C:/_work/llvm-project/llvm-project/llvm/lib/Target/RISCV\RISCVRegisterInfo.td:424:15: error: Couldn't find class 'RegisterByHwMode'
def NullReg : RegisterByHwMode<PtrReg, [RV32I, RV64I, RV32Y, RV64Y],
^

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

@arichardson

Copy link
Copy Markdown
Member Author

The address (really pointer) generating pseudos need more changes due to the semantic differences (provenance) from CHERI, as done downstream. Also the TLS ones are ABI-dependent and we're in the process of changing them so I think it's premature to allow them for CHERI upstream.

Should I just drop the pseudos for now?

arichardson added a commit that referenced this pull request Jan 21, 2026
This previously triggered an assertion in a test for RVY's AUIPC
instruction that will be submitted as a follow up
(#177074).

Pull Request: #177071
llvm-sync Bot pushed a commit to arm/arm-toolchain that referenced this pull request Jan 21, 2026
This previously triggered an assertion in a test for RVY's AUIPC
instruction that will be submitted as a follow up
(llvm/llvm-project#177074).

Pull Request: llvm/llvm-project#177071
@arichardson
arichardson marked this pull request as draft January 21, 2026 08:11
HugoSilvaSantos pushed a commit to HugoSilvaSantos/arm-toolchain that referenced this pull request Jan 27, 2026
This previously triggered an assertion in a test for RVY's AUIPC
instruction that will be submitted as a follow up
(llvm/llvm-project#177074).

Pull Request: llvm/llvm-project#177071
arichardson added a commit to arichardson/upstream-llvm-project that referenced this pull request May 26, 2026
For RVY, the AUIPC instruction is mode-dependent, writing back a full
capability (X*_Y) register in capability mode and a plain X register
otherwise. This introduces the NullReg RegisterByHwMode to support the
lpad InstAlias that uses a fixed register and therefore we have to use a
register that varies by HwMode in the pattern.

This was made possible by the previous commits that introduced
`RegisterByHwMode`. An alternative would have been to try to support static
resolution of the `RegClassByHwMode` based on the predicates, but that
requires duplicating all `InstAlias`es, which would be fine in the single
case here, but we also need this for JALR with lots of `InstAlias`es.

Pull Request: llvm#177074
markrvmurray pushed a commit to markrvmurray/llvm-mc6809 that referenced this pull request Jun 14, 2026
This previously triggered an assertion in a test for RVY's AUIPC
instruction that will be submitted as a follow up
(llvm/llvm-project#177074).

Pull Request: llvm/llvm-project#177071
arichardson added a commit to arichardson/upstream-llvm-project that referenced this pull request Jun 16, 2026
For RVY, the AUIPC instruction is mode-dependent, writing back a full
capability (X*_Y) register in capability mode and a plain X register
otherwise. This introduces the NullReg RegisterByHwMode to support the
lpad InstAlias that uses a fixed register and therefore we have to use a
register that varies by HwMode in the pattern.

This was made possible by the previous commits that introduced
`RegisterByHwMode`. An alternative would have been to try to support static
resolution of the `RegClassByHwMode` based on the predicates, but that
requires duplicating all `InstAlias`es, which would be fine in the single
case here, but we also need this for JALR with lots of `InstAlias`es.

Pull Request: llvm#177074
arichardson added a commit to arichardson/cheri-alliance-llvm-project that referenced this pull request Aug 31, 2026
This previously triggered an assertion in a test for RVY's AUIPC
instruction that will be submitted as a follow up
(llvm/llvm-project#177074).

Pull Request: llvm/llvm-project#177071

(cherry picked from commit 4b0640a855d79945bb4018e4eb529d2877115a94)
arichardson added a commit to arichardson/cheri-alliance-llvm-project that referenced this pull request Sep 4, 2026
This previously triggered an assertion in a test for RVY's AUIPC
instruction that will be submitted as a follow up
(llvm/llvm-project#177074).

Pull Request: llvm/llvm-project#177071

(cherry picked from commit 4b0640a855d79945bb4018e4eb529d2877115a94)
arichardson added a commit to arichardson/cheri-alliance-llvm-project that referenced this pull request Sep 4, 2026
This previously triggered an assertion in a test for RVY's AUIPC
instruction that will be submitted as a follow up
(llvm/llvm-project#177074).

Pull Request: llvm/llvm-project#177071

(cherry picked from commit 4b0640a855d79945bb4018e4eb529d2877115a94)
arichardson added a commit to arichardson/upstream-llvm-project that referenced this pull request Oct 10, 2026
For RVY, the AUIPC instruction is mode-dependent, writing back a full
capability (X*_Y) register in capability mode and a plain X register
otherwise. This introduces the NullReg RegisterByHwMode to support the
lpad InstAlias that uses a fixed register and therefore we have to use a
register that varies by HwMode in the pattern.

This was made possible by the previous commits that introduced
`RegisterByHwMode`. An alternative would have been to try to support static
resolution of the `RegClassByHwMode` based on the predicates, but that
requires duplicating all `InstAlias`es, which would be fine in the single
case here, but we also need this for JALR with lots of `InstAlias`es.

The la.tls.ie/la.tls.gd pseudos are rejected in capability mode for now
since their expansion depends on the pure-capability TLS ABI. Also make
RISCVMCInstrAnalysis invalidate the tracked AUIPC value when an
instruction writes the X*_Y register.

Pull Request: llvm#177074

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants