Skip to content

Commit 5e138c2

Browse files
preamesgithub-actions[bot]
authored andcommitted
Automerge: [RISCV][TTI] Simplify compound check for readability [nfc] (#121504)
I misread this check earlier today on a review, so restructure it to be easier to quickly scan.
2 parents 00f7d74 + dd30aa8 commit 5e138c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2558,8 +2558,10 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const {
25582558
TTI::MemCmpExpansionOptions Options;
25592559
// TODO: Enable expansion when unaligned access is not supported after we fix
25602560
// issues in ExpandMemcmp.
2561-
if (!(ST->enableUnalignedScalarMem() &&
2562-
(ST->hasStdExtZbb() || ST->hasStdExtZbkb() || IsZeroCmp)))
2561+
if (!ST->enableUnalignedScalarMem())
2562+
return Options;
2563+
2564+
if (!ST->hasStdExtZbb() && !ST->hasStdExtZbkb() && !IsZeroCmp)
25632565
return Options;
25642566

25652567
Options.AllowOverlappingLoads = true;

0 commit comments

Comments
 (0)