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/utils/TableGen/Common/CodeGenTarget.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'backend/utils/TableGen/Common/CodeGenTarget.h') diff --git a/backend/utils/TableGen/Common/CodeGenTarget.h b/backend/utils/TableGen/Common/CodeGenTarget.h index 929d3e7..bee814f 100644 --- a/backend/utils/TableGen/Common/CodeGenTarget.h +++ b/backend/utils/TableGen/Common/CodeGenTarget.h @@ -189,17 +189,42 @@ struct NormalizedSelectionOperandClassPredicate final { std::uint32_t RegClass = 0; }; +struct NormalizedSelectionIntegerPredicate final { + std::uint32_t OperandIndex = 0; + std::uint32_t Predicate = 0; +}; + +struct NormalizedSelectionOperandDefConstantPredicate final { + std::uint32_t OperandIndex = 0; + std::int64_t Value = 0; +}; + +struct NormalizedSelectionOperandRenderer final { + enum class Kind : std::uint8_t { + Operand, + PhysicalRegister, + }; + + Kind SourceKind = Kind::Operand; + std::uint32_t Value = 0; + std::uint16_t Flags = 0; +}; + struct NormalizedSelectionRule final { std::string Symbol; std::uint32_t Priority = 0; std::uint32_t Specificity = 0; std::uint32_t MatchOpcode = 0; std::optional ResultType; + std::optional IntegerPredicate; std::vector OperandTypes; std::vector OperandBanks; std::vector OperandClasses; + std::vector OperandDefConstants; std::uint32_t ResultOpcode = 0; + std::optional> OperandRenderers; std::vector AppendedImmediates; + std::vector EraseOperandDefinitions; }; struct NormalizedTargetModel final { -- cgit v1.2.3