[AMDGPU] Disable non-assert test cases (#234869)
3 test cases's checking line is based on `NDEBUG` or `ASSERTIONS` being
enable.
Disable these if assertion is off.
Co-authored-by: shore <shorshen at amd.com>
[CIR][HIP] Emit module ctor without a GPU binary (#234855)
Mirror classic codegen, reference an external __hip_fatbin and add the
CUID hash to the fatbin and handle names
---------
Co-authored-by: Steffen Larsen <sholstla at amd.com>
[libc] Implement setresuid and setresgid in unistd (#234837)
### Summary
Implement the standard POSIX / Linux extension functions `setresuid` and
`setresgid` in `<unistd.h>`.
- Invokes existing internal `setresuid` and `setresgid` Linux syscall
wrappers.
- Adds entrypoints under `LLVM_LIBC_ENABLE_EXPERIMENTAL_ENTRYPOINTS`
across Linux target architectures (`aarch64`, `arm`, `riscv`, `x86_64`),
matching the design pattern established for credential-changing
(`setxid`) entrypoints.
- Adds `// TODO: Implement setxid propagation across threads.` comments.
- Adds unit tests in `libc/test/src/unistd/` covering noop (`-1`),
setting current real/effective IDs, and unprivileged invalid ID
behavior.
Fixes #234694.
[libc] Implement sigismember in signal (#234838)
### Summary
Implement the standard POSIX function `sigismember` in `<signal.h>`.
- Adds internal helper `signals::is_member` returning `ErrorOr<int>` in
`libc/src/__support/OSUtil/linux/sigmask.h`.
- Implements the `sigismember` public entrypoint in
`libc/src/signal/linux/sigismember.cpp`.
- Declares `sigismember` in `libc/include/signal.yaml` and
`libc/utils/docgen/signal.yaml`.
- Registers entrypoints for Linux (`x86_64`, `aarch64`, `riscv`).
- Adds unit tests in `libc/test/src/signal/sigismember_test.cpp`.
- Resolves existing TODO in `libc/test/src/ucontext/ucontext_test.cpp`
by using `sigismember`.
Fixes #234066.
dashboard: support indirect widget endpoint declarations
Allow widget metadata to mark individual endpoints as indirect when
API calls are delegated to a shared helper, as is the case for
HealthGraph.js + opnsense_health.js
Exclude indirect endpoints from direct source-call matching, but
do not exempt indirect call from ACL validation.
[X86] Combine mask_beforefirst to (x - 1) & ~x in GPR
EVEX and libc use this pattern in strcpy etc. to set the bits before the lowest set bit. It works correctly for x=0 too, returning an all ones mask.
Because SSE/AVX/AVX2 promote vNi1 types, do this as a DAG combine before type legalization.
We need to restrict it to power of 2 types otherwise we hit a latent crash in combineToExtendBoolVectorInReg.
[VPlan] Use llvm.mask.beforefirst for computing early exit mask
This makes the cost more accurate and improves codegen for RISC-V. The codegen for an early exit loop with side effects then goes from:
.LBB0_3: # %vector.body
# =>This Inner Loop Header: Depth=1
vl1r.v v16, (a3)
vsetvli zero, zero, e8, m1, ta, ma
vmseq.vi v16, v16, 0
vfirst.m a7, v16
srli t0, a7, 63
czero.nez a7, a7, t0
czero.eqz t0, a1, t0
or a7, t0, a7
vsetvli zero, zero, e64, m8, ta, ma
vmsltu.vx v0, v8, a7
vle8.v v17, (a5), v0.t
vcpop.m t1, v16
vsetvli zero, zero, e8, m1, ta, ma
[22 lines not shown]
[SelectionDAG] Handle splitting in get_active_lane_mask expansion
Split when the type is legal, e.g. v64i1, but the step vector needed for expansion needs split, e.g. v64i8.
This can happen on avx512 when the 512 bit registers are disabled.
[SelectionDAG] Fix get_active_lane_mask expansion on 32-bit targets
On e.g. wasm32, OpVT can be 32 bits whilst the StepVector type can be v2i64. When this happens DAG.getConstant asserts because maxUIntN doesn't fit into the 32 bits. Fix this by clamping it to OpVT's max size.
[ConstantFolding] Add constant folding for mask.beforefirst
Poison lanes poison the entire result, and undef elements are ignored
Assisted-by: Opus 5.5
[lldb][Clike] Add basic Type interface (#232822)
TypeSystemClike is effectively just a list of `Type` objects. These Type
objects are handed in/out via the TypeSystemAPI as
opaque_compiler_type_t pointers.
The actual logic for handling each TypeSystem API call is implemented in
the subclasses of Type. For each specific kind of type, the plan is to
subclass Type and let the subclass override the Type methods where
needed. The subclasses also store the data that is needed for
representing their type information.
For example, pointer types will later be represented as a `PointerType`
subclass that overrides `IsPointer` and `GetPointeeType` (and some
others). The class also stores the pointee type. From the
TypeSystemClike::IsPointerType side, we then call `IsPointer` on the
`Type` that was passed in.
This patch adds the Type class and the related classes needed to satisfy
[8 lines not shown]