aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/Target/RISCV/RISCVGISelInteger.rccdesc
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/Target/RISCV/RISCVGISelInteger.rccdesc')
-rw-r--r--backend/lib/Target/RISCV/RISCVGISelInteger.rccdesc36
1 files changed, 36 insertions, 0 deletions
diff --git a/backend/lib/Target/RISCV/RISCVGISelInteger.rccdesc b/backend/lib/Target/RISCV/RISCVGISelInteger.rccdesc
index 0413007..e096993 100644
--- a/backend/lib/Target/RISCV/RISCVGISelInteger.rccdesc
+++ b/backend/lib/Target/RISCV/RISCVGISelInteger.rccdesc
@@ -218,6 +218,42 @@ selection_rules:
root: true
operands: [{ operand: 0 }, { operand: 1 }, { operand: 2 }]
-
+ id: select_g_smulh_register
+ priority: 100
+ match:
+ opcode: G_SMULH
+ result_type: { kind: scalar, bits: 64 }
+ operand_types:
+ - { index: 1, kind: scalar, bits: 64 }
+ - { index: 2, kind: scalar, bits: 64 }
+ operand_banks:
+ - { index: 0, bank: GPR }
+ - { index: 1, bank: GPR }
+ - { index: 2, bank: GPR }
+ apply:
+ instructions:
+ - opcode: MULH
+ root: true
+ operands: [{ operand: 0 }, { operand: 1 }, { operand: 2 }]
+ -
+ id: select_g_umulh_register
+ priority: 100
+ match:
+ opcode: G_UMULH
+ result_type: { kind: scalar, bits: 64 }
+ operand_types:
+ - { index: 1, kind: scalar, bits: 64 }
+ - { index: 2, kind: scalar, bits: 64 }
+ operand_banks:
+ - { index: 0, bank: GPR }
+ - { index: 1, bank: GPR }
+ - { index: 2, bank: GPR }
+ apply:
+ instructions:
+ - opcode: MULHU
+ root: true
+ operands: [{ operand: 0 }, { operand: 1 }, { operand: 2 }]
+ -
id: select_g_sdiv_register
priority: 100
match: