[AMDGPU][GlobalIsel] Add regbank support for amdgcn_cvt_scalef32_sr_f8_f16/32 (#197031)
This patch adds register bank legalization rules for amdgcn_cvt_scalef32_sr_f8_f16/32 intrinsics in the AMDGPU GlobalISel
pipeline.
[libc++] Fix multi{map,set}::extract not returning the first matching element (#199703)
According to [associative.reqmts] `extract(k)` returns the _first_
element in the container with key equivalent to k.
[Clang][Sema] Use correct DeclContext when checking 'this' (#163243)
As mentioned in #163089, clang crashes for the following inputs:
```cpp
struct S {
static void f() {
auto x = []() -> decltype(this) {};
}
};
```
```cpp
struct S {
static void f() {
auto x = []() noexcept(decltype(this)()) {};
}
};
```
[6 lines not shown]
[InstCombine] Fold zext into de-interleaving (factor=2) instructions (#195330)
Given the following de-interleaving shufflevectors and the consuming
zexts:
```
%f0 = shufflevector <8 x i32> %v, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
%f1 = shufflevector <8 x i32> %v, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
%z0 = zext <4 x i32> %f0 to <4 x i64>
%z1 = zext <4 x i32> %f1 to <4 x i64>
```
We can actually bitcast the input value, `%v`, first into a vector type
with double the element size but half the vector length, before
replacing zexts with simple arithmetics on this new bitcast:
```
%bc = bitcast <8 x i32> %v to <4 x i64>
%z0 = and <4 x i64> %bc, splat (i64 4294967295)
%z1 = lshr <4 x i64> %bc, splat (i64 32)
```
This transformation is almost always benefitial as shufflevector is
generally more expensive than normal arithmetics.
[LifetimeSafety] Add fix-it for misplaced lifetimebound attributes (#199149)
This patch adds a fix-it hint for
`warn_lifetime_safety_intra_tu_misplaced_lifetimebound` and
`warn_lifetime_safety_cross_tu_misplaced_lifetimebound` to the
appropriate declaration.
The fix-it attribute is emitted in the correct location, accounting for
pure virtual functions, overrides, trailing return types, and default
arguments. The message is suppressed for macros.
Resolves #198634
NAS-141181 / 26.0.0-RC.1 / fix vseries rear nvme bay mapping (by yocalebo) (#19031)
When this platform is fully populated a pci device can hang off root
port tree causing the existing logic for mapping the rear nvme bays to
be off by 1. This changes the logic to map similar to what was done in
5cd50ecebf5aa679e06f71d54177176ecf2a7a98
Original PR: https://github.com/truenas/middleware/pull/19026
---------
Co-authored-by: caleb <yocalebo at gmail.com>
NAS-141181 / 27.0.0-BETA.1 / fix vseries rear nvme bay mapping (#19026)
When this platform is fully populated a pci device can hang off root
port tree causing the existing logic for mapping the rear nvme bays to
be off by 1. This changes the logic to map similar to what was done in
5cd50ecebf5aa679e06f71d54177176ecf2a7a98
x86: for wrmsr_early_safe(), catch all exceptions, not only #GP
Reviewed by: olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57264
ctld: More consistent error messages
The error messages ctld emits when it finds a port or LUN it did not
create were inconsistent with each other as well as with ctld's other
error messages.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D57270
[libc] Implement towupper and towlower entrypoints (#198659)
Following up on #187670 to add public entrypoints for the wctype
conversion functions.
Assisted-by: Automated tooling, human reviewed.
---------
Co-authored-by: Muhammad Bassiouni <60100307+bassiounix at users.noreply.github.com>
[libc] Don't touch str_end in strto* and wcsto* functions when base is incorrect (#200073)
Updates the behavior of `stro*` and `wcsto*` endpoints to not touch
`str_end` pointer when the provided value of `base` is incorrect and
errno is set to `EINVAL`.
`strto*` and `wcsto*` functions accept `base` as an input argument,
which can only be 0 or lie in [2,36] range. In case of invalid argument,
the functions should return 0 and set errno accordingly. Should the
"output argument" of `str_end` be updated in this case to point to the
beginning of the input string?
* C standard is unclear about it -
is says that `str` should be stored in `str_end` **if `str` is empty or
does not have the expected form** -- but there is no "expected form" for
invalid base values.
* POSIX standard explicitly mentions that for incorrect base value errno
should be set to `EINVAL` and points out that the value of `str_end`
is **unspecified** in this case.
[10 lines not shown]
[clang] fix getTemplateInstantiationArgs
This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the template
context of out-of-line definitions.
This greatly simplifies the signature of that function, by removing a bunch
of workarounds, and simpliffying a couple that weren't removed yet.
Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.
Also makes the explicit specialization AST nodes stop abusing the template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.
[RISCV] Factor out common scheduling model part between SiFive P400 and P500. NFCI (#199796)
This is the first part a patch series that tries to factor out common
bits from the SiFiveP400, SiFiveP500, and the SiFiveP600 scheduling
models.
This PR contains the related changes on the SiFiveP400 and SiFiveP500
models
NFCI.
---------
Co-authored-by: Craig Topper <craig.topper at sifive.com>
misc/gwhich: update GNU which to the latest version 2.25
- Bug fix for an out of bounds stack read (by Daniel Anderson)
- Scripts regenerated with automake 1.18.1 and autoconf 2.73
- Install a bunch of documentation files and convert EXAMPLES
option into DOCS (one file does not warrant this separation)
- While here, provide a more sensible and useful COMMENT text
Reported by: portscout
[clang] fix getTemplateInstantiationArgs
This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the template
context of out-of-line definitions.
This greatly simplifies the signature of that function, by removing a bunch
of workarounds, and simpliffying a couple that weren't removed yet.
Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.
Also makes the explicit specialization AST nodes stop abusing the template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.
[clang] fix member specializations of class and variable partial specializations (#200092)
A partial specialization may be a member specialization even if there is
no corresponding primary member partial specialization.
For example:
```C++
template<class> struct X {
template<class> struct Inner;
};
template<> template<class T>
struct X<int>::Inner<T*> {};
```
Make sure this state is represented, so that
[temp.spec.partial.member]p2 can be applied.
Split off from #199528