Skip to content

[pull] main from llvm:main - #1672

Merged
pull[bot] merged 59 commits into
MPACT-ORG:mainfrom
llvm:main
Jul 24, 2026
Merged

[pull] main from llvm:main#1672
pull[bot] merged 59 commits into
MPACT-ORG:mainfrom
llvm:main

Conversation

@pull

@pull pull Bot commented Jul 24, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Jinjie-Huang and others added 30 commits July 24, 2026 19:55
…8569)

Background: Currently, BOLT seems to implicitly assume that the .dynsym
section is located at a low offset within the binary, calling pwrite()
directly to update it.

Issue: In scenarios where the binary has been modified by tools like
patchelf, sections like .dynsym may be moved to a high offset area. This
can lead to a violation of the Offset + Size <= Pos assertion in
pwrite(). A typical scenario is when the previous eh_frame_header update
moves the stream cursor (pos) back to a low
offset([code](https://github.com/llvm/llvm-project/blob/llvmorg-23-init/bolt/lib/Rewrite/RewriteInstance.cpp#L6387)).

Fix: This patch resolves the pwrite assertion failure via a new
safePWrite wrapper, which introduces a defensive check that verifies and
conditionally adjusts the stream position. A corresponding test case has
also been added.
… jobs (#211659)

On the macOS self-hosted runners, we need to install dependencies via
Homebrew and pinning the Xcode version is good for reproducibility. This
applies the guidelines documented in #211622 to libc++'s CI jobs.
PR #211508 ("foldShuffleToIdentity - ensure we push any created
instructions to the WorkList") started re-queueing every instruction
created by generateNewInstTree onto the VectorCombine worklist. When the
regenerated tree contains a bitcast, re-queueing the bitcast's operand
lets foldBitcastShuffle sink the bitcast back into a shuffle(bitcast),
which foldShuffleToIdentity then re-matches as the same superfluous
identity. On a widen/concat shuffle chain feeding a bitcast the two
folds
ping-pong and the pass never reaches a fixed point (observed as an opt
-O3 hang/timeout).

Keep the WorkList threading from PR #211508 (it enables further folds,
e.g. the improved intrinsics_minmax and two_concats cases) but don't
re-queue the operand of a regenerated bitcast, which is the only push
that feeds the foldBitcastShuffle <-> foldShuffleToIdentity loop.

Add an X86 regression test that previously looped and now terminates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…er (#206685)

Fixes #206628 crash by adding an earlier body argument verifier for
`affine.for`. This crash is caused because `LoopLikeOpInterface`
verifier would call `getRegionIterArgs()` and assumed induction var of
`affine.for` exists.
Unlike PAC CFI, we do not have the same unwinder constraint on PAuth_LR
CFI occurring before the PAC instruction. For AUT CFI, like other CFI
opcodes, these should always occur after the instruciton that they
reference.
…ctions (#211696)

Example:
```fortran
res = 0
!$cuf kernel do(2) <<< *, (32,8) >>> reduce(+:res)
do j2 = 1, n2
  do j1 = 1, n1
    res = res + a(j1, j2)
  end do
end do
```
In this code the reduction accumulator is per-(block_y, thread_y): each
worker row's shared slot is filled by an inner block-scoped combine, so
the rows hold distinct partials. The final combine into the result was
classified as not "worker-private" (block_y+thread_y into a global
dest), so it fell back to the ThreadY row-zero path and dropped every
worker but row 0 — a 2D SUM returned -1 instead of -4.
Fix: keep ThreadY active for a block_y+thread_y accumulator that is fed
by an inner block-scoped combine (distinct per-worker partials). A plain
worker accumulate still lowers to a worker-wide all_reduce that
broadcasts the total, so it correctly stays row-zero and is not
multiplied by the worker count.
Compute constant-folded powi using APFloat multiplies in the operand's
own semantics (square-and-multiply), matching the expansion
ExpandPowI generates in SelectionDAGBuilder, instead of routing
through std::pow via double/float conversion.
Similar to !exclude in that this attempts to guide section + flag
choices in a generic/abstract way.

`!exclude` tells LLVM to use the generic `SectionKind::Exclude` for the
globals. Likewise, `!metadata_section_kind` tells LLVM to use
`SectionKind::Metadata`.

The added docs go into a little more detail.

This is needed for the dynamic debugging feature, otherwise there's no
way to avoid `SHF_EXCLUDE` or `SHF_ALLOC` flags being added to the
section without special handling based on its name. We've moved to using
a new section type for dynamic debugging and we don't want to rely on
the name, which may be omitted.
…n all phi operands are undefined (#209013)

IncomingReg is only set to a register when allPhiOperandsUndefined does
not hold. Changes PHIEliminationImpl::LowerPHINode to check IncomingReg
before using it for debug phi.

Fixes #206324

Assisted-by: Codex
…mbly files (#211782)

This patch allows us to parse .ll files in verify-uselistorder correctly
and fixes failures in any testcase that uses this tool.
This converts a loop calling Process::ReadMemory into a single call to
Process::ReadMemoryRanges.
…64 X))))) (#211798)

Noticed while triaging #211619 - truncate the i64 to i32 directly to avoid extra shuffles
## [flang][OpenMP] Implement the `error` directive

### Summary

Implements the OpenMP `error` directive (OpenMP 5.1, 2.5.4) in Flang.
The directive prints a message and, with `severity(fatal)`, stops.
Handling depends on the `at` clause:

- **`at(compilation)`** (the default): handled in semantics. Emits a
compile-time warning or error and produces no IR.
- **`at(execution)`**: lowered to a new `omp.error` op, which becomes a
call to `__kmpc_error`.

Before this patch the directive was unimplemented and hit a `not yet
implemented: OmpErrorDirective` error during lowering.

Fixes #204240.

### Details

Changes go through the compiler pipeline.

**Flang semantics**
- `Enter(OmpErrorDirective)` emits the compile-time diagnostic for the
`at(compilation)` form, using the directive's severity and the `MESSAGE`
text when present.
- `Enter(OmpClause::Message)` checks that the `MESSAGE` expression is a
scalar, default-kind `CHARACTER`, which is required to pass it to the
runtime as a `const char*`.

**Flang lowering**
- `genErrorDirective` lowers the `at(execution)` form only.
- A constant message is stored in the `message` attribute. A
non-constant message is copied to a null-terminated buffer
(`genNullTerminatedString`) and passed as the `message_expr` operand,
because `__kmpc_error` expects a NUL-terminated string.

**New `omp.error` op (MLIR OpenMP dialect)**
- Adds a `ClauseSeverity` enum (`warning = 1`, `fatal = 2`, matching the
`__kmpc_error` argument) and `ClauseSeverityAttr`.
- `omp.error` takes a required `severity` attribute and an optional
message, given either as:
  - `message` — a constant string attribute, or
  - `message_expr` — a pointer to a null-terminated string.
- A verifier rejects providing both `message` and `message_expr`.

**MLIR → LLVM IR translation**
- Translates `omp.error` to `__kmpc_error(ident_t *, i32 severity, ptr
message)`.

**OMPIRBuilder**
- Adds `OpenMPIRBuilder::createError(...)`, which builds the call, maps
`fatal`→`2` and `warning`→`1`, and passes a null pointer when there is
no message.

### Tests

- **Parser** (`error-unparse.f90`): unparse and parse-tree output.
`at(compilation) severity(fatal)` cases that would stop compilation were
moved to `at(execution)`.
- **Semantics** (`Semantics/OpenMP/error.f90`): compilation
warning/error/default-severity cases, plus the new `MESSAGE` type, rank,
and kind errors.
- **Lowering** (`Lower/OpenMP/error.f90`): constant message, no message,
empty message, runtime `message_expr`, and `at(compilation)` cases that
must not produce `omp.error`. The old `Lower/OpenMP/Todo/error.f90` test
is removed.
- **MLIR** (`ops.mlir`, `invalid.mlir`): round-trip of each `omp.error`
form and the both-messages verifier error.
- **LLVM IR** (`openmp-llvm.mlir`): `__kmpc_error` calls for warning and
fatal, constant and runtime messages, and the null-message cases.

Assisted-by: Github Copilot
…11806)

A frame recognizer restricted to the first instruction matches when the
frame's PC equals the function's start address. On WebAssembly a
function begins with a non-executable local variable header, so the
symbol's start address is never a value the PC can take and such
recognizers never matched.

Route the start address through Architecture::SkipFunctionHeader, which
already maps a function start past this header for breakpoints and
disassembly, so the comparison uses the first executable instruction.
…1807)

The recognizer reads arguments through $arg1/$arg2, which resolve via
argument registers. WebAssembly has no argument registers and no ABI
plugin, and these tests build without debug info, so there is no
location to read the arguments from and they come back as zero.
The macOS benchmark jobs install python 3.14 via Homebrew but added the
wrong prefix (<prefix>/libexec/bin) instead of <prefix>/bin to the PATH.
Some of the program unittests were failing because errors weren't
consumed properly.
…_size (#211285)

reqd_work_group_size(X, Y, 1) does not guarantee the dispatch runs with
work_dim == 2, since the spec still allows enqueuing with work_dim == 3
and a unit-size Z dimension. Only fold hidden_grid_dims to a constant
when Z != 1 (work_dim must be 3)

Otherwise tighten the range instead of assuming an exact value

Alterative approach to #205866
without killing constant folding
Tests include
  * shl nuw tests with known bounds.
  * sadd.with.overflow.
  * decompose failures due to precondiitons
  * using info from latch condition
Classes that are annotated with `LLVM_ABI[_FOR_TEST]` should not have
individual member annotations. This PR drops the redundant member
annotations.

The effort to build LLVM as a dylib is tracked in #109483.
* Fix RUN-line in `VPlan/AArch64/call-decisions.ll` to work with UTC

"; -RUN" was resulting in

```
Error: Failed to update test <...>/call-decisions.ll
Traceback (most recent call last):
  File "<...>/update_analyze_test_checks.py", line 228, in main
    update_test(opt_basename, ti)
  File "<...>/update_analyze_test_checks.py", line 131, in update_test
    check_label_prefix = "VPlan for loop in " if regex == common.VPLAN_RE else ""
UnboundLocalError: local variable 'regex' referenced before assignment
```

* Regenerate CHECKs in VPlan/X86/vplan-vp-intrinsics.ll with UTC

* Split VPlan/interleave-and-scalarize-only.ll in two (VPlan/LLVM dumps)
to be able to use UTC plus use `-vplan-print-metadata=false` for VPlan
version

* Remove stale `CHECK-NOT`

Probably missed in `-debug` -> `-vplan-print-after` transition.
This patch adds the text flag when we are opening json files to parse. 
This fixes two lit failures on z/OS
Example:
```fortran
subroutine sum_loop(a, n)
  integer :: a(n), i
  do i = 1, n
    a(i) = i
  end do
end
```

In this code, the DO induction variable `i` is stepped each iteration.
`FIRToSCF` lowered that increment to a plain `arith.addi` with no
overflow flag — unlike the CFG-conversion path (`ControlFlowConverter`),
which marks it `overflow<nsw>` — so LLVM must assume the IV may wrap and
cannot form an affine recurrence, blocking analysis/vectorization of
loops lowered via `fir-to-scf`.

Fix: add a `set-nsw` pass option (default `true`, disabled under
`-fwrapv`) and mark the typed-IV, reconstructed final-value, and
`iterate_while` increments `nsw`, matching `ControlFlowConverter`;
`FirToSCF` lit tests updated accordingly.
…210154)

When both the source string and the search target are compile-time
constants, determine the outcome precisely and only emit the feasible
branch (found or not-found).
Handles strchr, strrchr, strchrnul, memchr, strstr, and strpbrk.

Fixes #209905

Assisted by: Kiro-cli

---------

Co-authored-by: Vladislav Aranov <vladislav.aranov@ericsson.com>
… managed assignments (#211640)

Assignments that read or write device/managed/unified data are
synchronous data transfers on stream 0 that wait for previously launched
kernels. Previously, whole-array managed = managed / host = managed
assignments, and assignments consuming a managed/unified/device function
result, were lowered as host copies (hlfir.assign), which can race an
asynchronous kernel that produced the data.

Emit cuf.data_transfer for these cases. Element-wise (scalar) accesses
and right-hand-side expressions involving managed data remain host
operations (the latter avoids materializing a temporary), and a
whole-allocatable left-hand side keeps reallocation semantics.
aobolensk and others added 27 commits July 24, 2026 17:43
…es operand value" (#211427)

Original PR: #206597
Revert PR: #211341

Relands abe757b. It was reverted due to my PR failing to update PHINode
entries in the default block, causing invalid IR in certain
circumstances. Original reproducer can be found
[here](#206597 (comment)).

We will now properly remove a PHINode entry if we remove a path from the
switch's block to the default block.

-------------------------------------------------------

If the default branch of a switch proves that there is only one value
that can be sent to the default branch, we can transform the default
branch into an explicit case of the switch. This can assist in further
simplification of the CFG during the simplification loop.

For example, we should be able to create an explicit case for the
default block in cases like the following:

```llvm-ir
switch_bb:
    switch i8 %x, label %default_bb [...]

default_bb:
    %cmp = icmp eq i8 %x, 1
    call void llvm.assume(i1 %cmp) ; Implies %x must be 1
```

Related to #50665.
Rewrite CodeGenCUDA cc1 test RUN lines from `-triple amdgcn...
-target-cpu gfxNNN` to the new subarch triple form, dropping the redundant
-target-cpu.
Autogenerated CHECK lines are regenerated. Tests that intentionally
assert the "target-cpu" function attribute are left unchanged.

Co-authored-by: Claude (Opus 4.8) <noreply@anthropic.com>
…huffle(binop(V1, V2), Mask) (#211530)

This is a general, cost driven version of the InstCombine fold (which
was limited to non-length changing cases in #211115), and also permits
folds with multiuse shuffles.

Fixes #210948
Rewrite CodeGenHIP cc1 test RUN lines to the new subarch triple form,
dropping the redundant -target-cpu, and regenerate autogenerated CHECK
lines. Tests whose behavior depends on the implicit wave32 default
(which is not enabled by a bare subarch triple) are left for a later change.

Co-authored-by: Claude (Opus 4.8) <noreply@anthropic.com>
Add lowering for bf16 fpext based on SDAG's ISD::BF16_TO_FP lowering.
…210172)

Flang does not enforce `DEFAULT(NONE)` for variables referenced in a
loop
associated with a standalone METADIRECTIVE. Consequently, it accepts
invalid
programs when a potentially selectable loop variant specifies
DEFAULT(NONE) but
omits a referenced variable from its data-sharing clauses. This change
checks the
associated loop for each potentially selectable `DEFAULT(NONE)` variant
and
diagnoses missing data-sharing attributes as it does for ordinary OpenMP
loop
constructs.

Standalone metadirectives and their associated loops are separate
parse-tree
nodes. For example:

```fortran
!$omp metadirective &
!$omp& when(implementation={vendor(llvm)}: &
!$omp& parallel do default(none) shared(n, a)) default(nothing)
do i = 1, n
  a(i) = x
end do
```

Unlike an ordinary `PARALLEL DO`, the loop is not nested under the
directive:

```text
METADIRECTIVE
`-- WHEN
    `-- PARALLEL DO DEFAULT(NONE) SHARED(n, a)

DO
`-- a(i) = x
```

Name resolution therefore leaves the variant context before visiting the
loop and
does not diagnose the missing data-sharing attribute for `x`.

After associating a metadirective with its loop, validate DEFAULT(NONE)
for each
potentially selectable loop variant. Preserve the existing rules for
predetermined and explicit data-sharing attributes, static locals,
nested
constructs, specification expressions, and statically inapplicable
variants.

Assisted with codex.
…211846)

PR #211495 changed the expedited "memory:<addr>=<bytes>" address parse
in SetThreadStopInfo from autosense (radix 0) to explicit base 16.
debugserver sends this address with a "0x" prefix, and
StringRef::getAsInteger only strips that prefix in autosense mode. With
an explicit base 16 the parse stops at the 'x' and fails, so the
expedited stack bytes are never seeded into the L1 memory cache.

Restore BASE_AUTOSENSE here, matching the documented format for this key
(0x hex, 0 octal, otherwise decimal). Fixes TestExpeditedStackMemory.py.
A terminator with two edges to the same block produced duplicate
dominator-tree insert/delete updates for that edge, tripping the
unbalanced-operations assertion. Deduplicate successors before
building the update list.

Reviewers: 

Pull Request: #211852
Before this commit, the following error persisted in the hexagon
backend.

Consider the `file.ll` with the following contents.
```
define <32 x float> @setoeq_v32f32(<32 x float> %a, <32 x float> %b,
                                    <32 x float> %c, <32 x float> %d) {
  %cmp = fcmp oeq <32 x float> %a, %b
  %r   = select <32 x i1> %cmp, <32 x float> %c, <32 x float> %d
  ret <32 x float> %r
}
```

Compiling it as `hexagon-llc -march=hexagon
-mattr=+hvxv81,+hvx-length128b file.ll`, we get

```
setoeq_v32f32:
        .cfi_startproc
        {
                q0 = vcmp.eq(v0.w,v1.w)
        }
        {
                v0 = vmux(q0,v2,v3)
                jumpr r31
        }
.Lfunc_end0:
        .size   setoeq_v32f32, .Lfunc_end0-setoeq_v32f32
        .cfi_endproc
```

It must be noted that the resulting code is using a bitwise comparison
leading to incorrect quiet-NaN behavior. In this patch, we use
vcmp_sf_eq function for the equality check to correctly handle the NaN
comparison behavior.

For Pre-v81, we synthesize oeq(a,b) as NOT(ogt(a,b) OR ogt(b,a) OR
isNaN(a) OR isNaN(b)) using the available float-GT instructions.

Co-authored-by: Kaushik Kulkarni <kauskulk@qti.qualcomm.com>
Co-authored-by: Sergei Larin <slarin@qti.qualcomm.com>
… args" (#211857)

Reverts #210154

Broke some build bots.
#210154 (comment)
https://lab.llvm.org/buildbot/#/builders/144/builds/60200

```
# | error: 'expected-error' diagnostics seen but not expected: 
# |   File /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Analysis/string-search-modeling.c Line 515: use of undeclared identifier 'u'
# |   File /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Analysis/string-search-modeling.c Line 527: use of undeclared identifier 'u'
# |   File /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Analysis/string-search-modeling.c Line 538: use of undeclared identifier 'U'
# |   File /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Analysis/string-search-modeling.c Line 550: use of undeclared identifier 'u'
# |   File /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Analysis/string-search-modeling.c Line 578: use of undeclared identifier 'u'
```
StringTable requires the first string to be empty, but this is never
useful for users that iterate over all strings in the table. Skip it by
default before drop_begin() on StringTable iteration scatters further
throughout the code base.
…ters (#211820)

evaluatePtrAddRecAtMaxBTCWillNotWrap currently bails out when
getPointerDereferenceableBytes reports a size that requires the pointer
to be non-null (as with the dereferenceable_or_null attribute), even
when a stronger dereferenceable assumption is available for the same
pointer.

Reset DerefBytes to 0 in that case so we fall through to
getKnowledgeForValue and pick up any dereferenceable assumption. This
lets early-exit loops guarded by such an assumption vectorize.
#211714)

When compiling `inline_memmove` with MSVC for non-x86 architectures, `op_generic.h` picks
a non-builtin type for generic_v128 and friends:
https://github.com/llvm/llvm-project/blob/cad3c95a89c48d714a71f6e8b4af6f3e3ab100ea/libc/src/string/memory_utils/op_generic.h#L54-L57

This causes calls to `load` and `store` to trigger ADL, which is
ambiguous with `load` definition in `memory_utils/utils.h`.

```
C:\Users\jtstogel\Github\llvm-project\libc\src/string/memory_utils/op_generic.h(348): error C2668: '__llvm_libc_24_0_0_git::generic::store': ambiguous call to overloaded function
C:\Users\jtstogel\Github\llvm-project\libc\src/string/memory_utils/op_generic.h(138): note: could be 'void __llvm_libc_24_0_0_git::generic::store<T>(__llvm_libc_24_0_0_git::Ptr,T)'
        with
        [
            T=__llvm_libc_24_0_0_git::inline_memmove_aarch64::uint512_t
        ]
C:\Users\jtstogel\Github\llvm-project\libc\src/string/memory_utils/utils.h(221): note: or       'void __llvm_libc_24_0_0_git::store<T>(__llvm_libc_24_0_0_git::Ptr,T)' [found using argument-dependent lookup]
        with
        [
            T=__llvm_libc_24_0_0_git::inline_memmove_aarch64::uint512_t
        ]
C:\Users\jtstogel\Github\llvm-project\libc\src/string/memory_utils/op_generic.h(348): note: while trying to match the argument list '(__llvm_libc_24_0_0_git::Ptr, const T)'
        with
        [
            T=__llvm_libc_24_0_0_git::inline_memmove_aarch64::uint512_t
        ]
```
…lls outside sysroot (#211351)

Currently if the compiler install is not under SYSROOT, we don't try to
compute the relative path to `libLLVMSYCL.so` based on the compiler
binary installation directory, resulting us never setting
`SYCLRTLibPath` so when we try to geenerate a linker call we get a raw
`libLLVMSYCL.so` which fails unless the user happens to be running the
compiler from a directory with `libLLVMSYCL.so` inside it.

It seems we never use the result from SYCLInstallationDetector on
Windows, so I can't add a test, however change the code to be consistent
in case we start to use it in the future.

---------

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
Rewrite Headers cc1 test RUN lines to the new subarch triple form,
dropping the redundant -target-cpu, and regenerate autogenerated CHECK
lines.

Co-authored-by: Claude (Opus 4.8) <noreply@anthropic.com>
Add conditional FreeBSD kernel headers when building baremetal profile
library. This is unconnected to a CMake target; it requires building
libprofile out of band with `-DCOMPILER_RT_PROFILE_BAREMETAL=1`
and `-I/usr/src/sys/sys`.

The headers replaced in this diff are not available when building for
FreeBSD kernel space. This is the first issue I hit when experimenting
with using the baremetal libprofile like this, so there may be other
changes required as I make progress.
When `digRecurrence` checks the use-def chain for a binary operator, it
simply uses a worklist to check the operands of each instruction. If
there are many instructions, and most instructions have multiple uses,
this takes exponentially long to compute, and can hang the compiler. Use
a visited set to skip instructions that have already been visited in the
use-def chain.

Credit to @freaknbigpanda for discovering this bug.
…glibc 2.42 or after. (#211039)

Make termios hermetic and address its compatibility with glibc 2.42
breaking change
with baud rate definitions:

https://inbox.sourceware.org/libc-announce/5906001.DvuYhMxLoT@pinacolada/T/

Fixes include:
- Baud rate translation utilities.
- Add proxy headers for termios.h macros and types.
- Update tests.

Assisted-by: Gemini 3.5 Flash.
…es (#210775)

`AccAttributeVisitor::Post(Name)` "adjusts" every name referenced inside
an OpenACC region to the symbol found in the current scope. A construct
entity -- a `DO CONCURRENT`/`FORALL` index-name, or a variable declared
in a `BLOCK` construct -- lives in its own scope nested within the
region, but the visitor's current scope does not descend into that
construct scope. `FindSymbol` therefore resolves the name to a
like-named variable in an enclosing scope and rebinds the reference to
it.

When such an entity shadows an enclosing DO variable and the loop is
associated with an OpenACC construct, this makes the entity alias that
active DO variable, so referencing or defining it wrongly triggers
"Cannot redefine DO variable" -- even though the code is legal and
compiles without error when OpenACC is disabled. This affected a `DO
CONCURRENT` index-name as well as a variable declared in a `BLOCK`
construct nested in the loop, e.g.:

```fortran
do i = 1, m
  !$acc parallel loop gang vector collapse(2) independent
  do concurrent (j = 1:n, ii = 1:m)
    block
      integer :: i     ! shadows the enclosing `do i`
      i = ii
      a(i,j) = b(i,j)
    end block
  end do
end do
```

Skip the adjustment when the resolved symbol is owned by a scope
contained in the current scope, i.e. it was declared within the region;
name resolution already bound it correctly. The `DO CONCURRENT`
induction variables are then privatized as their own construct-local
entities rather than the shadowed enclosing variable, as reflected in
the updated `acc-loop.f90` lowering test.

Add a Semantics regression test covering the `DO CONCURRENT` and `BLOCK`
cases.
…211669)

In `HandleAttributeStmt`, when an `ASYNCHRONOUS` or `VOLATILE` statement
names a variable not already in the current scope, flang creates a
host-association symbol — but only for `Subprogram` and `BlockConstruct`
scopes. Submodule scopes have kind `Module`, so the check excluded them.
This caused a fresh `EntityDetails` symbol (zero-initialized) to be
created instead of a `HostAssocDetails` symbol pointing at the ancestor
module variable, producing value 0 instead of the initialized value.

Fix: extend the condition to also fire when `currScope().IsSubmodule()`.
`Scope::FindSymbol` already traverses into the parent module for
submodules, so the host variable is found correctly.

Note: the `volatile`/`asynchronous` `fortran_attrs` are not propagated
to `hlfir.declare` for host-associated variables in general
(subprograms,
BLOCK constructs, and submodules); that is a separate lowering issue
tracked in #208588.

Fixes #208362

Assisted-By: AI
Addressing post-commit review comments for
#211326.
Adds CIR codegen support for the NVVM global uniform load builtins
`nvvm_ldu_*` ,including the integer, floating-point, and vector
variants.

These are lowered to the corresponding `llvm.nvvm.ldu.global.*`
intrinsics based on the pointee type.
…sing (#211828)

TargetID::parse checked that a named processor was a recognized GPU, but
not that it was consistent with the triple's subarch. A target id like
"amdgpu9.00-amd-amdhsa--gfx803" was accepted even though gfx803 does not
belong to the amdgpu9.00 subarch, silently taking the processor and
ignoring the mismatched subarch.

Co-authored-by: Claude (Opus 4.8) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Jul 24, 2026
@pull pull Bot added the ⤵️ pull label Jul 24, 2026
@pull
pull Bot merged commit 9195346 into MPACT-ORG:main Jul 24, 2026
14 of 16 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.