aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/Target/RISCV/GISel
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-16 18:11:01 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-16 18:11:01 +0800
commit46361bea1f4b1483780d91e4d60d6f44cf0b5706 (patch)
treebcda84d6fba958eaa7b17330037d0da86aa940ce /backend/lib/Target/RISCV/GISel
parent6c7422accb0964d37bb826e3fb798f2d86ca3b42 (diff)
downloadrcc-project-46361bea1f4b1483780d91e4d60d6f44cf0b5706.tar.gz
rcc-project-46361bea1f4b1483780d91e4d60d6f44cf0b5706.tar.xz
[RISCV][GlobalISel] Generate pointer arithmetic selections
Diffstat (limited to 'backend/lib/Target/RISCV/GISel')
-rw-r--r--backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp b/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
index edf0b40..08e9f6c 100644
--- a/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
+++ b/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
@@ -203,8 +203,6 @@ public:
case GenericOpcode::G_SHL:
case GenericOpcode::G_LSHR:
case GenericOpcode::G_ASHR:
- case GenericOpcode::G_PTR_ADD:
- case GenericOpcode::G_PTRMASK:
case GenericOpcode::G_CONSTANT:
if (!Integer())
return makeUnexpected(ErrorCode::Unsupported,
@@ -311,9 +309,6 @@ public:
const GenericOpcode Generic = static_cast<GenericOpcode>(Instruction.opcode().value());
const std::optional<LowLevelType> Type = resultType(Function, Instruction);
- const auto SelectDirect = [&Instruction](InstructionOpcode Selected) {
- return Instruction.setOpcode(instructionOpcode(Selected));
- };
switch (Generic) {
case GenericOpcode::G_ADD:
return selectIntegerBinary(Instruction, Function, Type, InstructionOpcode::ADD,
@@ -379,10 +374,6 @@ public:
return selectNormalizedIntegerBinary(
Instruction, Function, Target, Type, InstructionOpcode::SRA, InstructionOpcode::SRAW,
true, false, InstructionOpcode::SRAI, InstructionOpcode::SRAIW, false, 6, 5);
- case GenericOpcode::G_PTR_ADD:
- return SelectDirect(InstructionOpcode::ADD);
- case GenericOpcode::G_PTRMASK:
- return SelectDirect(InstructionOpcode::AND);
case GenericOpcode::G_LOAD:
return selectLoad(Instruction, Function, Type);
case GenericOpcode::G_SEXTLOAD: