Skip to content

Commit 4c2e4ea

Browse files
authored
[RISCV][llvm-exegesis] Disable pseudo instructions in allowAsBackToBack. (#122986)
Prevents crashes trying to encode pseudo instuctions. Tested on HiFive Premier P550. Fixes #122974
1 parent 8ac00ca commit 4c2e4ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ class ExegesisRISCVTarget : public ExegesisTarget {
122122

123123
ArrayRef<unsigned> getUnavailableRegisters() const override;
124124

125+
bool allowAsBackToBack(const Instruction &Instr) const override {
126+
return !Instr.Description.isPseudo();
127+
}
128+
125129
Error randomizeTargetMCOperand(const Instruction &Instr, const Variable &Var,
126130
MCOperand &AssignedValue,
127131
const BitVector &ForbiddenRegs) const override;

0 commit comments

Comments
 (0)