[AMDGPU] Fix hoist location for s_set_vgpr_msb past SALU program state instructions (#176206)
If we exit the loop at a non SALU state instruction we have to return
the next instruction because we will insert before the instruction we
return. The check before the loop already did this for cases we start on
a non SALU state instruction by returning `I`. This is now done
afterwards.
[SCEV] Add initial support for ptrtoaddr. (#158032)
Add initial support for PtrToAddr to SCEV, including a new
SCEVPtrToAddrExpr and SCEV expansion support for it.
PR: https://github.com/llvm/llvm-project/pull/158032
[lld][COFF][NFC] Fix warnings on 32-bit asserts builds (#176178)
Fixes #130934 (Wsign-compare warnings reported for Wasm Emscripten
builds). I ran into this when building for 32-bit RISC-V.
[llvm-dwarfdump][LineCov 1/3] Add variable coverage metrics (#169646)
Patch 1 of 3 to add to llvm-dwarfdump the ability to measure DWARF
coverage of local variables in terms of source lines, as discussed in
this RFC:
https://discourse.llvm.org/t/rfc-debug-info-coverage-tool-v2/83266)
This patch adds the basic variable coverage implementation. By default,
inlined instances are shown separately (displaying the full inlining
chain). Alternatively, a combined view that averages across all inlined
instances can be returned using `--combine-instances`.
In this patch, we simply print a count of source lines over which each
variable is covered. Later patches in the series will add the comparison
against a baseline.
[CGP] Refactor tail call eligibility checks in `dupRetToEnableTailCallOpts` (NFC)
Tail call eligibility and profitability checks have been combined
into a single helper to reduce code duplication.
[lldb] Change bitfield range character from '-' to ':' in DIL (#173410)
Change the bitfield extraction range character from '-' to a more common
':'. Add a deprecation error when '-' is used.
[VPlan] Add matchers for reduction result VPInstructions (NFC).
Add dedicated matchers for reduction result VPInstructions, to be
re-used in follow-up patches, including
https://github.com/llvm/llvm-project/pull/167851.
SystemZ: Remove override of insertSSPDeclarations
Remove __stack_chk_guard from the SystemZ system library.
Previously the availability was assumed to match
__stack_chk_fail, but these appear to be differen for SystemZ.
I'm assuming this isn't available for systemz based on the
existing behavior.
Once the runtime library does not add a SYSTEM_CHECK_GUARD
implementation the default will be a no-op if the symbol
isn't added to the system.
Also extend the test to make sure the declaration is not emitted.
[CIR] Add __sync_<OP>_and_fetch builtins (#168347)
Adds support for several `__sync_<OP>_and_fetch` builtins, and several helper methods for emitting atomic fetch + arithmetic operations.
---------
Co-authored-by: Andy Kaylor <akaylor at nvidia.com>
[ci][ids] Fix pattern prefix check (#176334)
The prefix check did not include the trailing /, so llvm-c headers were
treated like llvm headers, resulting in incorrect suggestions to use
LLVM_ABI where LLVM_C_ABI was already present.
See
https://github.com/llvm/llvm-project/pull/176309#issuecomment-3757987748
for an example.
[DA] Use ScalarEvolution::isKnownPredicate (#170919)
DA uses `DependenceInfo::isKnownPredicate` instead of
`ScalarEvolution::isKnownPredicate` in several places. The former is
intended to be a "wrapper" for the later. Specifically, it performs the
following processes:
- Replace `zext(X) cmp zext(Y)` with `X cmp Y`.
- Replace `X >=s Y` with `X - Y >=s 0`
- Replace `X <=s Y` with `X - Y <=s 0`
- Replace `X >s Y` with `X - Y >s 0`
- Replace `X <s Y` with `X - Y <s 0`
The first one can return an incorrect result when the most significant
bit of `X` and `Y` are different. Everything other than the first one
can be incorrect when `X - Y` overflows. Actually, when a `SCEVUnknown`
is involved (e.g., `%n <s %n + 1` will be `0 <s 1`), this function often
returns a result that ignore the possibility of overflow.
[4 lines not shown]
[lldb][windows] switch to Python 3.11 for the non ARM64 release builds (#175796)
This patch is a follow up to
[RFC#89434](https://discourse.llvm.org/t/rfc-sync-python-versions-on-windows/89434).
Python 3.11 is the first official Python.org release to have an arm64
installer on Windows, which is why it's the version used to build the
toolchain on arm64 Windows. The x86 and x64 variants of the toolchain
both use Python 3.10 which can be confusing for users who get different
install dependencies based on their architectures.
This patch syncs all the required Pythons to install the toolchain, by
bumping the requirements to 3.11 for x86, x64 and arm64 Windows.
[libc++][test] Fix `constexpr` stdver. for tests for `find_if(_not)` (#176303)
Until C++20, `std::find_if(_not)` were not `constexpr`, so uses of
`TEST_CONSTEXPR_CXX17` make the test functions ill-formed, no diagnostic
required in C++17 mode.
The uses were introduced in 2b4b26ea84fd9c95d0ff25ce338c15ea5e74a4e4,
while the transformation looked incorrect - `TEST_CONSTEXPR_CXX20`
should be used instead.
Drive-by changes: Fix comments in both changed test files to match the
actually standardized wording.
[analyzer] Teach `unix.BlockInCriticalSection` about `std::scoped_lock` (#176134)
The checker knows that `std::lock_guard` and `std::unique_lock`
introduce critical sections, but doesn't know about the newer
`std::scoped_lock`.
[LIT][LLVM-STRINGS]Make stdin tests shell-consistent (#176139)
The fix updates the llvm-strings stdin lit tests to use `printf` instead
of `echo -n` when generating input via stdin.
The behavior of `echo -n` is not portable and varies across shells and
platforms, particularly on AIX where `/bin/sh` handles `-n` and escape
processing differently from GNU-compatible shells. This causes the tests
to fail despite correct llvm-strings functionality.
In contrast, `printf` has well-defined, POSIX-specified semantics and
provides consistent handling of newlines, escape sequences, and
non-printable characters. Using `printf` eliminates the dependency on
shell-specific `echo` behavior and makes the tests deterministic.
[clang] Fix options handling in ClangExtDefMapGen.cpp (#176116)
Also, remove some unused includes.
Fixes https://github.com/llvm/llvm-project/issues/176118
Now, running `clang-extdef-mapping` with no options results in the
following error message:
```sh
error: clang-extdef-mapping: Not enough positional command line arguments specified!
Must specify at least 1 positional argument: See: ./build/Debug/bin/clang-extdef-mapping --help
```
[LoopVectorize] Support vectorization of overflow intrinsics (#174835)
Enables support for marking overflow intrinsics `uadd`, `sadd`, `usub`,
`ssub`, `umul` and `smul` as trivially vectorizable.
Fixes #174617
---------
Signed-off-by: vishruth-thimmaiah <vishruththimmaiah at gmail.com>
[MLIR][shard] checking for correct&full sharding annotations (#176000)
Before trying to partition a block or operation, check that it is fully
annotated with `shard.shard` ops. This gives useful error messages
instead of random errors later on.
[mlir] Fix build after #175815 (#176332)
Fix this build error, which is reported by some compilers after #175815:
```
error: operands to ?: have different types ‘mlir::Operation::result_range {aka mlir::ResultRange}’ and ‘mlir::ValueRange’
return successor.isParent() ? getOperation()->getResults() : ValueRange();
```