Skip to content

Commit d08c584

Browse files
committed
[RISCV][llvm-exegesis] Disable pseudo instructions in allowAsBackToBack.
Prevents crashes trying to encode pseudo instuctions. Tested on HiFive Premier P550.
1 parent 99ab848 commit d08c584

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
@@ -124,6 +124,10 @@ class ExegesisRISCVTarget : public ExegesisTarget {
124124

125125
ArrayRef<unsigned> getUnavailableRegisters() const override;
126126

127+
bool allowAsBackToBack(const Instruction &Instr) const override {
128+
return !Instr.Description.isPseudo();
129+
}
130+
127131
Error randomizeTargetMCOperand(const Instruction &Instr, const Variable &Var,
128132
MCOperand &AssignedValue,
129133
const BitVector &ForbiddenRegs) const override;

0 commit comments

Comments
 (0)