[llvm] [RISCV][TTI] Simplify compound check for readability [nfc] (PR #121504)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 09:09:42 PST 2025


================
@@ -2558,8 +2558,10 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const {
   TTI::MemCmpExpansionOptions Options;
   // TODO: Enable expansion when unaligned access is not supported after we fix
   // issues in ExpandMemcmp.
-  if (!(ST->enableUnalignedScalarMem() &&
-        (ST->hasStdExtZbb() || ST->hasStdExtZbkb() || IsZeroCmp)))
+  if (!ST->enableUnalignedScalarMem())
+    return Options;
+
+  if (!(ST->hasStdExtZbb() || ST->hasStdExtZbkb() || IsZeroCmp))
----------------
topperc wrote:

deMorgan this?

https://github.com/llvm/llvm-project/pull/121504


More information about the llvm-commits mailing list