[flang][acc] Add tests for implicit `acc declare` of type descriptors (#203100)
Adds 4 tests to cover different cases which requires implicit `acc
declare` for type descriptors.
[CIR] NFC: Address byval review feedback in CallConvLowering
Second-pass review cleanup on the byval/byref argument lowering in
CIRABIRewriteContext, no functional change.
updateArgAttrs now builds its attributes through an mlir::Builder, so the
arg-attr construction reads as getNamedAttr / getI64IntegerAttr /
getUnitAttr instead of spelling out StringAttr::get and the IntegerType
plumbing by hand; the Extend branch loses its empty-vs-nonempty special
case since the append path handles both. The llvm.byval / llvm.byref
comment now says why the pointee type is carried explicitly: it is a
typed attribute and the type cannot be recovered from the opaque LLVM
pointer after lowering.
insertArgCoercion gains an early continue for the classifications that
need no entry-block fixup (Extend, Ignore, and Direct without coercion),
so the remaining if/else covers exactly the two cases that do work
(Direct-with-coercion and Indirect) with no silent do-nothing branch.
[3 lines not shown]
[NFC][Support] Define Prefix/SuffixMetacharacters constants (#202850)
Extract literal metacharacter strings used in GlobPattern into static
constexpr arrays to improve consistency and maintainability.
Assisted-by: Gemini
[libc][math] Add isnanf128 (#199206)
## Summary
- Add a fputil-based isnanf128 implementation and wire it into libc math
entrypoints, public math header generation, and shared math wrappers.
- Add smoke test coverage for float128 NaN classification and shared
math runtime/constexpr coverage.
Part of #195400
---------
Signed-off-by: Vedant Neve <vedantneve13 at gmail.com>
[CIR] NFC: Extract rewriteIndirectReturnCall helper
The sret call-site rewrite was a large block inside rewriteCallSite.
Move it into a dedicated rewriteIndirectReturnCall helper in the
anonymous namespace, leaving rewriteCallSite to dispatch to it when the
return is indirect.
Pure code motion: the Indirect-and-has-result guard stays at the call
site (the moved block dereferences the call result, so the guard cannot
fold into the helper), and the helper derives its MLIR context from the
call. No behavior change.
[CIR] Lower pointer const_array globals without insertvalue chains (#198427)
`cir.global` initializers that are `const_array` of `global_view` (no
indices) or null pointers were lowered through an initializer region
full of `llvm.insertvalue` ops even though the elements are all
attribute-representable. That forced the O(N²) MLIR-to-LLVM IR path
on large tables (SPEC CPU 2026 `gcc/insn-automata.cc`).
When `lowerConstArrayAttr` can build the whole initializer, emit the
global with one aggregate attribute instead. String literals with
`trailing_zeros` are padded into `DenseElementsAttr` so C string tables
take the same bulk path. Indexed `global_view`, `#cir.zero` arrays, and
other non-bulk cases still use the insertvalue path.
MLIR prerequisite
[#198424](https://github.com/llvm/llvm-project/pull/198424) is merged on
`main`; this branch is rebased and CIR-only.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
[CIR] NFC: Address sret review feedback in CallConvLowering
Apply andykaylor's second-round feedback on the sret lowering.
All source changes are behavior-preserving:
- Use llvm::append_range when copying arg_attrs into the sret
call's and the definition's attribute lists.
- Replace the manual pad loop in applySretSlotAttrs with an
assert plus resize to the rewritten operand count.
- Rename the Ignore-drop loop's index variables so the outer
one (argInfoIdx) indexes fc.argInfos and the inner one
(blockIdx) is the real block-argument index, matching the
convention insertArgCoercion already uses.
- Clarify the "hidden pointer" comments: the sret pointer is
synthesized by the ABI and is not part of the source-level
signature.
- Note why the llvm.sret attribute must carry the return type
explicitly, since LLVM pointers are opaque once lowered.
[6 lines not shown]
[X86] Add aligned atomic vector store tests wider than 128 bits (NFC) (#202537)
These >128-bit stores are expanded to __atomic_store libcalls regardless
of alignment, since x86 caps atomic ops at 128 bits.
[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]
[bazel] Added targets for flang, flang-rt, and openmp (#202791)
This change adds the necessary targets for a fortran toolchain. `flang`
for the compiler itself, `flang-rt` for executable support, and `openmp`
for `!$omp` directives within fortran code.
[Demangle] Implement type D demangling and add all D basic type encodings (#202834)
This patch adds type name output to D demangler `parseType` and adds all
D basic type encodings to it.