[llvm] [RISCV] Prefer VLS over VLA if costs are equal (PR #100564)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 09:35:25 PDT 2024
topperc wrote:
Is the cost affected by Zvl*b? I see in the test case, SCALABLE is LMUL=2 vectorization. For FIXED, we use LMUL=2 registers, but VL=8. If the runtime VLEN is greater than 128 the scalable code will be able to process more elements per iteration.
If the microarchitecture doesn't dynamically reduce LMUL based on VL, then the FIXED code will waste resources with VLEN > 128 since all 8 elements will fit in half of an LMUL=2 register.
https://github.com/llvm/llvm-project/pull/100564
More information about the llvm-commits
mailing list