[ARM] Bail out of MLAL/UMAAL combines when ADDE/SUBE flag is used (#232133)
SMLAL*, UMLAL, and UMAAL do not update condition flags. Combining
ADDC+ADDE into these instructions when Value(1) of ADDE/SUBE is used
forces the original multiply-add chain to remain alive alongside the
MLAL/UMAAL instruction just to compute the carry/overflow flag.
Assisted-by: Gemini
Link: #231702
[KnownFPClass] Use exact conditions to rule out NaN for fma (#235204)
Uses the exact conditions for ruling out NaN for `fma`.
`fma(LHS, RHS, Addend)` produces NaN if `0.0 * inf` or `inf * 0.0`
occurs, or when adding two *exact* infinities of the opposite sign. An
exact infinity requires at least one infinite operand.
The main improvement with this PR revolves around distinguishing exact
infinities from overflow.
Assuming that all arguments are non-NaN, there are three cases where
`fma` may be able to rule out NaN where `fmuladd` cannot:
1. LHS and RHS are not infinity.
2. LHS is not inf or zero.
3. RHS is not inf or zero.
For case 1, an exact infinity is impossible, so the result is never NaN.
[17 lines not shown]
[ConstraintElim] Link decompositions in doesHold (#234756)
Facts may be added for a variable before it can be decomposed.
Use the V == decompose(V) link rows that checkCondition already adds in
doesHold too,
so no-wrap and decomposition precondition queries can use those facts.
The rows are pushed and popped by a scoped helper.
compile time: not much effect.
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1795
corpus diff: some new nuw' in IR.
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1796
PR #231681, exposed need for looking up link rows.
[AMDGPU] Exit scale_offset matchers early
Return false as soon as the shift or multiply fails to match, so the
new wrap checks do not need to test ScaleOffset again. No functional
change.
[Objective-C][TSan] Do not emit fused ARC calls under TSan at -O0 to detect races on __strong refs (#235150)
At -O0, Clang normally emits fused @llvm.objc.storeStrong calls for
__strong assignments instead of expanding them into retain, load, store,
and release (which it does at -O1 and above). Because TSan does not
instrument @llvm.objc.storeStrong, races on __strong references were
missed at -O0.
This patch makes shouldUseFusedARCCalls() return false when TSan is
enabled so that standard TSan load/store instrumentation makes the race
detectable.
Assisted by LLMs
rdar://35283534
[profile] Handle failed target probes in test configuration (#238086)
The Android sanitizer build can fail while loading the profile test
configuration when the `--print-targets` probe fails.
Check that the probe returned text before searching for the AMDGPU
backend. This lets test setup continue when the optional probe fails.
Buildbot failure: https://lab.llvm.org/buildbot/#/builders/186/builds/3988
udp6: make udp6_ctlinput() same as IPv4 version
Processing an incoming ICMPv6 we need to find just the matching inpcb and
call udp_notify() on it.
The call to in6_pcbnotify() at the first glance seems like a notifying
sweep across the entire database, but it is not. It finds just the
matching inpcb, but does that in the most inefficient way! The added test
case proves that ICMPv6 processing stays the same before and after the
change. This weird use of in6_pcbnotify() can be tracked down all the way
to the initial KAME code.
Reviewed by: tuexen, gallatin
Differential Revision: https://reviews.freebsd.org/D60967
[CMake] Export an analysis_gen placeholder for standalone builds (#238096)
Clang CodeGen depends on analysis_gen after f016606b2b3d. When Clang
builds against an installed LLVM package, the generated analysis headers
are already installed, but their generation target is absent from the
exported CMake configuration.
Assisted-by: OpenAI Codex
[CIR] Implement support for MatrixElementExpr (#235497)
Implement support for the MatrixElementExpr that performs extract to
return element, the other version that returns row will be implemented
in a follow-up
editors/openoffice-*: system lucene cleanup
Delete the remaining remnants of the system lucene dependency.
Reported by: Ronald Klop <ronald-lists at klop.ws>
[KnownFPClass] Rule out zero and infinite results for fmul and fdiv (#237480)
Follow-up to https://github.com/llvm/llvm-project/pull/231052
Allows `KnownFPClass::fmul` and `KnownFPClass::fdiv` to more precisely
rule out zero/inf results of a particular sign. For example, `fmul(nzero
| positive, nzero | positive)` will never be negative infinity.
These changes also allow `1.0 / sqrt(x)` to rule out `-0.0`.
AI Disclosure:
I used Claude Opus 5 to help write the tests.
Fix defaulted postfix operators defined out of line in class templates
Perform the unqualified lookup of the prefix operator when an
out-of-line definition is defaulted in a dependent context, and transfer
it to the instantiation. Decide whether the function is defaulted on its
first declaration from the defaulted definition it is instantiated from,
so an instantiation that would be deleted is diagnosed instead of being
silently deleted.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[Clang][CodeGen] Fix volatile and size of inline asm struct output stores (#236708)
There are two issues fixed by this PR: one where 'volatile' is dropped
and the other where an output tied to a larger input is stored
out-of-bounds:
- Struct outputs returned as integers are stored through an unqualified
integer lvalue. Two writes to a volatile struct collapse into one
non-volatile store at -O2.
- A tied input larger than the output makes the asm return the input's
type, and the whole value is stored, resulting in an out-of-bounds
write.
Fix these by propagating the 'volatile' qualifier correctly and storing
only the destination's bits instead of relying upon the input's size.
Assisted-by: Claude Opus 5.5
databases/opendbviewer: Migrate to Qt6
The following issues were resolved during the switch:
- Upstream CMake files cannot find FreeBSD's nested Qt libraries
- add_definitions() leaks unresolved generator expressions into
build.ninja
- Install paths do not follow the ports framework
Approved by: arrowd (co-mentor)
Approved by: makc (mentor)
(cherry picked from commit cb610e1fede9cfe21fc7b85b7b161417db0691e6)
databases/opendbviewer: Migrate to Qt6
The following issues were resolved during the switch:
- Upstream CMake files cannot find FreeBSD's nested Qt libraries
- add_definitions() leaks unresolved generator expressions into
build.ninja
- Install paths do not follow the ports framework
Approved by: arrowd (co-mentor)
Approved by: makc (mentor)
tests/sys/file: add tests for the lowest fd after fork
fdcopy() skips plain kqueues and close-on-fork descriptors when it
copies the table into the child. Check that dup(2) in the child still
returns the lowest unused descriptor, both when the skipped descriptor
is the lowest free slot and when it sits above an existing hole.
Test cases:
kqueue_no_hole a plain kqueue is the lowest descriptor; the
child's dup() reuses its slot
kqueue_two two adjacent plain kqueues; the child's dup()
returns the lower one
kqueue_above_hole a plain kqueue sits above a closed descriptor;
the child's dup() returns the hole
kqueue_cponfork a KQUEUE_CPONFORK kqueue is copied; the child's
dup() returns the next slot
clofork_no_hole an O_CLOFORK descriptor is the lowest one; the
child's dup() reuses its slot
[12 lines not shown]
[AMDGPU][NFC] Clean up pre-gfx125x test RUN lines
Drop flags that match defaults: -verify-machineinstrs in .ll tests,
-global-isel=0 in tests without a GlobalISel run, and redundant
-global-isel-abort. Use subarch triples instead of amdgcn plus -mcpu.
Error-only MC runs use -filetype=null.
Change-Id: Ic8e2469780e32dbe204a032fcf9d91a1e8b737d2
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU][NFC] Clean up gfx125x test RUN lines
Drop flags that match defaults: -verify-machineinstrs in .ll tests,
-global-isel=0 in tests without a GlobalISel run, and redundant
-global-isel-abort. Use subarch triples instead of amdgcn plus -mcpu.
Error-only MC runs use -filetype=null.
Change-Id: I22e9cf71556173486cd9bbed4123ee4644dd1cd8
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>