[llvm] [RISCV][llvm-mca] Vector Unit Stride Loads and stores use EEW and EMU… (PR #69409)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 08:42:23 PDT 2023
================
@@ -185,6 +187,59 @@ RISCVInstrumentManager::createInstruments(const MCInst &Inst) {
return SmallVector<UniqueInstrument>();
}
+/// Return EMUL = (EEW / SEW) * LMUL
+inline static std::pair<unsigned, bool>
+getEMULEqualsEEWDivSEWTimesLMUL(unsigned EEW, unsigned SEW,
+ RISCVII::VLMUL VLMUL) {
+ // Calculate (EEW/SEW)*LMUL preserving fractions less than 1. Use GCD
+ // to put fraction in simplest form.
+ auto [LMUL, Fractional] = RISCVVType::decodeVLMUL(VLMUL);
----------------
michaelmaitland wrote:
I'm not sure what happened. I gave it a try and saw changes when I reran update_mca_test_checks. However, I gave it another try and it works fine. I will approve your PR since it comes with tests and is in a file where it can be reused. I will rebase this patch once merged. Thanks for the suggestion!!
https://github.com/llvm/llvm-project/pull/69409
More information about the llvm-commits
mailing list