Index: llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp =================================================================== --- llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp +++ llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp @@ -48,6 +48,13 @@ if (OtherOpcode == Instr->Description.getOpcode()) continue; const Instruction &OtherInstr = State.getIC().getInstr(OtherOpcode); + const MCInstrDesc &OtherInstrDesc = OtherInstr.Description; + // Ignore instructions that we cannot run. + if (OtherInstrDesc.isPseudo() || + OtherInstrDesc.isBranch() || OtherInstrDesc.isIndirectBranch() || + OtherInstrDesc.isCall() || OtherInstrDesc.isReturn()) { + continue; + } if (OtherInstr.hasMemoryOperands()) continue; if (Instr->hasAliasingRegistersThrough(OtherInstr, ForbiddenRegisters))