From 69e1baa931dfa63838683378fa20ed9c46c68a70 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Wed, 19 Aug 2026 03:19:40 +0800 Subject: [RISCV][GlobalISel] Match floating comparisons --- backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h | 1 + backend/include/rcc/TableGen/Record.h | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'backend/include/rcc') diff --git a/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h b/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h index a5b8b8e..a8b4f44 100644 --- a/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h +++ b/backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h @@ -37,6 +37,7 @@ enum class GIMatchTableOpcode : std::uint8_t { CheckOperandBank, CheckOperandClass, CheckIntegerPredicate, + CheckFloatingPredicate, CheckTargetPredicate, CheckOperandImmediateRanges, CheckOperandDefConstantRanges, diff --git a/backend/include/rcc/TableGen/Record.h b/backend/include/rcc/TableGen/Record.h index 449cb92..7039d9d 100644 --- a/backend/include/rcc/TableGen/Record.h +++ b/backend/include/rcc/TableGen/Record.h @@ -236,6 +236,12 @@ struct SourceSelectionIntegerPredicate final { TextRange Range; }; +struct SourceSelectionFloatingPredicate final { + std::uint32_t OperandIndex = 0; + std::string Predicate; + TextRange Range; +}; + struct SourceSelectionTargetPredicate final { std::string Symbol; TextRange Range; @@ -307,6 +313,7 @@ struct SourceSelectionRule final { std::string MatchOpcodeSymbol; std::optional ResultType; std::optional IntegerPredicate; + std::optional FloatingPredicate; std::vector TargetPredicates; std::vector OperandTypes; std::vector OperandBanks; -- cgit v1.2.3