[SLP]Skip buildvector tree, if all scalars are used externally and remain scalar
If the buildvector is going to be vector with threshold cost < 0 and all
buildvector scalars are externally used and remain scalar, such a tree
should not be vectorized, it may lead to a compiler hang because same
scalars remain in the function and will be vectorized once again.
Fixes #172609
[LegalizeDAG] Return after replacing ISD::POISON with ISD::UNDEF. (#173173)
We already replaced the node, we shouldn't run the rest of the code that
still uses the old node.
[libc++] Mini-cleanup for `[[nodiscard]]` (#172275)
1. Remove incorrect `[[nodiscard]]` from compound assignment operators
in `<__filesystem/copy_options.h>`. Also add regression tests.
2. Add missing `[[nodiscard]]` mark for `mdspan::size` in
`<__mdspan/mdspan.h>` and test it.
3. Enable verifying `[[nodiscard]]` in C++03 for various components.
These components are either present in C++03 or backported by libc++
from C++11/17.
[llvm][unittests] Silence warning when building with MSVC
Fixes:
```
[836/1441] Building CXX object unittests\ExecutionEngine\Orc\CMakeFiles\OrcJITTests.dir\CallableTraitsHelperTest.cpp.obj
C:\git\llvm-project\llvm\unittests\ExecutionEngine\Orc\CallableTraitsHelperTest.cpp(25): warning C4551: function call missing argument list
C:\git\llvm-project\llvm\unittests\ExecutionEngine\Orc\CallableTraitsHelperTest.cpp(34): warning C4551: function call missing argument list
```
InstCombine: Handle canonicalize in SimplifyDemandedFPClass
Doesn't try to handle PositiveZero flushing mode, but I
don't believe it is incorrect with it.
[LLVM][ADT] Make `scope-exit` CTAD-capable (#173131)
This enables using it like
```cpp
llvm::scope_exit Cleanup([] { ... });
```
instead of
```cpp
auto Cleanup = llvm::make_scope_exit([] { ... });
```
[MLIR][NVPTX] Add intrinsics and Ops to read smem-sizes (#173089)
This patch adds three intrinsics and their corresponding Ops
representing the PTX special-register read instructions
that report various configurations of shared-memory sizes.
Signed-off-by: Durgadoss R <durgadossr at nvidia.com>
InstCombine: Handle canonicalize in SimplifyDemandedFPClass
Doesn't try to handle PositiveZero flushing mode, but I
don't believe it is incorrect with it.
ValueTracking: Improve accuracy of 0 handling with PreserveSign (#173165)
If the source value is known not subnormal and not zero with the
same sign, we can infer the result is also not zero with the same
sign.
ValueTracking: Improve accuracy of 0 handling with PreserveSign
If the source value is known not subnormal and not zero with the
same sign, we can infer the result is also not zero with the same
sign.
[libc++] Implement `adjacent_transform` (#168208)
This patch implements std::ranges::adjacent_transform_view. This is part
of P2321R2 tracked
by #105169.
[InstCombine] Bail out on type mismatch in foldICmpBinOpWithConstantViaTruthTable (#173179)
Fixes https://github.com/llvm/llvm-project/issues/173177
The previous implementation doesn't consider cases like `<2 x i1>
icmp(binop(sel <2 x i1>, sel i1))`.
[RISCV] Use legally typed splat during vmv_v_v splat(x) -> vmv_v_x (#173154)
Fixes https://github.com/llvm/llvm-project/issues/173141
Introduced in #170539, `DAG.getSplatValue` may involve the illegal-typed
splat value if not specified. This patch fixes it.
Fix use-after-free bug in mergeTwoFunctions(). (#173126)
This was caught by Apple's Probabilistic Guard Malloc which detected
that OldF's memory is freed inside mergeTwoFunctions(), and then
back in insert() the now dangling pointer is dereferenced again.
rdar://163874208
[RISCV] Introduce new AND combine to expose additional load narrowing opportunities (#170483)
The standard codegen pipeline sometimes ends up with a shift followed by
a mask. If doing the mask first would have enabled load narrowing, then
it is preferable to do so. The motivating example was seen in povray
from SPEC where we had something like:
```
lh a0, 0(a0)
slli a0, a0, 56
srli a0, a0, 52
```
Which can be better implemented as:
```
lbu a0, 0(a0)
slli a0, a0, 4
```
[3 lines not shown]
[MLIR][Python] Update the scf.if interface to be consistent with affine.if (#173171)
This is a follow-up of #171957 that updates the argument names of
`scf.if` Python binding to be consistent with `affine.if`. Basically,
both operations should use `has_else` to determine whether the `if`
block is presented.
cc @makslevental
[clang] Add FixItHint for designated init order (#173136)
Generate fix-it for C++20 designated initializers when the initializers
do not match the declaration order in the structure.
[Clang][SYCL][NFC] Modify err_sycl_entry_point_invalid to use %enum_select. (#173122)
The `err_sycl_entry_point_invalid` diagnostic has a selection field for
which there are already many options with more expected to be added. Use
of `%enum_select` avoids the need for magic numbers with associated
comments at source locations where the diagnostic is issued.