aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/Target/RISCV/RISCVGISelFloating.rccdesc
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-19 02:59:49 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-19 02:59:49 +0800
commit0461d2ba6bf1aedbd0d39e5da4daf90137bf61a7 (patch)
tree650bf61dba401fd4200f108cb99c80183724402b /backend/lib/Target/RISCV/RISCVGISelFloating.rccdesc
parent6c97d54954112be9a5badacaec8efa1d05bd7d15 (diff)
downloadrcc-project-0461d2ba6bf1aedbd0d39e5da4daf90137bf61a7.tar.gz
rcc-project-0461d2ba6bf1aedbd0d39e5da4daf90137bf61a7.tar.xz
[RISCV][GlobalISel] Generate select instruction matching
Diffstat (limited to 'backend/lib/Target/RISCV/RISCVGISelFloating.rccdesc')
-rw-r--r--backend/lib/Target/RISCV/RISCVGISelFloating.rccdesc44
1 files changed, 44 insertions, 0 deletions
diff --git a/backend/lib/Target/RISCV/RISCVGISelFloating.rccdesc b/backend/lib/Target/RISCV/RISCVGISelFloating.rccdesc
index bcf12c0..18046b5 100644
--- a/backend/lib/Target/RISCV/RISCVGISelFloating.rccdesc
+++ b/backend/lib/Target/RISCV/RISCVGISelFloating.rccdesc
@@ -637,3 +637,47 @@ selection_rules:
- opcode: FCVT_D_LU
root: true
operands: [{ operand: 0 }, { operand: 1 }, { immediate: 7 }]
+ -
+ id: select_g_select_fpr32
+ priority: 100
+ match:
+ opcode: G_SELECT
+ result_type: { kind: scalar, bits: 32 }
+ operand_banks:
+ - { index: 0, bank: FPR }
+ - { index: 1, bank: GPR }
+ - { index: 2, bank: FPR }
+ - { index: 3, bank: FPR }
+ apply:
+ instructions:
+ - opcode: Select_FPR32_Using_CC_GPR
+ root: true
+ operands:
+ - { operand: 0 }
+ - { complex: select_condition_lhs, operand: 1 }
+ - { complex: select_condition_rhs, operand: 1 }
+ - { complex: select_condition_code, operand: 1 }
+ - { operand: 2 }
+ - { operand: 3 }
+ -
+ id: select_g_select_fpr64
+ priority: 100
+ match:
+ opcode: G_SELECT
+ result_type: { kind: scalar, bits: 64 }
+ operand_banks:
+ - { index: 0, bank: FPR }
+ - { index: 1, bank: GPR }
+ - { index: 2, bank: FPR }
+ - { index: 3, bank: FPR }
+ apply:
+ instructions:
+ - opcode: Select_FPR64_Using_CC_GPR
+ root: true
+ operands:
+ - { operand: 0 }
+ - { complex: select_condition_lhs, operand: 1 }
+ - { complex: select_condition_rhs, operand: 1 }
+ - { complex: select_condition_code, operand: 1 }
+ - { operand: 2 }
+ - { operand: 3 }