diff --git a/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp b/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp --- a/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp +++ b/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp @@ -81,7 +81,7 @@ << '\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;