[AggressiveInstCombine] Add shufflevector support to TruncInstCombine (#220218)
Previously, expression graphs containing shufflevector could not be
reduced to a smaller bit-width. This change adds support for traversing
and rebuilding shufflevector operations during the transformation,
allowing truncation to propagate through shuffle operations.
The shuffle mask and vector shape are preserved while the operands are
rebuilt with the reduced element type.
This removes the corresponding TODO in TruncInstCombine.cpp.
AI Tool Used: GitHub Copilot
[AMDGPU] Add APIs `getTotalNumVGPRs` and `getAddressableNumVGPRs` to TargetParser (#220695)
These align with `getTotalNumSGPRs` and `getAddressableNumSGPRs` that
already exist.
[libc] Implement pthread_getattr_np (#221231)
Implement the GNU extension pthread_getattr_np.
For the stack address and size, the function returns the same value as
pthread_getstack_np. Specifically, this means returning
PTHREAD_STACK_DYNAMIC_NP for the main thread. Since we're not promising
async-signal-safety of this function, we could parse /proc/self/maps
(like glibc does), to get the actual stack VMA, but:
- that's a lot of code
- I'm not particularly fond of relying on /proc for libc features
- the consistency with pthread_getattr_np is nice
For these reasons, I'm not implementing this (or other alternatives like
RLIMIT_STACK) right now. This incidentally means that the current
implementation of this function is async-signal-safe, but that is likely
to change once we add support for additional attributes.
For consistency with glibc, I report the guard size of newly created
[4 lines not shown]
[libc++] Fix make_from_tuple for reference types (#220966)
#215067 refactored `make_from_tuple`, which introduced a regression when
trying to construct reference types with it.
[acc] Pre-cg pass for handling flang data mapping to offload runtime (#221282)
Introduce acc.map_info as the acc dialect operation that captures a
single mapped object's offload facts (attach point, descriptor kind,
bounds, map flags, and size) so later codegen can lower data clauses to
the offload runtime from one representation.
Add a Flang pre-codegen pass, ACCMapInfoPrep, that materializes
acc.map_info for FIR-typed operands: it infers Fortran descriptor attach
and CFI facts, sizes mapped and privatized storage, and folds paired
enter/exit clause effects into map flags. This keeps FIR-specific
mapping logic out of ACCToLLVM and leaves that conversion to consume
map_info verbatim.
[MicrosoftCXXABI] Remove unnecessary zero-index GEP (#222025)
This was creating a zero-index GEP constant expression, which is
equivalent to the base pointer, and will be folded away.
[MLIR][NVVM] Add optional llc verification for NVVM dialect tests (#219980)
The motivation is to verify that MLIR NVVM dialect operations lower to
LLVM IR that is accepted by the NVPTX backend. Running llc gives these
tests an extra end-to-end check beyond textual IR matching and helps
catch mismatches between MLIR lowering, NVVM intrinsics, and backend
expectations.
A valid LLVM intrinsic call isn't necessarily selectable for every
combination of its immargs and target features. There is a concrete
NVPTX example in
`llvm/test/CodeGen/NVPTX/tcgen05-mma-collector-b-i8-invalid.ll`. The
intrinsic has a valid signature and individually valid immediate values,
but the combination `kind=i8` and `collector_b=lastuse` is not
supported. LLVM IR verification accepts it, while `llc` rejects it with
Cannot select.
The corresponding MLIR verifier does not duplicate every NVPTX
instruction-selection predicate. It currently checks MLIR-level
[22 lines not shown]
NAS-143184 / 26.0.0-RC.1 / Rename the DIRECTORY_SERVICES entitlement to DIRECTORY_SERVICES_AUTH (by sonicaj) (#19653)
This commit adds changes to follow the LicenseFeature rename in
truenas_pylicensed, covering the entitlement matrix, the policy
register, display names, the per-feature message overrides, the legacy
injection set and the ds_auth gate. The unrelated directoryservices
namespace and the ds_auth field itself are deliberately untouched.
Worth flagging for whoever lands this: python3-truenas-pylicensed is
unversioned in debian/control, and because this is a rename rather than
an addition, both skew directions break at import time. New middleware
against the old package and old middleware against the new one each
raise AttributeError while importing middlewared.utils.entitlements,
which leaves middlewared unable to start.
Original PR: https://github.com/truenas/middleware/pull/19632
Co-authored-by: Waqar Ahmed <waqarahmedjoyia at live.com>
[RISCV] Stop ignoring intrinsics in costing for force unrolling (#221107)
All intrinsic calls were hitting the "continue" for !isLoweredToCall
and bypassing the getInstructionCost.
I've modified runtime-unroll-max-trip-count.ll to override unrolling
costs and remove the bswap intrinsics that were previously not counted.
Test case written by Claude.
[CGObjCMac] Remove unnecssary zero-index GEPs (#222023)
getConstantGEP() was always called with two zero indices. However,
with opaque pointers, zero-index GEPs are redundant and will fold
away.
[CIR][NVPTX] Add support for NVVM half type builtins (#221859)
Adds codegen for the following NVVM half type builtins:
- `__nvvm_ex2_approx_{f16,f16x2}`
- `__nvvm_fmin{_ftz,}{_nan,}{_xorsign_abs,}_{f16,f16x2}`
- `__nvvm_fmax{_ftz,}{_nan,}{_xorsign_abs,}_{f16,f16x2}`
- `__nvvm_fma_rn{_ftz,}{_relu,_sat,}_{f16,f16x2}`
- `__nvvm_fma_rn_oob{_relu,}_{f16,bf16,f16x2,bf16x2}`
These are lowered to the corresponding llvm.nvvm.* intrinsics.
This diverges a bit from OG, as no half-type helper is needed here. OG
routes these through `MakeHalfType`, which coerces each argument to the
intrinsic's declared parameter type, appends the intrinsic's defaulted
arguments, and
asserts that no argument is an integer constant expression. None of that
is needed for the builtins in this patch as each already agrees with its
intrinsic on operand and result types, and none has defaulted
[6 lines not shown]
[WindowsSecureHotPatching] Remove redundant getGetElementPtr() (NFC) (#222019)
This was creating a degenerate getelementptr without any indices,
which is equivalent to the base pointer and will fold away.
[Attributor] Remove dead function getKnownConstantRange (#221897)
getKnownConstantRange was added on January 15, 2020 in commit
188f9a348dc545bf9a420d998ad37761bddd7285 without any callers and has
been unused since.
NAS-143184 / 26.0.0 / Rename the DIRECTORY_SERVICES entitlement to DIRECTORY_SERVICES_AUTH (#19632)
This commit adds changes to follow the LicenseFeature rename in
truenas_pylicensed, covering the entitlement matrix, the policy
register, display names, the per-feature message overrides, the legacy
injection set and the ds_auth gate. The unrelated directoryservices
namespace and the ds_auth field itself are deliberately untouched.
Worth flagging for whoever lands this: python3-truenas-pylicensed is
unversioned in debian/control, and because this is a rename rather than
an addition, both skew directions break at import time. New middleware
against the old package and old middleware against the new one each
raise AttributeError while importing middlewared.utils.entitlements,
which leaves middlewared unable to start.
[SLP][modularisation][NFC] Move pointer/stride helpers to SLPMemoryUtils (#221786)
Move the following BoUpSLP-independent pointer/stride helpers out of
SLPVectorizer.cpp into a new SLPVectorizer/SLPMemoryUtils.{h,cpp}:
arePointersCompatible
computeCommonAlignment
calculateRtStride
arePointersCompatible reads the file-local RecursionMaxDepth cl::opt.
The option stays static in SLPVectorizer.cpp; the moved helper takes its
value as an explicit unsigned parameter. Behavior is unchanged.
Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
Assisted by AI.
[lldb] Add requireClang decorator (#222007)
- Add requireClang, marking Clang-only tests as UNSUPPORTED elsewhere
instead of SKIPPED, following the existing require* convention.
- Replace the ~30 standalone @skipIf(compiler=no_match("clang")) uses
with @requireClang; leave the cases paired with a compiler_version check
as-is, since those are more complex than a simple compiler check.
- Remove the now-unused skipUnlessCompilerIsClang in favor of
requireClang.
- Update the testing docs to mention requireClang.
Follow-up to #214197.
resterm: Update to 1.7.0
Editor diagnostics
Diagnostic settings
Variable and expression errors
Unicode text
Response split shortcuts
Other improvements
[X86] LowerCLMUL - fix unpack order of vXi32 CLMUL/CLMULH codegen (#222001)
Fix typo in the unpack order for vXi32 CLMUL/CLMULH codegen from #221289
and #221668 - I'd gotten the variable names right, but failed to
actually use the right variables!
Fixes #221964
MachinePipeliner: Fix using getUniqueVRegDef on a physical register
Currently this is permissive and doesn't assert when called with
a physical register, but I'm working on changing this edge case.
No current observable change.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>