Skip to content

Commit 0d6ed83

Browse files
committed
[NFC] reorder AND to check cheaper condition first
1 parent ec73441 commit 0d6ed83

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/Target/AArch64/AArch64StackTagging.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,10 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) {
542542
// function return. Work around this by always untagging at every return
543543
// statement if return_twice functions are called.
544544
bool StandardLifetime =
545+
!SInfo.CallsReturnTwice &&
545546
SInfo.UnrecognizedLifetimes.empty() &&
546547
memtag::isStandardLifetime(Info.LifetimeStart, Info.LifetimeEnd, DT, LI,
547-
ClMaxLifetimes) &&
548-
!SInfo.CallsReturnTwice;
548+
ClMaxLifetimes);
549549
if (StandardLifetime) {
550550
IntrinsicInst *Start = Info.LifetimeStart[0];
551551
uint64_t Size =

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,10 +1455,10 @@ bool HWAddressSanitizer::instrumentStack(memtag::StackInfo &SInfo,
14551455
// function return. Work around this by always untagging at every return
14561456
// statement if return_twice functions are called.
14571457
bool StandardLifetime =
1458+
!SInfo.CallsReturnTwice &&
14581459
SInfo.UnrecognizedLifetimes.empty() &&
14591460
memtag::isStandardLifetime(Info.LifetimeStart, Info.LifetimeEnd, &DT,
1460-
&LI, ClMaxLifetimes) &&
1461-
!SInfo.CallsReturnTwice;
1461+
&LI, ClMaxLifetimes);
14621462
if (DetectUseAfterScope && StandardLifetime) {
14631463
IntrinsicInst *Start = Info.LifetimeStart[0];
14641464
IRB.SetInsertPoint(Start->getNextNode());

0 commit comments

Comments
 (0)