================ @@ -2954,20 +2954,12 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const { } if (IsZeroCmp && ST->hasVInstructions()) { - unsigned RealMinVLen = ST->getRealMinVLen(); - // Support Fractional LMULs if the lengths are larger than XLen. - // TODO: Support non-power-of-2 types. - for (unsigned FLMUL = 8; FLMUL >= 2; FLMUL /= 2) { - unsigned Len = RealMinVLen / FLMUL; - if (Len > ST->getXLen()) - Options.LoadSizes.insert(Options.LoadSizes.begin(), Len / 8); - } - for (unsigned LMUL = 1; LMUL <= ST->getMaxLMULForFixedLengthVectors(); - LMUL *= 2) { - unsigned Len = RealMinVLen * LMUL; - if (Len > ST->getXLen()) - Options.LoadSizes.insert(Options.LoadSizes.begin(), Len / 8); - } + unsigned VLenB = ST->getRealMinVLen() / 8; + // The minimum size should be `XLen + 1`. ---------------- topperc wrote:
Comment doesn't match the code. Is it Xlen+1 or Xlen/8 + 1? https://github.com/llvm/llvm-project/pull/114971 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits