[SLP]Look through truncation of shifted extracted sub-fields
The masked sub-field of the shifted truncation of a wider scalar was
matched with the truncation as its source, while the other fields
matched the scalar itself, so the gather of the fields was rejected.
The field is within the truncated bits, look through the truncation.
Fixes #74380
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/226803
[libc++][docs] Convert documentation from reST to Markdown (batch 1) (#221513)
This is the first batch of changes to migrate libc++ documentation from
rst to markdown.
I use a local pixel diff tool to compare the rendered HTML, and all
diffs seem like fixes. They tend to fall into the following categories:
- dashed bullet lists were previously not rendered, but now they are
- extra indentation interpreted as blockquotes has been removed
- single backticks are now codefont spans, not italic spans
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is a stacked PR based on #221512, which will be a standalone commit
that
[82 lines not shown]
[libc++][docs] Rename documentation files to Markdown (batch 1) (#221512)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is the initial straight rename commit. It will probably break the
docs build, but it has to be a separate PR for blame preservation
purposes.
[llvm] Remove declarations without definitions (NFC) (#226764)
HexagonConstEvaluator::evaluateHexVector2: Added on July 28, 2016 in
commit 167d918225ecd05a63f6b8d449c317feda741e18 without a definition or
any callers.
initializePPCExpandISELPass: The definition and caller were removed on
August 27, 2024 in commit 8e901c255df45e38cb1d69a576804029e20868bf.
dsymutil::DwarfLinkerForBinary::createStreamer: The definition and
caller were removed on April 1, 2023 in commit
36f351098cd50809658493d9b2e22a795874bab0 (when the non-template
declaration in DwarfLinkerForBinary.h was replaced with a template
declaration without a definition).
exportCoverageDataToJson: The definition and caller were replaced with
CoverageExporterJson on January 4, 2018 in commit
1ef3a778ac47564aa5a7f04bbf572d22d1c616fb.
[13 lines not shown]
[libc++][chrono] Fix years/months periods on GCC/i386 (#223669)
`static_cast<int>(365.2425 * 60 * 60 * 24)`, added in
f537b4e51822b19780386e0575ff95e82f8ec445, isn't exactly 31556952 on
every host: GCC targeting i386 folds it in x87 extended precision and
gets 31556951, making `years::period` and `months::period` coprime and
breaking `year_month` arithmetic.
Use the literal values instead, there's no readability to lose since
they were only there to avoid a template instantiation in the first
place.
Signed-off-by: Leonidas Spyropoulos <artafinde at archlinux.org>
[libc++] Port #200996 to ostream (#226372)
Reduces the time to compile a TU with just `#include <ostream>` from
254.7 ms ± 3.0 ms to 227.7 ms ± 2.1 ms on my system (-std=c++23, -O2,
arm64 macOS).
See #195466 for details. Without this, the call is evaluated when the
template is parsed, which evaluates format_string's consteval
constructor for "\n" in every translation unit that includes <ostream>,
even if nothing calls println().
No behavior change.
[DAG] Scalarise trivial splat operations (#226257)
This fixes an issue reported on #224255, where a single active lane
masked store is converted to a v1f16 extract_subvector, which becomes a
v1f16 splat, which fails to scalarize. Add the necessary trivial
scalarisation of the splat by using the f16 input operand.
(I was originally going to fix this by generating a scalar f16 extract
directly (which would have the benefit of treating f16 as legal), but
that seems to cause a regression in 2 x86 tests).
[clang][CIR] Add tests for SVE ADDV intrinsics (#225648)
This adds CIR tests for `svaddv` (plain SVE) intrinsics following the
task description in
[223963](https://github.com/llvm/llvm-project/issues/223963).
Moves and adapts `sve-intrinsics/acle_sve_addv.c` to `sve/addv.c`.
[TTI] Provide conservative legality + costs for @llvm.speculative.load. (#180036)
Add TTI support for @llvm.speculative.load, including cost and legaltiy
checking support.
The initial implementation for AArch64 checks if the loaded type is
<= 16 bytes, and only considers such cases legal due to MTE.
PR:
https://github.com/llvm/llvm-project/pull/180036
Depends on https://github.com/llvm/llvm-project/pull/179642
[clang-tidy] Fix redundant-branch-condition false positive in loops (#225827)
Fixes #205685.
`bugprone-redundant-branch-condition` decides whether the condition
variable changes between the outer and inner `if` by comparing source
positions. When a loop sits between the two, a mutation that comes after
the inner `if` in the source still runs before the inner condition is
evaluated again on the next iteration, so the check reports a redundant
condition that isn't, and the fix-it changes behavior.
The fix walks the parents of the inner `if` up to the outer `if` and
finds the outermost enclosing loop. If the variable is mutated anywhere
in that loop, the check does not warn. This follows NagyDonat's
suggestion in the issue: the existing check already covers mutations
between the outer condition and the loop, so only the loop itself needs
the extra query. The walk passes through declarations, so an inner `if`
inside a lambda stored in a variable is handled too, and it stops at the
enclosing function. I chose a syntactic walk instead of the CFG
[21 lines not shown]
[CIR][NFC] Add vector of boolean test to __builtin_nondeterministic_value (#219550)
Assisted-by: grok-4.6
Signed-off-by: Letu Ren <fantasquex at gmail.com>