[llvm-branch-commits] [llvm] [RISCV] Support memcmp expansion for vectors (PR #114517)
Luke Lau via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jun 12 02:50:58 PDT 2025
================
@@ -2952,5 +2952,22 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const {
Options.LoadSizes = {4, 2, 1};
Options.AllowedTailExpansions = {3};
}
+
+ if (IsZeroCmp && ST->hasVInstructions() && ST->enableUnalignedVectorMem()) {
----------------
lukel97 wrote:
Do we still need the enableUnalignedVectorMem check? If I'm understanding this right MemcmpExpand will generate a scalar which should be ok because we check for enableUnalignedScalarMem.
And then in the new combine we're not actually changing the load at all. There must be some other existing combine which is converting the scalar load to a vector load, which should be respecting alignment?
https://github.com/llvm/llvm-project/pull/114517
More information about the llvm-branch-commits
mailing list