[libc++][test] Make narrowing in `nasty_char_traits::to_char_type` more explicit (#138375)
Previously, the cast was allowed due to
[P0960R3](https://wg21.link/p0960r3), which made narrowing implicitly
done in the parenthesized aggregate initialization. MSVC doesn't seem
happy with such an implicit manner, despite not being
copy-initialization or list-initialization, and emits warning C4242.
This patch makes the narrowing more explicit to MSVC with `static_cast`.
Follows up 3e7be494f84e51d5f4245d6f39e380a500f226a6.
[SystemZ] Don't zero extend after a VLGV[BHF] instruction. (#201109)
The VLGV already zero extends up to 64 bits, so a following zero extend
is not needed.
New TableGen patterns for these cases as well as a handling to avoid
tryRISBGZero() selecting i64 cases.
[AMDGPU][NFC] Use generated hasMinMaxI64Insts subtarget feature query (#201052)
Replace the custom GCNSubtarget::hasIntMinMax64 helper with the
generated hasMinMaxI64Insts from AMDGPUSubtargetFeature.
[llvm-objcopy] Add --verbose option to llvm-strip/llvm-objcopy (#196611)
Added `--verbose / -v` option to `llvm-strip` and `llvm-objcopy` as part
of #123041, matching GNU strip's output format. When the flag is passed,
the tool prints one line per file processed.
copy from `'input.o' [elf64-x86-64] to 'output.o' [elf64-x86-64]`
[libc++] Reject cv-qualified types in __is_signed/unsigned_integer_v (#200377)
`__is_signed_integer_v` and `__is_unsigned_integer_v` previously
admitted cv-qualified types, contradicting `[basic.fundamental]/p1-2`.
The fix adds `__is_unqualified_v<_Tp>` to both predicates.
Reported by @jwakely on
[#185027](https://github.com/llvm/llvm-project/pull/185027#issuecomment-4574289895).
Trait-level tests cover all consumers via the shared concept; cast-like
templates (`in_range`, `saturating_cast`, `extents`) get explicit
cv-rejection tests.
Assisted-by: Claude (Anthropic)
---------
Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
[lldb][test] Always call quit when tearing down pexpect tests (#201100)
Right now we manually have to call quit at the end of each pexpect test.
This patches makes this call automatic.
This also makes tests that missed the call and where previously waiting
for a timeout faster. For example, TestClangREPL.py now only takes about
10 seconds to run instead of 1 minute.
Revert "[OpenCL] Allow mesa3d OS in spirv32 and spirv64 targets" (#200727)
Reverts llvm/llvm-project#197148
libclc will use generic target triple spirv32[64]-unknown-unknown for use in mesa.
[libclc] Use generic spirv*-unknown-unknown clang triple for SPIR-V targets (#199618)
spirv-diff shows only numbering change to
spirv64-unknown-unknown/libclc.spv. No change in `llvm-spirv -to-text`
outputs. llvm-diff shows no change on reverse-translated bitcode files.
Also fixes a bug that spirv32-unknown-unknown was incorrectly using
64-bit triple.
Update README.md to use the generic target triple for SPIR-V targets.
[libc++] Make `<map>` `std::map` constexpr as part of P3372R3 (#134330)
Fixes https://github.com/llvm/llvm-project/issues/128660
Adds `constexpr` support for `std::map` as per P3372R3
---------
Co-authored-by: A. Jiang <de34 at live.cn>
[CaptureTracking] Remove allocator comparison special case (#201143)
CaptureTracking had a special case that (incorrectly) reported
`captures(none)` for comparisons of allocation functions with null.
Remove this special case and return the correct
`captures(address_is_null)` result instead.
It seems like this doesn't have any practical benefit anymore, as things
like AA will ignore address-only captures nowadays.
[libc] Fix alarm layout mismatch on 32-bit time64 (#201276)
Fixed alarm implementation on 32-bit architectures with 64-bit time_t
(like RISC-V 32-bit). The SYS_setitimer syscall on these platforms
expects the legacy 32-bit struct itimerval (with 32-bit tv_sec and
tv_usec). Convert the arguments to this layout before invoking the
syscall to avoid the kernel misinterpreting the timeout.
Assisted-by: Automated tooling, human reviewed.
[DTLTO] Refactor the DTLTO code. (#192629)
DTLTO implementation code has been moved from `llvm/lib/LTO/` to
`llvm/lib/DTLTO/`. This refactor does not change any externally visible
behavior, so existing DTLTO tests and documentation remain valid. The
move was done to reduce code duplication, improve maintainability, and
make it easier to adopt future performance improvements.
[orc-rt] Add required/weak-ref attribute to NativeDylibManager lookup. (#201272)
Replace the std::vector<std::string> argument to lookup() with a
SymbolLookupSet (a vector of (name, LookupFlags) pairs, where
LookupFlags is RequiredSymbol or WeaklyReferencedSymbol).
This brings NativeDylibManager more closely into alignment with the
SimpleExecutorDylibManager implementation in the LLVM OrcTargetProcess
library.
[SelectionDAG] Fold extracts of subvector inserts
Fold extract_subvector(insert_subvector(...)) when the extraction is
outside the inserted subvector or the inserted subvector only amends
the extracted
In particular,
1. vA extract_subvector (vB insert_subvector(vB X, vC Y, C1), C2) =>
vA extract_subvector(X, C2) when [C2, C2 + A) intersect [C1, C1 + C)
is the empty set
2. ... => extract_subvector(Y, C2 - C1) if [C2, C2 + Y) is a subset of
[C1, C1 + C) - an existing simplification
3. ... => vA insert_subvector(vA extract_subvector(vB X, C2), vC Y, C1 - C2)
if [C1, C1 + C) is a subset of [C2, C2 + A) - that is, if you're only
updating the extracted sub-part.
Adds a regresssion tests for an infinite SelectionDAG cycle that is
fixed by a stack of commits that ends with this one.
[3 lines not shown]
[SelectionDAG] Fold subvector inserts into concat operands
Push insert_subvector into the containing CONCAT_VECTORS operand when the insertion is wholly contained there.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Fold extracts spanning concat operands
Factor the extract_subvector-of-CONCAT_VECTORS logic and handle
extracts that cover multiple whole concat operands by rebuilding a
smaller concat directly.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Fold nonzero extract-of-extract indices
Generalize the extract_subvector-of-extract_subvector fold to compose
nonzero indices instead of only handling an outer index of zero.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Track bitcast demanded elements in noundef tests
Bitcasts preserve undef/poison status, but vector bitcasts can change
which source lanes cover a demanded result lane. Map the demanded
element mask through fixed-length vector bitcasts before checking the
source where possible.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Track demanded select elements in noundef checks
Propagate demanded elements through to the two arms of a select, and
check the condition with or without demanded elements depending on if
it's a vector or not.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Pre-commit tests for dagcombine improvements
I've got a stack of dagcombine improvements that together make an
infinite cycle relating to freeze insertion in vector-manipulation IR.
Here we have
- Handling freeze(undef) in demanded-elts for shufflevector
- Improvements to noundef checks for bitcast, concat, and select
- Improvements to extract(concat), extract(extract), and
- extract(insert) nadling
[SelectionDAG] Look through freeze in undef demanded checks
There were cycles where the freeze combiner and thet
demanded-elements simplification code would get into fights about
whethere the operands to a shuffle or a concat should be
`freeze undef` or `undef` once the simplifier had concluded zero
elements were demanded from some operation. This PR prevents such
cases.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Track demanded concat elements in noundef checks
Teach isGuaranteedNotToBeUndefOrPoison to distribute fixed-length
demanded element masks across CONCAT_VECTORS operands. This is part of
the series of fixes needed to resolve a SelectionDAG hang by making it
possible to prove certain values don't need to be frozen.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>