[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
Wed Oct 18 06:16:53 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:

This doesn’t seem to work, but I will play with it and see if I can figure out how to do it using fixed point approach. 

https://github.com/llvm/llvm-project/pull/69409


More information about the llvm-commits mailing list