[llvm][formatters] Add LLDB formatter for llvm::PointerUnion (#175218)
We make use of the fact that the `PointerUnion` element is a
`PointerIntPair`, for which we have a synthetic provider already. We get
the `Int` portion of the pair (which is the index into the template
parameter pack of the union) to get the active type and the `Pointer`
portion of the pair to get the actual pointer value.
Before:
```
(lldb) (lldb) v -T z_float
(llvm::PointerUnion<Z *, float *>) z_float = {
(llvm::pointer_union_detail::PointerUnionMembers<llvm::PointerUnion<Z *, float *>, llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *> >, 0, Z *, float *>) llvm::pointer_union_detail::PointerUnionMembers<llvm::PointerUnion<Z *, float *>, llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *>, llvm::PointerIntPairInfo<void *, 1, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *> > >, 0, Z *, float *> = {
(llvm::pointer_union_detail::PointerUnionMembers<llvm::PointerUnion<Z *, float *>, llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *> >, 1, float *>) llvm::pointer_union_detail::PointerUnionMembers<llvm::PointerUnion<Z *, float *>, llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *>, llvm::PointerIntPairInfo<void *, 1, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *> > >, 1, float *> = {
(llvm::pointer_union_detail::PointerUnionMembers<llvm::PointerUnion<Z *, float *>, llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *> >, 2>) llvm::pointer_union_detail::PointerUnionMembers<llvm::PointerUnion<Z *, float *>, llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *>, llvm::PointerIntPairInfo<void *, 1, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *> > >, 2> = {
(llvm::PointerIntPair<void *, 1, int, llvm::pointer_union_detail::PointerUnionUIntTraits<Z *, float *> >) Val = {...}
}
}
}
[8 lines not shown]
[X86] InstCombine: Generalize scalar SSE MAX/MIN intrinsics (#175375)
Fixes #175162
This patch handles x86_sse_max_ss/min_ss and related intrinsics. It
check if is known to be safe to convert them to llvm.maxnum/minnum.
These intrinsics can be converted to `@llvm.maxnum` and `@llvm.minnum`.
This optimization can be done if the inputs are free of: NaN, Inf,
Subnormal, and NegZero. If it is not sure to be free of these, the
instructions remain the same.
[SCEV] Handle all PtrtoIntExpr construction in CastSinkingRewriter (NFC) (#174435)
Move SCEVPtrToIntSinkingRewriter out of getLosslessPtrToIntExpr to be
re-used for PtrToAddr. Also streamline code in getLosslessPtrToIntExpr
by moving zero handling to the rewriter and removing special handling
for SCEVUnknown in getLosslessPtrToIntExpr. Instead, always use the
rewriter, which will automatically handle the case where the expression
is a SCEVUnknown.
This makes it slightly easier to add support for PtrToAddr as follow-up
to https://github.com/llvm/llvm-project/pull/158032
PR: https://github.com/llvm/llvm-project/pull/174435
[RISCV] Fix ReplaceNodeResults of Intrinsic::experimental_cttz_elts for RV32 (#174992)
The test case added in this patch crashes on rv32v without this fix. We
attempt to trunc the i32 type of the select produced by lowerCttzElts to
i64, which asserts. Use getZExtOrTrunc instead.
[VPlan] Remove verifier check that EVL can only be used by VPInstruction with one use (#175502)
Fixes #175028
We have a VPlanVerifier assertion that a VPInstruction that uses EVL
only has one use. This used to hold until we implemented CSE, but now we
can run into the case where e.g. a multiply from an expanded
VPWidenPointerInductionRecipe gets cse'd, causing it to have multiple
uses:
EMIT ir<%0> = WIDEN-POINTER-INDUCTION ir<%.pre3>, ir<6>, vp<%5>
EMIT ir<%1> = WIDEN-POINTER-INDUCTION ir<%.pre>, ir<6>, vp<%5>
EMIT-SCALAR vp<%5> = EXPLICIT-VECTOR-LENGTH vp<%avl>
-->
EMIT-SCALAR vp<%10> = EXPLICIT-VECTOR-LENGTH vp<%avl>
EMIT vp<%11> = mul ir<6>, vp<%10>
EMIT vp<%ptr.ind> = ptradd vp<%pointer.phi>, vp<%11>
[13 lines not shown]
[X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - Allow SSE/AVX FP MAX/MIN intrinsics to be used in constexpr (#171966)
* Implemented a generic function interp__builtin_elementwise_fp_binop
* NaN, Infinity, Denormal cases can be integrated into the lambda in
future. For, now these cases are hardcoded in the generic function
Resolves: #169991
Add named constants and improve protocol validation
- Add CONSOLE_HANDSHAKE_TIMEOUT (5000ms) and CONSOLE_LOG_TRUNCATE_LEN (100)
named constants to replace magic numbers
- Use stricter protocol validation: data.toString().trim() === 'OK'
instead of indexOf('OK') === 0 for more robust handshake checking
The stricter validation prevents false positives if the response contains
"OK" as a substring of a different message.
Addresses PR review feedback from https://github.com/TritonDataCenter/smartos-live/pull/1159
Co-Authored-By: Claude Opus 4.5 <noreply at anthropic.com>
[SPIR-V] Do not allow AS(2) to convert to generic (#175275)
Summary:
The original logic permitted this, while it's not permitted by the
standard.
---------
Co-authored-by: Dmitry Sidorov <18708689+MrSidims at users.noreply.github.com>
[AMDGPU] Fix crash in SIInsertWaitcnts debug output (#175518)
In some cases we were accessing `OldWaitcntInstr.getParent()->end()`
after `OldWaitcntInstr` had already been erased from its parent.
[libc++] Make basic_string::__erase_external_with_move noexcept (#171591)
`__erase_external_with_move` is in the dylib, so the compiler doesn't
see the definition. Marking it `noexcept` sometimes allows clang to
remove exceptions related code, improving code size slightly.
Rework system dataset migration to be less bad
This commit reworks how we migrate the system datasets so that
it's somewhat less racy and uses kernel APIs for this.
On migration:
1. build new mount tree in middleware run dir
2. sync data from old to new
3. move new under old
4. move old to middleware rundir
5. restart services
6. cleanup
MAINTAINERS/CODEOWNERS: Fix intro wrap + gitadm
+ svnadmin has apparently been superceeded by gitadm@
+ fix intro prose wrapping to be consistent at 72 for trad console
MFC after: 3 days
MAINTAINERS/CODEOWNERS: Add ziaee to mandoc + man/
If you tag me on manual reviews, I will help you. I'm very intersted in
helping keep things standard and predictable across the manual. As these
files say, this is not intended to imply any desire for blocking.
MFC after: 3 days
[PS5][Driver] forward -ffat-lto-objects to the linker (#172854)
When clang is driving the linker and is passed -ffat-lto-objects, pass
it on to the linker as --fat-lto-objects.
[libc] Improve SIMT control flow in the GPU allocator
Summary:
The Volta independent thread scheduling is very difficult to work with.
This is a first attempt to make the logic more sound when lanes execute
independently. This isn't all that's required, but it ends up improving
control flow for AMDGPU as well.