[llvm-mca][RISCV] Fix checking if data valid in createInstrument

Fixes createInstrument to return instrument when LMUL data is valid, and
return nullptr when LMUL data is not valid for RISCV target.

Differential Revision: https://reviews.llvm.org/D149068
This commit is contained in:
Michael Maitland 2023-04-24 07:53:56 -07:00
parent 98c3fd8480
commit 919382004f

View File

@ -81,7 +81,7 @@ RISCVInstrumentManager::createInstrument(llvm::StringRef Desc,
<< '\n');
return nullptr;
}
if (RISCVLMULInstrument::isDataValid(Data)) {
if (!RISCVLMULInstrument::isDataValid(Data)) {
LLVM_DEBUG(dbgs() << "RVCB: Bad data for instrument kind " << Desc << ": "
<< Data << '\n');
return nullptr;