[LegalizeTypes][RISCV] Don't widen expandload or compresstore with VP_LOAD/VP_STORE. (#193294)
We don't support expanding/compressing VP_LOAD/VP_STORE yet.
This probably crashes on scalable vectors, but that's better than
a silent miscompile.
Fixes #193277.
[libc] Improve lit test discovery and execution (#192993)
Updated LibcTest to support cross-compilation and custom test
directories:
* Passed localConfig to _isTestExecutable to check for emulator.
* Skipped host execution permission check if emulator is set.
* Supported tests in libc.test.shared and libc.test.utils.
* Handled fallback if @BINARY@ is missing in test command template.
* Removed UnitTest from excludes in lit site config.
[cross-project-tests] Add llvm-modextract as a dependency (#193296)
cross-project-tests/dtlto/multimodule.test uses it
Some precommit tests are failing because of this missing dependency,
e.g. https://github.com/llvm/llvm-project/actions/runs/24729694507
[Github] Bump Github Runner Version to 2.334.0 (#193318)
Release notes imply this probably shouldn't impact us. Update the runner
version in the containers so that we do not run past the support
horizon.
[lldb] Add synthetic variable support to Get*VariableList. (#181501)
This patch adds a new flag to the lldb_private::StackFrame API to get variable lists: `include_synthetic_vars`. This allows ScriptedFrame (and other future synthetic frames) to construct 'fake' variables and return them in the VariableList, so that commands like `fr v` and `SBFrame::GetVariables` can show them to the user as requested.
This patch includes all changes necessary to call the API the new way - I tried to use my best judgement on when to include synthetic variables or not and leave comments explaining the decision.
As a consequence of producing synthetic variables, this patch means that ScriptedFrame can produce Variable objects with ValueType that contains a ValueTypeExtendedMask in a high bit. This necessarily complicates some of the switch/case handling in places where we would expect to find such variables, and this patch makes best effort to address all such cases as well. From experience, they tend to show up whenever we're dealing with checking if a Variable is in a specified scope, which means we basically have to check the high bit against some user input saying "yes/no synthetic variables".
[clang] implement CWG2064: ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.
This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.
Fixes #8740
Fixes #61818
Fixes #190388
[LifetimeSafety] Add support for `new`/`delete` (#192504)
This PR extends LifetimeSafety to also support heap allocations via
`new`/`delete`.
# Contents
* Adds a new warning that is emitted on use-after-free.
* Renames `reportUseAfterFree` to `reportUseAfterScope` due to the old
name being misleading (warnings are still called `use_after_scope`).
* Adds a new `AccessPath::Kind` value `NewAllocation` that is used for
loans issued from `new` allocations.
* Adds `VisitCXXNewExpr` and `VisitCXXDeleteExpr`, which handle loan
issuance / origin propagation for `new` / `delete`.
[6 lines not shown]
[Clang][AMDGPU] Use unsigned for D# (#193310)
The descriptor should be unsigned in the first place. Before we moved to
`_ExtVector`, everything just relied on implicit type conversion, so
this was never caught. CLR's implementation of D# uses unsigned as well.
Fixes ROCM-23449.
[flang][acc] Update fir.convert rematerialization handling (#193301)
As of https://github.com/llvm/llvm-project/pull/184218 fir.convert was
being treated as a rematerialization candidate always. However, the
primary problem intended to be solved were improper classification of
pointers due to being casted to integers. Thus use optionally
implemented interface instead to only handle this scenario.
[AArch64] Add more scalar testing for hadd patterns. NFC (#193313)
These are mostly taken from hadd-combine.ll, testing scalar instead of
vector
and checking a few extra variants.
[RISCV][GlobalISel] Lower G_MEMCPY_INLINE (#192671)
Before this, MIR that contained G_MEMCPY_INLINE has failed in the
lagalization stage.
This patch calls `lower` on G_MEMCPY_INLINE.
[Attributor] Use trivial no side effects check in isAssumedSideEffectFree (#193303)
This PR should not change any tests, which is the goal here. To use
`mayHaveSideEffects` is a shortcut to avoid expensive checks by pulling
in different kind of dependences.
That said, this PR doesn't really need a test.
Reapply "[JTS][Passes] Enable JTS By Default" (#193300)
Reverts llvm/llvm-project#192894
Remaining issues should be fixed by
6a9ed459ce228cc0d8982bf1a8cad39f7c020ce4.
[libc] Add wcsxfrm (#191692)
This patch adds wcsxfrm to LLVM libc.
It includes:
- wchar.yaml declaration
- implementation and header
- CMake wiring
- entrypoint registration
- unit tests
The current implementation provides C/POSIX-style behavior and does not
yet add locale-aware collation support.
Tested with:
- ninja libc.test.src.wchar.wcsxfrm_test
Notes:
- local full check-libc was blocked by unrelated pre-existing timeout
[6 lines not shown]
[NFC][SSAF] Extract common code in Analyses to a shared file (#191932)
Created SSAFAnalysesCommon.h for the SSAF analyses implementation.
---------
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
[Clang][AMDGPU] Use unsigned for D#
The descriptor should be unsigned in the first place. Before we moved to
`_ExtVector`, everything just relied on implicit type conversion, so this was
never caught. CLR's implementation of D# uses unsigned as well.
[BOLT] Fix stream position before appendPadding in writeEHFrameHeader (#193126)
When writeEHFrameHeader needs to allocate new space for .eh_frame_hdr
(because the old section is too small), it calls appendPadding to align
NextAvailableAddress. appendPadding writes zero bytes at the current
stream position, but after the section write loop in rewriteFile the
stream is positioned at the end of the last section written in
BinarySection::operator< order — not at the file offset corresponding to
NextAvailableAddress.
In the common case (single loadObject call) the write order matches file
offset order, so the stream happens to be in the right place. But when a
runtime library adds sections via additional loadObject calls, the
operator< iteration order (code-before-data) can diverge from file
offset order: a runtime library code section may have a higher file
offset than a runtime library data section that comes after it in the
write loop. The stream then ends at a lower offset than expected, and
appendPadding's zeros overwrite the beginning of the code section.
Fix by seeking to the correct file offset before calling appendPadding.
[AArch64] Remove xtn.ll test. NFC (#193306)
xtn.ll and trunc.ll share many of the same test functions. This patch
removes
xtn.ll, porting over some i128 variants to trunc.ll to keep what was
present
only in xtn.ll.
[Attributor] Use trivial no side effects check in isAssumedSideEffectFree
This PR should not change any tests, which is the goal here. To use
`mayHaveSideEffects` is a shortcut to avoid expensive checks by pulling in
different kind of dependences.
That said, this PR doesn't really need a test.
[VPlan] Clean up VPWidenPHIRecipe constructor (NFC). (#193297)
Update VPWidenPHIRecipe's constructor to no longer pass the unused
underlying IR PHI and pass all incoming values as ArrayRef. This also
clarifies that the underlying instruction is not used.
Also add VPBuilder::createWidenPhi.
[PowerPC] Fix ADJCALLSTACKUP and ADJCALLSTACKDOWN def (#184696)
ADJCALLSTACKUP and ADJCALLSTACKDOWN can actually take on values greater
then what can be contained in u16imm type. Update to use u32imm instead.
[AMDGPU] Reland "Fixed verifier crash because of multiple live range components." (#190719) (#193286)
PR #190719 was reverted by PR #193135 because a .s file was left behind
by a test. This patch fixes it by adding -filetype=null to the RUN line
of the test rewrite-vgpr-mfma-to-agpr-spill-multi-store.ll.
In Rewrite AGPR-Copy-MFMA pass, after replacing spill instructions, the
replacement register may have multiple live range components when the
spill slot was stored to more than once. The verifier crashes with a bad
machine code error. This patch fixes the problem by splitting a live
range but assigning the same physical register in this scenario. A new
test has been added that verifies the absence of this verifier error.
Assisted-by: Claude Opus