aboutsummaryrefslogtreecommitdiff
path: root/backend/include
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-19 03:19:40 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-19 03:19:40 +0800
commit69e1baa931dfa63838683378fa20ed9c46c68a70 (patch)
treed8ae9222ed52c3036b30371241bd593e0324ce6c /backend/include
parentc0f2700e0c7effc5da267bf501232ff4bfea63bc (diff)
downloadrcc-project-69e1baa931dfa63838683378fa20ed9c46c68a70.tar.gz
rcc-project-69e1baa931dfa63838683378fa20ed9c46c68a70.tar.xz
[RISCV][GlobalISel] Match floating comparisons
Diffstat (limited to 'backend/include')
-rw-r--r--backend/include/rcc/CodeGen/GlobalISel/GIMatchTableExecutor.h1
-rw-r--r--backend/include/rcc/TableGen/Record.h7
2 files changed, 8 insertions, 0 deletions
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<SourceSelectionTypePredicate> ResultType;
std::optional<SourceSelectionIntegerPredicate> IntegerPredicate;
+ std::optional<SourceSelectionFloatingPredicate> FloatingPredicate;
std::vector<SourceSelectionTargetPredicate> TargetPredicates;
std::vector<SourceSelectionOperandTypePredicate> OperandTypes;
std::vector<SourceSelectionOperandBankPredicate> OperandBanks;