File tree Expand file tree Collapse file tree 3 files changed +3843
-29749
lines changed Expand file tree Collapse file tree 3 files changed +3843
-29749
lines changed Original file line number Diff line number Diff line change @@ -2495,9 +2495,13 @@ bool RISCVTTIImpl::isProfitableToSinkOperands(
24952495RISCVTTIImpl::TTI::MemCmpExpansionOptions
24962496RISCVTTIImpl::enableMemCmpExpansion (bool OptSize, bool IsZeroCmp) const {
24972497 TTI::MemCmpExpansionOptions Options;
2498- Options.AllowOverlappingLoads =
2499- ST->enableUnalignedScalarMem () &&
2500- (ST->hasStdExtZbb () || ST->hasStdExtZbkb () || IsZeroCmp);
2498+ // TODO: Enable expansion when unaligned access is not supported after we fix
2499+ // issues in ExpandMemcmp.
2500+ if (!(ST->enableUnalignedScalarMem () &&
2501+ (ST->hasStdExtZbb () || ST->hasStdExtZbkb () || IsZeroCmp)))
2502+ return Options;
2503+
2504+ Options.AllowOverlappingLoads = true ;
25012505 Options.MaxNumLoads = TLI->getMaxExpandSizeMemcmp (OptSize);
25022506 Options.NumLoadsPerBlock = Options.MaxNumLoads ;
25032507 if (ST->is64Bit ())
You can’t perform that action at this time.
0 commit comments