[llvm] 9193820 - [llvm-mca][RISCV] Fix checking if data valid in createInstrument
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 26 16:53:55 PDT 2023
Author: Michael Maitland
Date: 2023-04-26T16:53:14-07:00
New Revision: 919382004f4e3bd08a25fd8a8dbd3b4b1e5dc9fa
URL: https://github.com/llvm/llvm-project/commit/919382004f4e3bd08a25fd8a8dbd3b4b1e5dc9fa
DIFF: https://github.com/llvm/llvm-project/commit/919382004f4e3bd08a25fd8a8dbd3b4b1e5dc9fa.diff
LOG: [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
Added:
Modified:
llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp b/llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp
index 989fde02592a1..ada5905681d2f 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;
More information about the llvm-commits
mailing list