[CodeGen] Preserve big-endian trunc in concat_vectors (#190701)
A transform from `concat_vectors(trunc(scalar), undef)` to
`scalar_to_vector(scalar)` is only equivalent for little-endian targets.
On big-endian, that would put the extra upper bytes ahead of the desired
truncated bytes. This problem was seen on Rust s390x in [RHEL-147748].
[RHEL-147748]: https://redhat.atlassian.net/browse/RHEL-147748
Assisted-by: Claude Code
(cherry picked from commit 5df89ae3da8b24804c17479ce74a930783db045e)
[LLD] [COFF] Fix crashes for conflicting exports with -export-all-symbols (#190492)
Commit adcdc9cc3740adba3577b328fa3ba492cbccd3a5 (since LLD 17) added a
warning message if there are conflicting attempts to export a specific
symbol.
That commit missed one source of exports, from the LLD specific
-export-all-symbols flag (which only has an effect in mingw mode).
To trigger this case, one needs to have an export set by a def file,
combined with the -export-all-symbols flag (which attempts to export all
global symbols, despite explicit exports through embedded directives or
a def file).
To trigger the warning (and the previous crash), one would have to have
some difference between the export produced by -export-all-symbols and
the one from the def file. That difference could be e.g. that the def
file contained an explicit ordinal, or that the def file lacked a DATA
marking for a symbol that the automatic export of all symbols decides to
[7 lines not shown]
[MC] Track per-section inner relaxation iterations and add convergence test (#191121)
Count inner iterations (max across sections) instead of outer relaxOnce
calls. This more accurately reflects the work done during relaxation.
Add a test that verifies boundary alignment convergence may require
O(N) iterations where N is the number of BoundaryAlign fragments.
This will be fixed by #190318
[AArch64] Avoid expensive getStrictlyReservedRegs calls in isAnyArgRegReserved (#190957)
`AArch64RegisterInfo::isAnyArgRegReserved` is used during call lowering
across all instruction selectors (SDAG, GISel, FastISel) to emit an
error if any of the arg registers (x0-x7) are reserved. This puts
`AArch64RegisterInfo::getStrictlyReservedRegs` which computes this in
the hot-path and it shows up in compile-time profiles since it's
computed for every call.
As the intent was to guard against using +reserve-x{0-7} with function
calls we can instead call `isXRegisterReserved` which is faster since
it's a simple BitVector lookup.
Compile-time improves across all instruction selectors on CTMark:
geomean
SDAG ~ -0.14%
GISel ~ -0.6%
FastISel ~ -0.7% (measured locally)
[12 lines not shown]
[test] Add MC relaxation stretch tests (#191118)
Verify:
- ARM tLDRpci instructions don't spuriously widen to t2LDRpci when
upstream branches relax, which would push cbz targets out of range.
This would catch the #184544 regression.
- CSKY lrw16 instructions don't spuriously widen to lrw32 when
upstream branches relax. Similar to ARM.
ui: use space in apply box for the apply reminder
We could extend this a bit if we want to go this way.
It's the best way to use existing space and move the
message to where it matters most -- the apply button
itself.
I'm not entirely sure about coloring. We could instead
make the whole box change color similar to what alerts
are doing.
pull across genmatch.cc fixes from newer gcc / netbsd 11's gcc 12.
Ports for changes from mainline that reduces the size of the output
of genmatch.cc consumers by about 1/3rd, and similar savings in
compiling this file (which is the longest single compile for GCC.)
hashes from GCC git:
75cda3be0232f745cda4e177d514f6900390af0b
580cda3c2799b1f8323af770e52f1eb0fa204718
e487fcc0f7466ea663a0fea52076337bebd42b8b
c0ce29bc1ce329001b6c02bb3d34bcbb086e1b72
also see:
https://mail-index.netbsd.org/source-changes/2026/03/27/msg161209.html
tested on amd64, arm64, sparc, and powerpc. should also help vax,
but i haven't gotten there yet. mostly, this makes it possible to
build gcc12 on smaller hosts, by reducing the max-size needed for
[5 lines not shown]
[orc-rt] Simplify notification service construction in Session. NFC. (#191113)
We can replace the addNotificationService method with a call to the
generic createService method that was introduced in 98ccac607a9ff.
[Clang] [MinGW] Handle `-nolibc` argument (#182062)
This implementation differs from GCC, but arguably more in line with
Unix systems, because it stops linking of default Win32 system
libraries.
On GCC it works like this:
```
❯ /ucrt64/bin/gcc -### /dev/null -nolibc 2>&1 | tr ' ' '\n' | rg '^\-l' | sort -u
-lgcc
-lgcc_eh
-lkernel32
-lmingw32
-lmingwex
-lmsvcrt
❯ /ucrt64/bin/gcc -### /dev/null 2>&1 | tr ' ' '\n' | rg '^\-l' | sort -u
-ladvapi32
-lgcc
[21 lines not shown]
[orc-rt] Add comment about Session::waitForShutdown usage. NFC. (#191111)
Add a warning not to call Session::waitFromShutdown from on-detach or
on-shutdown handlers.
libunistring: update to 1.4.2.
New in 1.4.2:
* Fixed a build failure on systems with glibc 2.43.
New in 1.4.1:
* Fixed a compilation error in C++ mode.
New in 1.4:
* The data tables and algorithms have been updated to Unicode version 17.0.0.
* Fixed a bug: The functions u*_grapheme_next and u*_grapheme_prev did not
work right for strings with Indic characters, Emojis, or regional indicators.
New in 1.3:
* The data tables and algorithms have been updated to Unicode version 16.0.0.
* New function
uc_is_property_modifier_combining_mark
and new constant
UC_PROPERTY_MODIFIER_COMBINING_MARK.
[2 lines not shown]