From ca25d25d4c5131491a50b1a94e63e9b2d3c34ed4 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Sun, 16 Aug 2026 16:13:12 +0800 Subject: [RISCV][GlobalISel] Select comparisons against zero --- backend/include/rcc/TableGen/Record.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'backend/include/rcc/TableGen') diff --git a/backend/include/rcc/TableGen/Record.h b/backend/include/rcc/TableGen/Record.h index 94308c7..4378af8 100644 --- a/backend/include/rcc/TableGen/Record.h +++ b/backend/include/rcc/TableGen/Record.h @@ -229,16 +229,39 @@ struct SourceSelectionOperandClassPredicate final { TextRange Range; }; +struct SourceSelectionIntegerPredicate final { + std::uint32_t OperandIndex = 0; + std::string Predicate; + TextRange Range; +}; + +struct SourceSelectionOperandDefConstantPredicate final { + std::uint32_t OperandIndex = 0; + std::int64_t Value = 0; + TextRange Range; +}; + +struct SourceSelectionOperandRenderer final { + std::optional OperandIndex; + std::string PhysicalRegisterSymbol; + std::vector Flags; + TextRange Range; +}; + struct SourceSelectionRule final { std::string Symbol; std::uint32_t Priority = 0; std::string MatchOpcodeSymbol; std::optional ResultType; + std::optional IntegerPredicate; std::vector OperandTypes; std::vector OperandBanks; std::vector OperandClasses; + std::vector OperandDefConstants; std::string ResultOpcodeSymbol; + std::optional> OperandRenderers; std::vector AppendedImmediates; + std::vector EraseOperandDefinitions; TextRange Range; }; -- cgit v1.2.3