Revert "[clang] fix matching constrained out-of-line definitions of class specialization member function templates" (#193558)
Reverts llvm/llvm-project#192806 , which is causing the compiler to
reject some valid code.
Loosen check for clang version string in test to work when setting CLANG_VENDOR. (#192961)
We are trying to update our buildbot to use the `-DCLANG_VENDOR` and
`-DCLANG_VENDOR_UTI` options, but need to fix some tests first. This is
one of them.
---------
Co-authored-by: Jannick Kremer <jannick.kremer at mailbox.org>
Co-authored-by: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
IR: Allow !fpmath metadata on homogeneous float structs
This matches the logic for fast math flags / nofpclass, and allows
marking llvm.sincos calls with !fpmath.
[GlobalISel] Change SSUBO to do (LHS < RHS) XOR (RESULT < 0) (#191744)
Refactor lowerSADDO_SSUBO in LegalizerHelper so addition and subtraction
use separate, clearly named paths.
SADDO: unchanged meaning: overflow when (result < LHS) disagrees with
(RHS < 0) (signed compares).
SSUBO: use the equivalent formulation: overflow when (LHS < RHS)
disagrees with (result < 0) instead of (result < LHS) vs (RHS > 0).
[libc] Replace check-libc with lit-based test execution (#184163)
Now that check-libc-lit has been validated alongside check-libc, make
lit the default test runner by renaming check-libc-lit to check-libc.
Remove the old CMake-driven check-libc custom target.
[VPlan] Use MaxRuntimeStep in materializeVectorTC to simplify middle br. (#193067)
For scalable vectors, pass the maximum runtime step to
materializeVectorTripCount. Use it to simplify the vector trip count to
the original trip count directly, if MaxRuntimeSteps divides the
original trip count without remainder.
In those cases, all lower power-of-2 vscales will divide the rip count
without remainder.
PR: https://github.com/llvm/llvm-project/pull/193067
[compiler-rt] [Darwin] Enable arm64e tests on macOS (#193391)
This enables compiler-rt tests on Darwin arm64e (when supported by the
linker).
Note that arm64e is not enabled for sanitizers yet, but this does add
test coverage for builtins.
rdar://175303507
[NFC][MachineBlockHashInfo] Add static asserts to guard agains hash_16_bytes changes (#192862)
`hashing::detail::hash_16_bytes` is not guaranteed to be stable across
different versions of LLVM, it can change any time.
We put asserts here, so if it changed, author don't forget to work
around them here.
Revert "[SelectionDAG] Salvage debuginfo when combining load and z|s ext instrs. (#188544)" (#193554)
This reverts commit fe5d5b762ab3b92b18b56f413965abb81a459ac6.
Reverted because of https://github.com/llvm/llvm-project/issues/193475
clang crashes on valid code at -O{2,3} on x86_64-linux-gnu: Assertion
`N->getOpcode() != ISD::DELETED_NODE && "DELETED_NODE in CSEMap!"'
failed
[lldb] Scope symbol lookups to specific modules in ObjC/SystemRuntime plugins (#193379)
This narrows `FindSymbolsWithNameAndType` calls from searching all
loaded images to the specific module that owns the symbol (Foundation,
CoreFoundation, libBacktraceRecording.dylib).
The arclite fallback in `CalculateHasNewLiteralsAndIndexing` still
searches all images because libarclite is a static library linked into
the main executable.
[Runtimes] Allow HandleLibc.cmake to be called multiple times (#193540)
Summary:
This needs to check to see if it's already been called now that we want
to use it more places than just libcxx.
17994 Duplicate link entries accumulate in devlink database without bound
Reviewed by: Robert Mustacchi <rm at fingolfin.org>
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Dan McDonald <danmcd at edgecast.io>
18000 tty group id should use a named constant from sys/param.h
Reviewed by: Robert Mustacchi <rm at fingolfin.org>
Reviewed by: Andrew Stormont <andyjstormont at gmail.com>
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Approved by: Dan McDonald <danmcd at edgecast.io>
linuxkpi: Define `DIV_U64_ROUND_UP()`
It is the same as `DIV64_U64_ROUND_UP()` but takes a 32-bit integer as
the divisor.
The amdgpu DRM driver started to use this in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56576
linuxkpi: Add `rb_add()`
It is the same as `rb_add_cached()` but it works on `struct rb_root`, not
a `struc rb_root_cached`. It also does not return anything.
The DRM generic code started to use this in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56577
linuxkpi: Add `register_pm_notifier()` and `unregister_pm_notifier()`
They are empty stub returning success for now, like the previously
defined stubs in this header.
Several constant are also defined in the process.
The amdgpu DRM driver started to use them in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56572
linuxkpi: Add `atomic_read_acquire()`
This function calls `raw_atomic_read_acquire()` which is also added.
They are located in <linux/atomic/*.h> headers, both included from
<linux/atomic.h>.
The amdgpu DRM driver started to use this in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56573
linuxkpi: Define `system_state`
This is a global variable used to track the state of the system, like
booting, running, halting and so on.
This variable is based on the `enum system_states` enumeration.
For now, always set `system_state` to `SYSTEM_RUNNING`.
The amdgpu DRM driver started to use this in Linux 6.12.x.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56575
linuxkpi: Define a guard for the `mutex` type
The amdgpu DRM driver started to use `guard(mutex)` in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56571
linuxkpi: Add `mem_is_zero()`
The DRM generic code and the i915 DRM driver started to replace the use
of `memchr_inv()` by a `mem_is_zero()` in Linux 6.12. We reuse the
previous use of `memchr_inv()` to implement `mem_is_zero()`.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56442
linuxkpi: <asm/unaligned.h> is moved to <linux/unaligned.h> in Linux 6.12
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56454
linuxkpi: Add `kmemdup_array()`
It is similar to `kmemdup()` but takes a number of elements to duplicate
and their size.
The i915 DRM driver started to use it in Linux 6.12.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56444
linuxkpi: Add more `struct folio`-related functions
The i915 DRM driver started to replace the use of `struct page` by
`struct folio` in its GEM shmem code in Linux 6.12.
linuxkpi were missing a few more functions: `kmap_local_folio()`,
`memcpy_to_folio()` and `offset_in_folio()`. They are equivalent of
their `struct page` counterparts.
One difference is that `kmap_local_folio()` takes an offset argument and
the returned address takes this offset into account.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56438
linuxkpi: Define `fd_file()`
This macro simply returns the `file` field of the `struct fd`.
The DRM generic code and the amdgpu driver started to use it in
Linux 6.12.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56440
linuxkpi: Add `struct kmsg_dump_detail`
This structure is used in a modified definition of `struct kmsg_dumper`
field `dump` in Linux 6.12. Therefore this field has two definitions put
behind the values of `LINUXKPI_VERSION`.
The DRM generic code started to use it in Linux 6.12.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56433
[LegalizeTypes][DAG] Use SHL(X,1) instead of ADD(X,X) for variable vector indices for extraction/insertion legalization (#188277)
Avoid ADD(X,X) as it doesn't correctly handle undef elements and helps avoid some FREEZE() fold headaches
Resurrects #86857