Skip to content

Commit a39d0fc

Browse files
chenqiangerekon
authored andcommitted
fix: add ESP_VST_128_IP isSchedulingBoundary because instruction scheduling causes register erros
1 parent 471ce13 commit a39d0fc

File tree

3 files changed

+231
-217
lines changed

3 files changed

+231
-217
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4953,3 +4953,15 @@ bool RISCVInstrInfo::isHighLatencyDef(int Opc) const {
49534953
return true;
49544954
}
49554955
}
4956+
4957+
bool RISCVInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
4958+
const MachineBasicBlock *MBB,
4959+
const MachineFunction &MF) const {
4960+
if (MI.getOpcode() == RISCV::ESP_VST_128_IP ||
4961+
MI.getOpcode() == RISCV::ESP_VST_L_64_IP ||
4962+
MI.getOpcode() == RISCV::ESP_VST_H_64_IP ||
4963+
MI.getOpcode() == RISCV::ESP_VLDBC_8_IP ||
4964+
MI.getOpcode() == RISCV::ESP_ZERO_Q)
4965+
return true;
4966+
return TargetInstrInfo::isSchedulingBoundary(MI, MBB, MF);
4967+
}

llvm/lib/Target/RISCV/RISCVInstrInfo.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ class RISCVInstrInfo : public RISCVGenInstrInfo {
140140
bool
141141
reverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override;
142142

143+
bool isSchedulingBoundary(const MachineInstr &MI,
144+
const MachineBasicBlock *MBB,
145+
const MachineFunction &MF) const override;
146+
143147
bool optimizeCondBranch(MachineInstr &MI) const override;
144148

145149
MachineBasicBlock *getBranchDestBlock(const MachineInstr &MI) const override;

0 commit comments

Comments
 (0)