[libcxx] Mark test unsupported in clang-24 (#209794)
After the version bump, we started seeing this test fail. For now mark
it unsupported in newer LLVM versions, until the underlying issue can be
addressed. More details can be found in #209787.
[ConstraintElim] Try to get induction step/start/flags from IR (NFC-ish) (#209284)
Handle the common integer inductions where the increment is plain add
PN, C by looking at IR instead of querying SCEV. There's effectively no
re-use between SCEV expression created in ConstraintElimination, and
handling simple cases in IR can avoid unnecessary, expensive SCEV
queries.
Should be NFC-ish. We miss trivial folding of the start value (see
regressed test), but that should not happen in end-to-end pipeline.
Improves compile-time for some workloads, ClamAV, mafft:
https://llvm-compile-time-tracker.com/compare.php?from=b8ba3c2b72cb53268129bbecfeb4ba7ec5b8d831&to=2bede223d3ec3ed6e2e9654b635258c50e4e90df&stat=instructions%3Au
I am working on follow-up changes that will handle more cases, where
avoiding unnecessary queries will be more important.
PR: https://github.com/llvm/llvm-project/pull/209284
[compiler-rt] Fix asan_interceptors.cpp build warning -Wunused-template (#209750)
mmap_interceptor/munmap_interceptor template functions are instantiated
in sanitizer_common_interceptors.inc only under `#if
SANITIZER_INTERCEPT_MMAP`. Fix `unused function template
'mmap_interceptor'` warning on Windows, which is error under -Werror.
[msan] Handle AVX512 fpclass (floating-point classification) for packed double/float (#209652)
Each bit of the classifier constant specifies whether a particular
classifier is enabled. If Classifiers == 0 (no classifiers are enabled),
the output is trivially known to be zero, thus the output is fully
initialized.
Otherwise, each bit of the output is the bitwise OR of one or more
classifications; we approximate each bit of the output shadow based on
whether the corresponding input element is fully initialized (without
which the classification is potentially unknown). This is only
approximate, because some classifications do not rely on all the bits of
the input element.
This patch only handles packed double/single-precision floating-point.
Handling the scalar equivalents is more complicated because those
intrinsics encode a mask.
[LowerTypeTests] Avoid null dereference on invalid branch funnel operand (#204951)
On the linked issue, a null dereference happens when looping over`
ArrayRef<GlobalTypeMember *> Globals` at
`LowerTypeTestsModule::buildBitSetsFromDisjointSet()`. This stems from
the external globals in the IR which don't enter GlobalTypeMembers.
Following that, operator[] over the DenseMap returns null and it
propagates to the looped over GlobalTypeMember.
Prevent the null dereference via `.find()` and reporting fatal usage
error if it is not present. Add a negative regression test.
Additionally, the LangRef for the `@llvm.icall.branch.funnel` intrinsic
is missing (see #133635). It would also be nice to have a Verifier entry
for this intrinsic, and get rid of most report_fatal_error() in this
file since it's deprecated.
Fixes #191985
[2 lines not shown]
[compiler-rt][sanitizer_common] Fix setgroups syscall pre-hook to check its input (#209207)
# About
`PRE_SYSCALL(setgroups)`/`setgroups16` called `POST_WRITE` on their
`grouplist` argument, but grouplist is a read-only input the kernel
never writes. Under MSan, `POST_WRITE` maps to `__msan_unpoison`, so
annotating a raw setgroups(2) via the documented
`__sanitizer_syscall_pre_setgroups` hook silently marked an
uninitialized group list as initialized -- before the syscall even ran,
and even on failure -- masking a real use-of-uninitialized-value bug.
Under TSan it recorded a write range where a read belongs.
Use PRE_READ, matching every other input-only argument in this file
(e.g. sched_setparam). Add an MSan regression test.
[Clang] [Diagnostic] Extend DiagCompat() to C language modes (#209241)
This expands the compatibility warnings infrastructure added in #132348
to support C mode as well. Implementing this was actually fairly
straight-forward because we are only ever in C _or_ C++ mode, i.e.
during a single compilation we either emit only C compatibility warnings
or only C++ compatibility warnings. This means we can simply reuse the
existing code and just check for different LangOpts depending on whether
we're in C or C++ mode.
Concretely, this means that instead of e.g.
```
def ext_c2y_alignof_incomplete_array : Extension<
"'alignof' on an incomplete array type is a C2y extension">,
InGroup<C2y>;
def warn_c2y_compat_alignof_incomplete_array : Warning<
"'alignof' on an incomplete array type is incompatible with C standards "
"before C2y">, InGroup<CPre2yCompat>, DefaultIgnore;
[24 lines not shown]
[Object][GOFF] Recognize RLD and LEN records (#207118)
This patch adds explicit cases for RT_RLD and RT_LEN records when
parsing GOFF objects. These record types are not handled yet, but
recognizing them allows us to diagnose them and avoids teating them as
unexpected records.
AMDGPU: Convert tests to use subarch from triples in the file
This set was using target triple in the source rather than command
line arguments.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
AMDGPU: Migrate MIR parser tests to new subarch triples (59)
Mechanical migration by script.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
AMDGPU: Migrate more tests to using subarch triple commands (57) (#209817)
Mostly mechanical updates with some light cleanups manually
applied.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
[msan] Handle AVX512 mask.compress (#209654)
mask.compress selects elements from the first two operands according to
the mask; thus, we can propagate the shadow by applying the intrinsic to
the input shadows (with the mask unchanged i.e., trailingVerbatimArgs ==
1), using the forceIntegerIntrinsic option that was added in
https://github.com/llvm/llvm-project/pull/207053
deskutils/cfait: add new port
Cfait is a task manager / TODO list for people who want speed, efficiency, and
ownership of their data.
It connects to any standard CalDAV server (Radicale, Xandikos, Baikal,
Nextcloud, iCloud, etc.) so your tasks aren't locked inside a proprietary
walled garden.
You can use it comfortably from the command line (TUI) or on your desktop (GUI).
It's built "offline-first," so you can keep working without an internet
connection and Cfait will sync your changes the next time you go online.
PR: 295651
Submitted by: stephan at lichtenauer.co.za
AMDGPU: Migrate tests with regenerated checks to amdgpu subarch triple (54) (#209780)
Fold the explicit -mcpu subtarget into the amdgpu subarch triple on
autogenerated tests where the folded triple changes output relative to
the previous default subtarget (e.g. cost-model BASE lines, scheduling).
CHECK lines were regenerated with the update_*_test_checks.py scripts.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)