[all-commits] [llvm/llvm-project] ab2b7a: [NFC] Use logical && instead of bitwise & with a l...
ahradwan2-public via All-commits
all-commits at lists.llvm.org
Wed Sep 16 07:23:48 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ab2b7a8f930b5ea54a300efc512562770dccae79
https://github.com/llvm/llvm-project/commit/ab2b7a8f930b5ea54a300efc512562770dccae79
Author: ahradwan2-public <ahmedwahab1997 at gmail.com>
Date: 2026-09-16 (Wed, 16 Sep 2026)
Changed paths:
M llvm/include/llvm/CodeGen/MachineOperand.h
M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
Log Message:
-----------
[NFC] Use logical && instead of bitwise & with a logical NOT operand (#223798)
## Summary
Two spots computed `x & !y`, mixing a bitwise AND with a logical NOT:
* CodeGen: `MachineOperand::isKill()` — `IsDeadOrKill & !IsDef`
* OpenMP/Attributor: `AAExecutionDomainFunction::updateImpl` —
`StoredED.IsReachingAlignedBarrierOnly &
!IsEndAndNotReachingAlignedBarriersOnly`
In both cases all operands are booleans (1-bit bitfields / `bool`), so
the
computed value is unchanged. Switch to the logical AND (`&&`) to express
the
intended logical conjunction and restore short-circuiting.
NFC. Resolves CodeQL `cpp/incorrect-not-operator-usage` reports on these
lines.
#### Assisted-by: Cline
#### I don't have write access - please merge on my behalf once
approved. Thanks.
---------
Co-authored-by: Ahmed Radwan <ahradwan at amd.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list