From f6a3a06de3d32eaeba1f3c8bbc5faa5ffaeb1128 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Mon, 17 Aug 2026 02:22:27 +0800 Subject: [RISCV][GlobalISel] Generate integer extension selections --- backend/include/rcc/TableGen/Record.h | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'backend/include/rcc/TableGen') diff --git a/backend/include/rcc/TableGen/Record.h b/backend/include/rcc/TableGen/Record.h index 6575b82..1f9dea9 100644 --- a/backend/include/rcc/TableGen/Record.h +++ b/backend/include/rcc/TableGen/Record.h @@ -235,15 +235,26 @@ struct SourceSelectionIntegerPredicate final { TextRange Range; }; -struct SourceSelectionOperandDefConstantPredicate final { +struct SourceSelectionTargetPredicate final { + std::string Symbol; + TextRange Range; +}; + +struct SourceSelectionConstantRange final { + std::int64_t Minimum = 0; + std::int64_t Maximum = 0; + TextRange SourceRange; +}; + +struct SourceSelectionOperandImmediatePredicate final { std::uint32_t OperandIndex = 0; - struct ConstantRange final { - std::int64_t Minimum = 0; - std::int64_t Maximum = 0; - TextRange SourceRange; - }; + std::vector Ranges; + TextRange Range; +}; - std::vector Ranges; +struct SourceSelectionOperandDefConstantPredicate final { + std::uint32_t OperandIndex = 0; + std::vector Ranges; TextRange Range; }; @@ -294,9 +305,11 @@ struct SourceSelectionRule final { std::string MatchOpcodeSymbol; std::optional ResultType; std::optional IntegerPredicate; + std::vector TargetPredicates; std::vector OperandTypes; std::vector OperandBanks; std::vector OperandClasses; + std::vector OperandImmediates; std::vector OperandDefConstants; std::vector DefUsePredicates; std::vector Temporaries; -- cgit v1.2.3