[llvm] [RISCV][llvm-mca] Vector Unit Stride Loads and stores use EEW and EMU… (PR #69409)
Wang Pengcheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 01:16:32 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);
----------------
wangpc-pp wrote:
Why is fixed point approach not working? I tried it, it can calculate the right EMUL, see #69570.
https://github.com/llvm/llvm-project/pull/69409
More information about the llvm-commits
mailing list