Skip to content

Commit dd30aa8

Browse files
authored
[RISCV][TTI] Simplify compound check for readability [nfc] (llvm#121504)
I misread this check earlier today on a review, so restructure it to be easier to quickly scan.
1 parent bca92b1 commit dd30aa8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

+4-2
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)