================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to