diff --git a/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp b/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp index 989fde02592a..ada5905681d2 100644 --- a/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp +++ b/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp @@ -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;