[GlobalISel] Add G_ROTL/G_ROTR to computeNumSignBits (#213364)
Port SelectionDAG's `ROTL`/`ROTR` handling to
`GISelValueTracking::computeNumSignBits`.
Addresses one of the subtasks of #150515.
---
Assisted by Claude (Anthropic).
[CIR][AMDGPU] Add support for AMDGCN permlane builtins (#197526)
Adds codegen for the following AMDGCN permlane builtins:
- __builtin_amdgcn_permlane16
- __builtin_amdgcn_permlane64
- __builtin_amdgcn_permlanex16
These are lowered to the corresponding `llvm.amdgcn.permlane16`,
`llvm.amdgcn.permlanex16`, and `llvm.amdgcn.permlane64` intrinsics.
DAG: Gracefully diagnose missing soft-float and strict-FP libcalls
Several soft-float legalization paths legalizer, called into a libcall
without checking whether the target provides one, fatally erroring for
fp128 operations on targets with no soft-float support.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[flang] Reject module-scope fir.alloca (#214157)
`fir.alloca` represents a stack allocation, but its verifier currently
accepts operations placed directly in a `builtin.module`. During
FIR-to-LLVM conversion, `AllocaOpConversion::matchAndRewrite` calls
`getBlockForAllocaInsert`, which performs a `dyn_cast` to
`OutlineableOpenMPOpInterface` on the alloca's parent op.
For a module-level alloca the expected parent function/block does not
exist and the cast/assert fails.
This patch rejectsdirect module-scope `fir.alloca` operations during FIR
verification.
Assisted-by: codex
---------
Signed-off-by: Keshav Vinayak Jha <keshavvinayakjha at gmail.com>
[Flang] Coarray allocation, update error for pointer component #193829 (#194651)
The TODO message in `verify()` was not completly displayed, so it has
been replaced by `emitErrorOp`.
In addition, the test in `ConvertVariable` has been updated by adding
pointer direct component case.
Fix #193829
(cherry picked from commit 9adc2537177d0813301b3eab1bae906735c984a4)
[lldb] Fix typo in SBUnixSignals.get_unix_signals_list (#213527)
Found when looking through the generated Python file. `sig` doesn't
exist in that context, it should be `idx`.
(cherry picked from commit def770df8325fb60107c24a2de3068aa762754ab)
workflows/release-binaries: Always dump Wix log on Windows (#212056)
Dumping it only on successful builds isn't useful.
(cherry picked from commit cb274010df165e9187233b50babc89fff2103ed5)
[BOLT] Flip the first and last bits of build ID (#214784)
With only the last bit in a build ID flipped, some crash analysis or
symbolication tools that derive module ID from the first 16 bytes are
not able to differentiate pre- and post-BOLT libraries if both are
archived. So besides the last bit, we now also flip the high bit of
the first byte in a build ID.
[flang] Defer typing of forward-referenced DATA implied-DO indices (#214473)
F2023 19.4 p5 gives a data-i-do-variable without an explicit
integer-type-spec the type that its name would have as a variable of the
innermost scoping unit including the DATA statement. That is a property
of the whole scoping unit: since a data-stmt is a declaration-construct,
the type declaration statement establishing the name's type may follow
the DATA statement in the same specification part. Name resolution
resolved the index eagerly at the DATA statement, so under IMPLICIT
NONE(TYPE) a later declaration drew a spurious "No explicit type
declared" error, and without IMPLICIT NONE a later declaration with a
non-default kind was ignored.
Defer the typing of such indices to the end of the specification part,
mirroring the existing deferral for ordinary DATA statement objects.
DATA statements in an execution part keep the current eager resolution.
Assisted-by: AI
[clang-tidy][docs] Rename bugprone check docs to Markdown [3/4] (#214421)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is the mechanical rename for part 3/4 of the remaining `bugprone`
check documentation.
The rewrite is provided by the next PR in this stack.
[clang-tidy][docs] Rewrite bugprone check docs to Markdown [3/4] (#214422)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This rewrites part 3/4 of the remaining bugprone check documentation
from reST to MyST Markdown.
AI Usage: This was prepared with rst2myst and GPT5.6-assisted cleanup.
I manually verified that the documentation renders as expected.
Preview site:
https://broken.life/llvm-staging/bugprone-markdown-port/
[mlir][Transforms] Check successor operand types before merging identical blocks (#215036)
Merging identical blocks threads their differing values through the
predecessors' terminators as new successor operands, but the only
legality question asked of a predecessor was whether its terminator
implements `BranchOpInterface` (`ableToUpdatePredOperands`). The
transform's implicit assumption is that such a terminator can forward
operands of **any** type — false for dialects whose branch ops constrain
successor operand types. The LLVM dialect terminators declare theirs as
`Variadic<LLVM_Type>`, so merging two blocks that differ in, say, an
index-typed operand rewrote a verifying `llvm.cond_br` into one that no
longer verifies.
Reproducer (mixed-dialect IR of the kind a progressive lowering/raising
pipeline carries), via `mlir-opt
-pass-pipeline='builtin.module(func.func(canonicalize{region-simplify=aggressive}))'`:
```mlir
func.func @f(%m: memref<4xf32>, %c: i1) {
[33 lines not shown]
[JITLink] Notify memory managers on JITLinkDylib destruction (#214739)
Add JITLinkDylib::notifyOnDestruction so a JITLinkMemoryManager can
register to be told when a JITLinkDylib it served is being torn down,
giving it a chance to release resources held on the dylib's behalf (e.g.
reserved address ranges). Notification may be handled asynchronously:
once notifyDestroying is called, the JITLinkDylib is guaranteed not to
make further use of those resources.
[ORC] Make RTBridge Callers value types; add buildCallers (#215046)
rt::Caller was an abstract base with a per-protocol subclass
(rt::sps::Caller), so holding one polymorphically meant a vtable and a
heap allocation, and each caller stored an ExecutionSession reference.
Replace that with a value type: rt::Caller<Sig> holds a callee address
and a dispatch function pointer (CallerBase provides the address,
operator bool, and calleeAddr()). The serialization/dispatch protocol is
erased behind the function pointer instead of a class hierarchy, so
callers are copyable, carry no vtable or heap allocation, can be stored
inline, and take the ExecutionSession at the call rather than storing
it. This lets non-templated generic code hold and invoke callers without
knowing the protocol.
rt::sps::CallerSpec supplies a caller's dispatch function and
controller-interface name; the named specs (MainCallerSpec,
VoidVoidCallerSpec, ...) replace the previous rt::sps caller subclasses.
[3 lines not shown]
[DomTree] Remove redundant getNodeForBlock. NFC (#215045)
Semi-NCA has given every node a dominator with a smaller DFS number,
whose node already exists.
[libc] Disable hermetic version of printf_core.parser_test (#215037)
It fails on amdgpu:
https://lab.llvm.org/buildbot/#/builders/10/builds/33548
ld.lld: error: undefined symbol: operator delete(void*, unsigned long,
std::align_val_t)
This effectively reverts a part of #213852.
[clang] Simplify the overload resolution logic for operator new and new[] (#211482)
This PR replaces the current spec-equivalent argument list mutation with
direct iteration of the correctly ordered set of argument lists for a
given allocation.
This adds a bit of architectural work around the argument list
construction but the overall effect is substantially simplified search
of the overload candidates
LLM usage: Claude found align_val_t caching bug, and found and created a
test for reentrant `getTypeIdentityArgument`+`tryBuildStdTypeIdentity`
[flang] To fix LIT test that AIX does not emit comdat. (#214950)
PR #213890 added this new LIT test.
However, AIX uses XCOFF and does not emit COFF COMDAT.