[DirectX] Replace non-const count of DISubrange with -1 (#192576)
Non-const count is only emitted for C99 VLA, which are not supported.
Co-authored-by: Andrew Savonichev <andrew.savonichev at gmail.com>
[lldb][test] Remove full stop from expected error messages (#193748)
I am about to update a bunch of uses of AppendErrorWithFormat to not
have a full stop at the end, to confirm to
https://llvm.org/docs/CodingStandards.html#error-and-warning-messages.
Reviewing all those changes is going to be difficult so I am updating
the tests first and then we can land the other changes in batches
(because the tests will continue to pass as we do that).
Note that I have only run the test suite on Linux AArch64, so there are
probably more that need to be updated. We will catch those in CI or
post-commit.
[LoongArch] Add support for vector add/sub on vNi128 types
Legalize ADD/SUB for v1i128 and v2i128 and extend LSX/LASX instruction
selection patterns to support the Q element size. Update register classes
to include vNi128 types and add codegen tests to verify lowering to
VADD.Q/XVADD.Q and VSUB.Q/XVSUB.Q.
[flang][debug] generate llvm.fake.use for arguments at -g and O0 (#187044)
Fix for https://github.com/llvm/llvm-project/issues/185432.
This patch extends the lifetime of procedure dummy arguments using llvm.fake.use
so that they are accessible in debugger during the whole lifetime of the function.
This is done by:
- adding a new fir.fake_use operation and emitting it in AddDebugInfo.cpp for
dummy arguments at the end of the procedure scope.
- lower this new fir.fake_use to the llvm.fake.use intrinsic.
This is done under -g at O0 only to avoid pessimizing the generated code when
optimizations are requested.
[libc] Switch check-libc from CTest to lit (#193798)
Renamed check-libc-lit to check-libc, replacing the old CTest-driven
target. Dependencies now use -build targets (e.g.
libc-hermetic-tests-build) so that check-libc only builds test
executables and delegates execution to lit.
[libc] Honour LIBC_GPU_TEST_JOBS in lit test runs (#193797)
Under CTest, LIBC_GPU_TEST_JOBS controlled a ninja job pool that limited
concurrent GPU test processes. The AMD GPU buildbot sets this to 4 to
avoid overloading the GPU driver.
When running tests via lit, this constraint was lost because lit uses
its own -j flag (defaulting to nproc, or set to 64 on the AMD bot via
LLVM_LIT_ARGS). All GPU loader processes launched simultaneously,
leading to hangs from GPU resource exhaustion.
Propagated LIBC_GPU_TEST_JOBS into the lit site config as a parallelism
group so lit throttles GPU test concurrency independently of the global
-j setting.
[libc] Fix implicit conversion warning in mktime_test (#193504)
Specified template argument time_t for Succeeds and Fails in
mktime_test.cpp to avoid implicit conversion warnings when matching
time_t results on 64-bit systems.
[LV] Simplify live-out extraction for first-order recurrence phis when tail folding (#176108)
The idea is similar to ba40a7bc2e65be86ac23c9cf6038ac085dda77eb. Due to
tail folding, the recurrence vector in the final iteration may contain
only a single active element, making it impossible to extract the
penultimate active element. This patch instead directly extracts the
last active element from the vector produced by splicing the recurrence
phi and the previous value, without needing to select which value to
extract based on the number of active lanes.
[mlir][EmitC] Add tests for arith.max/min float/signed int conversions (#190160)
This patch adds test coverage for the combined `-arith-expand |
-convert-arith-to-emitc` pipeline for selected `arith` max/min operations.
The new tests exercise:
- `arith.maximumf`
- `arith.minimumf`
- `arith.minsi`
- `arith.maxsi`
The intent is not to re-test the individual passes in isolation. Expansion is
already covered in `test/Dialect/Arith/expand-ops.mlir`, and the direct
Arith-to-EmitC lowering is already covered in
`test/Conversion/ArithToEmitC/arith-to-emitc.mlir`. This patch specifically
checks that the combined pipeline produces the expected EmitC operations after
expansion.
[11 lines not shown]
[lldb] Add regression test for stale Symbol pointer crash in statusline (#193854)
Add a test that exercises the code path fixed in
[88f024223cc4](https://github.com/llvm/llvm-project/pull/188377)
("[lldb] Fix stale Symbol pointer crash in statusline after 'target
symbols add'").
The bug: when `target symbols add` is called, `Symtab::AddSymbol()` can
reallocate the underlying `std::vector<Symbol>`, invalidating all
existing `Symbol*` pointers. The statusline caches an
`ExecutionContextRef` containing a `StackID` with a
`SymbolContextScope*` (which can be a `Symbol*`). If a concurrent
statusline redraw occurs between the Symtab reallocation and
`Process::Flush()` (e.g. from a progress event on the event handler
thread), the cached `StackID` matches the old frame via pointer-equal
comparison, and `GetSymbolContext()` dereferences the dangling
`Symbol*`.
The test:
[14 lines not shown]
[IR] Remove pointer arguments from loop.dependence.{war|raw}.mask (#188248)
Passing pointer arguments is quite inconvenient for practical use. These
intrinincs only care about the difference between the address bits of
two pointers, but by taking pointer arguments it is implying they care
about other details of the pointers (such as addrspace, or other pointer
bits).
This metadata is currently not preserved when gathering diff checks in
the loop vectorizer, so requiring pointers makes emitting these
intrinsic more complex (or requires preserving information that is
ultimately unused).
[MLIR][Vector] Add fastmath attribute to vector.contract (#192788)
`vector.contract` has no fastmath attribute, making it impossible to
propagate fast-math flags to lowered ops. This can help backends that
rely on flags like `contract` to enable FMA fusion.
This change adds a `fastmath` attribute to `vector::ContractionOp` and
propagates it to lowered operations.
[NFC][Clang][docs] Clarify the status of P1949R7 (unicode identifiers) (#193483)
Clang does not check identifiers are NFC-normalized, which the standard
requires.
[Tooling][clang-tools-extra] Consume CommonOptionsParser errors in tools (#193675)
Several LibTooling-based tools printed errors returned from
CommonOptionsParser::create() directly. However, printing an
`llvm::Error` does not consume it, so argument parsing failures such as
unknown tool options could abort. This commit fixes the problem.
Closes https://github.com/llvm/llvm-project/issues/183009
[libcxx][Github] Add generic-llvm-libc config to CI (#193822)
Add the generic-llvm-libc config for CI so that we can ensure we do not
regress the config and easily test changes as we do more work.
Only run libcxx/libxxabi tests for now as libunwind fails to build due
to a missing dl_iterate_phdr implementation. It technically passes when
we enable the stub implementation, but we should have a reasonable
implementation before actually enabling.
[Clang][SPIRV] Add getSRetAddrSpace() for SPIRV (#193875)
Override getSRetAddrSpace() so that sret pointers for non-trivially-
copyable types use the generic address space (addrspace 4), matching the
"this" pointer convention on spirv64-amd-amdhsa.