[X86] broadcast-elm-cross-splat-vec.ll - cleanup check prefixes and regnerate (#181631)
The file had missing checks due to collisions and a lot of redundancy between x86/x64 and isa levels
`dwarf2yaml.cpp` optimizations (#179048)
DWARF to YAML optimizations: Add a lot of vector reserves & moves.
See also https://github.com/WebAssembly/binaryen/pull/8257
---------
Co-authored-by: stevenwdv <stevenwdv at users.noreply.github.com>
[tsan] Introduce Adaptive Delay Scheduling to TSAN (#178836)
This commit introduces an "adaptive delay" feature to the
ThreadSanitizer runtime to improve race detection by perturbing thread
schedules. At various synchronization points (atomic operations,
mutexes, and thread lifecycle events), the runtime may inject small
delays (spin loops, yields, or sleeps) to explore different thread
interleavings and expose data races that would otherwise occur only in
rare execution orders.
This change is inspired by prior work, which is discussed in more detail
on
https://discourse.llvm.org/t/rfc-tsan-implementing-a-fuzz-scheduler-for-tsan/80969.
In short, https://reviews.llvm.org/D65383 was an earlier unmerged
attempt at adding a random delays. Feedback on the RFC led to the
version in this commit, aiming to limit the amount of delay.
The adaptive delay feature uses a configurable time budget and tiered
[50 lines not shown]
[AArch64][llvm] Remove +pcdphint gating
Remove gating of `stshh` since this is an instruction from the
HINT space, and therefore is a NOP on cores that don't implement
it, so gating is superfluous. gcc doesn't gate this, so remove
for better compatibility.
[Clang] make most enums trivially equality comparable (#169079)
std::equal(std::byte) currently has sub-optimal codegen due to enum
types not being recognized as trivially equality comparable. In order to
fix this we make them trivially comparable. In the process I factored
out into a standalone function EqualityComparisonIsDefaulted and
refactored the test cases.
Enum types cannot have operator== which is a hidden friend.
Fixes #132672
[IR] Add ConstantExpr::getPtrAdd() (#181365)
Add a ConstantExpr::getPtrAdd() API that creates a getelementptr i8
constant expression, similar to IRBuilder::CreatePtrAdd(). In the future
this will create a ptradd expression.
[clang][test] Set triple explicitly for attr-no-outline.m test (#181621)
The test fails on targets that have a different LLVM IR lowering (e.g.
RISC-V which produces `signext i32` for the return type). Rather than
complicate the test with more complex patterns, just set the triple
explicitly to x86-64 (as various other generic clang/test/CodeGen* tests
do).
Test was introduced by #163666.
This fixes RISC-V CI.
[Polly] Honor 'scops' phase being disabled (#180380)
`opt -passes=polly-custom<detect>`, or `stopafter=detect` would still
run the ScopInfo analysis even though it should run when explicitly
enabled or required by another phase.
[VPlan] Directly unroll VectorEndPointerRecipe (#172372)
Directly unroll VectorEndPointerRecipe following 0636225b ([VPlan]
Directly unroll VectorPointerRecipe, #168886). It allows us to leverage
existing VPlan simplifications to optimize.
Co-authored-by: Luke Lau <luke at igalia.com>
Co-authored-by: Florian Hahn <flo at fhahn.com>
[Flang][OpenMP] Don't generate code for unreachable target regions. (#178937)
When a target region is placed inside a constant false condition (e.g.,
`if (.false.)`), the dead code gets eliminated on the host side,
removing the `omp.target` operation entirely. However, the device-side
compilation pipeline is unaware of this elimination and attempts to
generate kernel code. Since the host never created offload metadata for
the eliminated target, the device-side kernel function lacks the
"kernel" attribute, causing `OpenMPOpt` to fail with an assertion when
it expects all outlined kernels to have this attribute. The problem can
be seen with the following code:
```fortran
program cele
implicit none
real :: V
integer :: i
if (.false.) then
!$omp target teams distribute parallel do
[16 lines not shown]
[flang] fix codegen of fir.select with only default case (#181373)
The case where fir.select only has a "unit" block target (i.e., it is a
switch with only the default case) was not handled correctly in codegen.
[libc][wctype] Reland internal UTF8 wctype classification functions (#181468)
Reland #174607
#174607 broke libc++ because the LIBC_CONF_WCTYPE_MODE macro wasn't
defined when called from libc++. Defaulted LIBC_CONF_WCTYPE_MODE to
LIBC_WCTYPE_MODE_ASCII when not configured
(https://github.com/llvm/llvm-project/commit/ffd355b0879066adc9889593570af8f0df85f1a8)
[SCEVDivision] Prevent propagating nowrap flags when numerator is an addrec (#154745)
In ScalarEvolutionDivision, when the numerator is an addrec, its nowrap
flags are unconditionally propagated to the quotient and remainder.
However, this is not always correct.
This pass is only used by Delinearization, and just dropping these flags
doesn't affect Delinearization's accuracy in almost all cases.
Therefore, this patch conservatively stop propagating the nowrap flags
from the numerator to the quotient and remainder.
Fix #152566
[lldb-dap] Add unknown request handler (#181109)
Added unknown request handler to avoid crash. Returning error in this
case looks better than stopping entire debug session.
(cherry picked from commit b447f5d9763010f8c6806c578533291aef2bd484)
workflows/release-binaries: Pass missing release-version input to upload-release-artifact (#180879)
This was causing the 22.1.0-rc3 uploads to fail.
(cherry picked from commit 127d77f7abe0b9c54562ee37ce474d99effa09c1)
[flang] Fix -fno-omit-frame-pointer (#180507)
The PR #163775 added `FramePointerKind::NonLeafNoReserve`. However it
seems it forgot to update some codes in Flang. By this bug,
`frame-pointer` attribute in IR was not set even if
`-fno-omit-frame-pointer` is specified.
Fixes #180118
(cherry picked from commit e2297da21660a0c9f3db90c3effd18f6c17e38e9)