[llvm-branch-commits] [RISCV] Support memcmp expansion for vectors (PR #114517)
Craig Topper via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Nov 3 21:26:20 PST 2024
================
@@ -2504,5 +2504,10 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const {
Options.LoadSizes = {8, 4, 2, 1};
else
Options.LoadSizes = {4, 2, 1};
+ if (IsZeroCmp && ST->hasVInstructions()) {
+ unsigned RealMinVLen = ST->getRealMinVLen() / 8;
+ for (int LMUL = 1; LMUL <= 8; LMUL *= 2)
----------------
topperc wrote:
Why do we want to limit this to LMUL>=1? Shouldn't we be able to do this for small vectors even when VLEN is large?
https://github.com/llvm/llvm-project/pull/114517
More information about the llvm-branch-commits
mailing list