diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-19 02:50:30 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-19 02:50:30 +0800 |
| commit | 6c97d54954112be9a5badacaec8efa1d05bd7d15 (patch) | |
| tree | 9eb4d5db7f05218759e6f6d49cf90ca65f1e53f8 /backend/lib/Target/RISCV/GISel | |
| parent | f5c592905e6e1ef4b78337d76c8215e543607b8d (diff) | |
| download | rcc-project-6c97d54954112be9a5badacaec8efa1d05bd7d15.tar.gz rcc-project-6c97d54954112be9a5badacaec8efa1d05bd7d15.tar.xz | |
[RISCV][GlobalISel] Generate indirect branch selection
Diffstat (limited to 'backend/lib/Target/RISCV/GISel')
| -rw-r--r-- | backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp b/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp index 1e2eb92..ce6400e 100644 --- a/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp +++ b/backend/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp @@ -478,8 +478,6 @@ public: return selectAtomicRMW(Instruction, Function, Target, Type, Generic); case GenericOpcode::G_FENCE: return selectFence(Instruction); - case GenericOpcode::G_BRINDIRECT: - return selectIndirectBranch(Instruction); case GenericOpcode::G_TRAP: case GenericOpcode::G_DEBUGTRAP: case GenericOpcode::G_UBSANTRAP: @@ -1198,19 +1196,6 @@ private: return Instruction.setOpcode(instructionOpcode(InstructionOpcode::FENCE)); } - [[nodiscard]] Expected<void> selectIndirectBranch(MachineInstr &Instruction) const { - auto Zero = physicalRegister(PhysicalRegisterID::X0); - if (!Zero) - return std::unexpected(Zero.error()); - auto Inserted = insertPhysicalRegister(Instruction, 0, *Zero, RegisterOperandFlag::Define); - if (!Inserted) - return std::unexpected(Inserted.error()); - auto Immediate = appendImmediate(Instruction, 0); - if (!Immediate) - return std::unexpected(Immediate.error()); - return Instruction.setOpcode(instructionOpcode(InstructionOpcode::JALR)); - } - [[nodiscard]] Expected<void> selectTrap(MachineInstr &Instruction) const { while (Instruction.operandCount() != 0) { auto Erased = Instruction.eraseOperand(Instruction.operandCount() - 1U); |
