Skip to content

Commit 736f1d2

Browse files
committed
[RISCV][TTI] Simplify compound check for readability [nfc]
I misread this check earlier today on a review, so restructure it to be easier to quickly scan.
1 parent 6840521 commit 736f1d2

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)