LLVM/project babaf7b — utils/bazel/llvm-project-overlay/llvm BUILD.bazel

[Bazel] Remove unnecessary arm-specific select in BUILD (#246329)

and scope x86 BLAKE3 macros to local_defines. This limits defines
propagation to other targets.

- Drop BLAKE3_USE_NEON, dispatched at
llvm/lib/Support/BLAKE3/blake3_impl.h
- Move x86 BLAKE3_* into local_defines to prevent propagation.
DeltaFile
+10-14utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+10-141 files

LLVM/project 3323d43 — llvm/include/llvm/ExecutionEngine/Orc OrcABISupport.h, llvm/lib/ExecutionEngine/Orc EPCIndirectionUtils.cpp LazyReexports.cpp

[ORC] Add SystemZ ABI for lazy call-through and indirect stub support (#235879)

This PR adds the OrcSystemZ ABI class with a resolver, trampolines, and
indirect stubs for lazy compilation on s390x. Register it in the
indirection utilities, the lazy call-through manager, and the compile
callback and stub manager factories.

Resolves: #231908
DeltaFile
+164-0llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
+37-0llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h
+34-0llvm/test/ExecutionEngine/OrcLazy/systemz-vector-lazy-call.ll
+11-0llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
+4-0llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp
+3-0llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp
+253-01 files not shown
+254-07 files

LLVM/project d45d2ed — llvm/include/llvm/MC MCAsmInfo.h, llvm/lib/MC MCAsmInfoXCOFF.cpp MCAsmInfoELF.cpp

[spr] initial version

Created using spr 2.0.0-beta.2
DeltaFile
+0-5llvm/lib/MC/MCAsmInfoDarwin.cpp
+0-4llvm/lib/MC/MCAsmInfoXCOFF.cpp
+0-4llvm/lib/MC/MCAsmInfoELF.cpp
+0-4llvm/lib/MC/MCAsmInfoCOFF.cpp
+0-4llvm/include/llvm/MC/MCAsmInfo.h
+2-2llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+2-238 files not shown
+6-3114 files

LLVM/project 87a9299 — llvm/lib/Target/Hexagon HexagonPeephole.cpp HexagonISelLoweringHVX.cpp

[Hexagon] Declare command line options in TableGen  (#241871)

Move some cl::opts that the Hexagon CodeGen passes and subtarget read
into HexagonOptions.td. llvm-min-tblgen generates a HexagonOptions
struct from it, so the file-level cl::opt variables for these options
are gone. The default values are the same as before.

HexagonTargetMachine binds its copy of the struct once, from
MCTargetOptions::LibraryOptions. HexagonSubtarget takes the same
reference from its TargetMachine, and the passes read the values through
the subtarget. The struct is registered from
LLVMInitializeHexagonTarget().

A few options needed a different field type to keep their behavior:

- Options that were checked with getNumOccurrences() are std::optional
fields, such as hexagon-hvx-widen and shrink-frame-limit.
- Options where the code needs to know whether the user set a value
(enable-bsb-sched, hexagon-long-calls) are BoolOrDefault.

    [30 lines not shown]
DeltaFile
+150-0llvm/lib/Target/Hexagon/HexagonOptions.td
+28-76llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
+23-53llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
+16-30llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp
+17-26llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
+10-31llvm/lib/Target/Hexagon/HexagonPeephole.cpp
+244-21633 files not shown
+339-31639 files

LLVM/project 7bcdf0a — clang/include/clang/CIR/Dialect/IR CIRAttrs.td CIRDialect.h, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Use one check for ignorable FP exceptions (#245985)

Speculation and lowering each decided on their own whether a constrained
operation can ignore floating-point exceptions, and they disagreed. An
operation with `fenv<strict_except = false>` was speculatable but
lowered to `fpexcept.maytrap`, and one with masked but strict exceptions
was not speculatable but lowered to `fpexcept.ignore`. `cir.vec.fcmp`
never folded a constrained comparison.

This adds `FenvAttr::canIgnoreExceptions()`, true when exceptions are
masked and not strict, and uses it in all three places:

- Speculation already used this condition and does not change.
- Lowering emits `fpexcept.ignore` when it holds, and otherwise
`fpexcept.strict` or `fpexcept.maytrap` by `strict_except`. Three
hand-written forms change: `fenv<strict_except = false>` goes from
maytrap to ignore, masked exceptions with `strict_except = true` from
ignore to strict, and unmasked or unknown exceptions without
`strict_except` from ignore to maytrap. The first changes an existing

    [9 lines not shown]
DeltaFile
+145-0clang/test/CIR/Transforms/vector-cmp-fold.cir
+21-1clang/test/CIR/Lowering/fenv.cir
+7-6clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+8-5clang/include/clang/CIR/Dialect/IR/CIRDialect.h
+3-6clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+7-0clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+191-186 files

LLVM/project ca952ce — llvm/lib/Target/AMDGPU SIInstrInfo.td

[AMDGPU][NFCI] Let novm operands be parsed and created

b9b7b31e2368 set AlwaysIgnoreNegative for exp_vm, so novm is
parsed and then dropped without producing an operand. This is not
needed, because vm is already an optional operand.
DeltaFile
+1-1llvm/lib/Target/AMDGPU/SIInstrInfo.td
+1-11 files

LLVM/project 88e5e07 — llvm/include/llvm/CodeGen TargetInstrInfo.h, llvm/include/llvm/MC MCAsmInfo.h

[spr] initial version

Created using spr 2.0.0-beta.2
DeltaFile
+0-20llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
+20-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp
+5-4llvm/lib/CodeGen/TargetInstrInfo.cpp
+4-4llvm/include/llvm/CodeGen/TargetInstrInfo.h
+2-5llvm/include/llvm/MC/MCAsmInfo.h
+2-4llvm/lib/Target/Hexagon/HexagonInstrInfo.h
+33-375 files not shown
+41-4211 files

LLVM/project 73469a4 — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 dpbusd_i4.ll

[X86] SimplifyMultipleUseDemandedBitsForTargetNode - skip unnecessary (VSRLI (VSHLI X, C1), C1) ZERO_EXTEND_INREG patterns (#246639)

If we're clearing the upper bits, but never demanding them, then skip
the shift-pair

Yak shaving for #245048
DeltaFile
+14-0llvm/lib/Target/X86/X86ISelLowering.cpp
+0-2llvm/test/CodeGen/X86/dpbusd_i4.ll
+14-22 files

LLVM/project 8b6b40f — llvm/docs NVPTXUsage.md, llvm/test/CodeGen/NVPTX mbarrier_wait_results_sm90_ptx93.ll mbarrier_wait_relaxed_report_sm90_ptx93.ll

[LLVM][NVPTX] Add primary and conditional phase mbarriers support (#241857)

This change adds support of mbarrier with primary and conditional phases.
DeltaFile
+720-0llvm/test/CodeGen/NVPTX/mbarrier_wait_acquire_sm90_ptx93.ll
+719-0llvm/test/CodeGen/NVPTX/mbarrier_wait_relaxed_sm90_ptx93.ll
+576-0llvm/test/CodeGen/NVPTX/mbarrier_wait_acquire_report_sm90_ptx93.ll
+575-0llvm/test/CodeGen/NVPTX/mbarrier_wait_relaxed_report_sm90_ptx93.ll
+427-0llvm/test/CodeGen/NVPTX/mbarrier_wait_results_sm90_ptx93.ll
+130-0llvm/docs/NVPTXUsage.md
+3,147-04 files not shown
+3,294-210 files

LLVM/project 2a84a20 — llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp, llvm/test/CodeGen/AMDGPU waitcnt-vavdst-loop-header.mir

[AMDGPU] Defer S_WAITCNT_DEPCTR erasure and updates in expert mode (#246081)

A pre-existing S_WAITCNT_DEPCTR was erased, or had its VA_VDST and
VM_VSRC fields relaxed, as soon as the incoming state made those waits
look redundant. In a loop header that happens on the first visit, before
the backedge adds the instructions of the loop body. The wait is then
lost when the header is visited again with them pending.

Keep the original operand of every S_WAITCNT_DEPCTR, including
duplicates, while iterating to the fixed point, and only apply the final
encoding or erase the instruction at the end of the pass.

Assisted by: Claude Opus 5.5
DeltaFile
+40-46llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+6-4llvm/test/CodeGen/AMDGPU/waitcnt-vavdst-loop-header.mir
+46-502 files

LLVM/project 400d680 — clang/lib/CIR/CodeGen CIRGenExprScalar.cpp, clang/test/CIR/CodeGen pragma-fenv_access.c

[CIR] Use the FP environment of a compound assignment for its conversions (#246035)

`ScalarExprEmitter::emitCompoundAssignLValue` emitted the conversions of
a compound assignment, from the left operand to the computation type and
back, without a `CIRGenFPOptionsRAII`. Under `#pragma STDC FENV_ACCESS
ON` the arithmetic was constrained but the conversions of `x *= 0.1` or
`i += x` got the default environment, and lowered to plain `fpext`,
`fptrunc`, `sitofp` and `fptosi` where classic codegen emits constrained
intrinsics.

Install the RAII with the features of the assignment after the left
operand is loaded, as classic codegen does.

Assisted-by: Claude Code (Fable 5.2).
DeltaFile
+58-0clang/test/CIR/CodeGen/pragma-fenv_access.c
+1-0clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+59-02 files

LLVM/project 37a2b3c — llvm/lib/Target/AMDGPU SIInstrInfo.td

[AMDGPU][NFC] Remove unused operand defs

Were added in b9b7b31e2368 and b49855fc5684, but never used.
DeltaFile
+0-3llvm/lib/Target/AMDGPU/SIInstrInfo.td
+0-31 files

LLVM/project 79be3be — clang/lib/CIR/Dialect/Transforms GotoElimination.cpp, clang/test/CIR/CodeGen goto.cpp switch.cpp

[CIR] Normalize switches before routing gotos

A cir.case below another op inside its switch (Duff's device, or a case
in a scope, loop or if of the switch body) and a label in a switch body
before the first case both enter a block without a CFG or region edge.

cir-goto-elimination now normalizes switches first. A nested case becomes
a fresh label where it was, followed by a scope holding its body, which
normal execution still runs; a direct case with the same values, in a
block at the end of the switch body that nothing falls into, jumps to the
label. Code before a switch's first case that holds a label is reached
only through gotos, so it moves out of the switch, off the normal path:
where it would fall into the first case it jumps to a label at that case's
start, a break that leaves the switch jumps to a label after it, and its
allocas move before the switch. The gotos this creates are routed like any
other.

Assisted-by: Claude Code (Opus 5.5).
DeltaFile
+214-0clang/lib/CIR/Dialect/Transforms/GotoElimination.cpp
+121-42clang/test/CIR/CodeGen/switch-cleanup.cpp
+78-50clang/test/CIR/CodeGen/switch-pre-case-stmts.cpp
+83-13clang/test/CIR/CodeGen/switch.cpp
+65-25clang/test/CIR/CodeGen/goto.cpp
+84-4clang/test/CIR/Transforms/goto-elimination.cir
+645-1342 files not shown
+679-1378 files

LLVM/project 985de9f — clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/CodeGen CIRGenCXX.cpp

[CIR] Mark LoweringPrepare init functions strictfp

Classic codegen's StartFunction makes a function that has no
FunctionDecl `strictfp` when the TU-wide default FP environment is
constrained: FP exceptions are not ignored or the rounding mode is
dynamic. Of those functions ClangIR creates `_GLOBAL__sub_I_*`,
`_GLOBAL__I_*`, the C++20 module initializer, `__cxx_global_var_init*`,
`__cxx_global_array_dtor*` and `__tls_init`. It marked only
`__cxx_global_var_init*`, through a `strictfp` attribute on `cir.global`,
so the other functions and the calls in them were not `strictfp`.
Classic also marks the `__dtor_*` stubs, `_GLOBAL__D_a` and
`__GLOBAL_cleanup_*`, which ClangIR does not emit.

LoweringPrepare creates these functions after CIRGen, so it reads the
TU-wide default from `#cir.lowering_options`. `no_trapping_math` already
records whether FP exceptions are ignored, and the new `rounding_math`
field mirrors `LangOptions::RoundingMath`. It is omitted when false, so
the module attribute prints as before without `-frounding-math`.
`buildRuntimeFunction` adds `strictfp` together with the other TU-wide

    [8 lines not shown]
DeltaFile
+98-0clang/test/CIR/CodeGen/global-init-fn-strictfp.cpp
+38-0clang/test/CIR/Transforms/lowering-prepare-strictfp.cir
+35-0clang/test/CIR/CodeGen/cxx20-module-initializer-strictfp.cppm
+14-10clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+11-2clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+2-6clang/lib/CIR/CodeGen/CIRGenCXX.cpp
+198-183 files not shown
+200-289 files

LLVM/project 529c075 — clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenBuilder.h

[CIR] Keep three-way comparisons constrained in strict FP functions

In a strictfp function ClangIR emitted plain `fcmp` for a three-way
comparison of floating-point values, where classic codegen emits
`llvm.experimental.constrained.fcmp`. `cir.cmp3way` had no `fenv`
attribute, and LoweringPrepare expanded it with a builder that has no
floating-point state.

This gives the operation the optional `fenv` attribute, valid only for
floating-point operands, and the fenv traits of the scalar operations
in place of `Pure`:

- CIRGen attaches the attribute. Like classic codegen it opens no
  FP-options scope for the comparison itself, so the comparison takes
  the environment in effect around it. In `return x <=> y` under
  `FENV_ACCESS ON` alone that is the default of the function,
  `fpexcept.ignore`.
- LoweringPrepare expands a comparison of floating-point values into
  quiet `cir.fcmp`s, which take the attribute if the operation has one.

    [10 lines not shown]
DeltaFile
+125-0clang/test/CIR/CodeGen/three-way-cmp-strict-fp.cpp
+72-0clang/test/CIR/Transforms/lowering-prepare-cmp3way-fenv.cir
+28-0clang/test/CIR/Transforms/cmp3way-fenv-effects.cir
+15-10clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+15-4clang/lib/CIR/CodeGen/CIRGenBuilder.h
+10-3clang/include/clang/CIR/Dialect/IR/CIROps.td
+265-175 files not shown
+304-2011 files

LLVM/project 298cfa4 — clang/lib/CIR/CodeGen CIRGenExprScalar.cpp, clang/test/CIR/CodeGen vector-strict-fp.cpp

[CIR] Use the pragma FP environment for __builtin_convertvector

`ScalarExprEmitter::VisitConvertVectorExpr` emitted the conversion
without a `CIRGenFPOptionsRAII`, so the cast got the floating-point
environment of the command line instead of the one that pragmas set at
the expression. With `-ffp-exception-behavior=strict` on the command
line and `#pragma clang fp exceptions(maytrap)` plus
`#pragma STDC FENV_ACCESS ON` in the function, ClangIR lowered the
conversions to constrained intrinsics with `round.tonearest` and
`fpexcept.strict`, where classic codegen emits `round.dynamic` and
`fpexcept.maytrap`.

Install the RAII for the conversion, after the source operand is
emitted, as classic codegen does on each floating-point path.

The test converts between float vectors and signed, unsigned, double
and bool vectors, so it covers the `float_to_bool` and `bool_to_float`
casts too. ClangIR and classic codegen share every LLVM check for them,
and the ClangIR run rejects any plain conversion or `fcmp` instruction

    [7 lines not shown]
DeltaFile
+52-9clang/test/CIR/CodeGen/vector-strict-fp.cpp
+3-2clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+55-112 files

LLVM/project 9be4c29 — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/CodeGen bool-to-float-strict-fp.cpp complex-strict-fp.cpp

[CIR] Keep complex and bool casts constrained in strict FP functions

In a strictfp function ClangIR emitted plain `fpext`, `fptrunc`,
`fptosi`, `sitofp`, `uitofp` and `fcmp une` for casts between complex
types and for conversions between floating-point values and bool, where
classic codegen emits constrained intrinsics. CIRGen created the
complex casts and `float_to_bool` without the `fenv` attribute,
LoweringPrepare dropped the attribute when it expanded a complex cast,
and the LLVM lowering of `float_to_bool` and `bool_to_float` ignored
it.

`createCast` now takes an optional `fenv` attribute. CIRGen passes the
current floating-point environment for `float_to_bool` and for the
complex cast kinds that convert floating-point values. The kinds that
only select or pack a part, `float_to_complex` and
`float_complex_to_real`, get none, and the verifier no longer accepts
the attribute on them. LoweringPrepare passes the attribute of a
complex cast to the scalar casts of its expansion. With `fenv`,
`float_to_bool` lowers to the quiet constrained `fcmp` and

    [10 lines not shown]
DeltaFile
+99-83clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+116-0clang/test/CIR/CodeGen/complex-cast-fenv-access.c
+76-0clang/test/CIR/CodeGen/complex-strict-fp.cpp
+64-0clang/test/CIR/Transforms/lowering-prepare-complex-cast-fenv.cir
+44-0clang/test/CIR/CodeGen/bool-to-float-strict-fp.cpp
+32-0clang/test/CIR/Lowering/fenv.cir
+431-838 files not shown
+518-10914 files

LLVM/project 53f3021 — clang/lib/CIR/CodeGen CIRGenExprScalar.cpp, clang/lib/CIR/Dialect/Transforms LoweringPrepare.cpp

[CIR] Keep complex mul and div constrained in strict FP functions

In a strictfp function ClangIR emitted plain `fmul`, `fsub`, `fadd`,
`fdiv` and `fcmp` for complex multiplication and division, where
classic codegen emits constrained intrinsics. `cir.complex.fmul` and
`cir.complex.fdiv` had no `fenv` attribute, and LoweringPrepare
expanded them with a builder that has no floating-point state.

This moves both operations onto `CIR_FenvOp`, which gives them the
optional `fenv` attribute and the fenv traits of the scalar operations.
CIRGen attaches the attribute, and LoweringPrepare passes it to the
scalar arithmetic, comparisons and conversions of the expansion.

The range check of the improved division becomes a quiet
`cir.fcmp ugt`, the predicate classic codegen uses. A `cir.cmp ge` with
`fenv` lowers to the signaling `fcmps` and would raise an invalid
exception for a quiet NaN divisor. Without `fenv` the check changes
from `fcmp oge` to `fcmp ugt`.


    [15 lines not shown]
DeltaFile
+113-52clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+83-0clang/test/CIR/Transforms/lowering-prepare-complex-fenv.cir
+65-0clang/test/CIR/CodeGen/complex-mul-div-fenv-access.c
+64-0clang/test/CIR/CodeGen/promotion-fenv-access.c
+45-2clang/test/CIR/CodeGen/complex-strict-fp.cpp
+20-3clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+390-575 files not shown
+433-6711 files

LLVM/project de9ea30 — clang/lib/CodeGen CGExprComplex.cpp CGExprScalar.cpp, clang/test/CodeGen promotion-strictfp.c

[clang] Use the operator's FP environment for promoted operands

An operator evaluated in a wider type converts its operands to that type
and its result back. This happens for `_Float16` and `__bf16` without
native support, and for complex division with the promoted complex
range. The binary operators and unary plus and minus did these
conversions outside the scope of their FP options, so the conversions
took the ambient options. The right-hand side of a scalar compound
assignment was promoted before its scope too. For `z = x * y` on
`_Float16`, or `c = a / b` on `_Complex float` with the promoted range,
under a file-scope `#pragma STDC FENV_ACCESS ON`, that is the default
environment of the function:

  fpext    fpexcept.ignore                   -> fpexcept.strict
  fptrunc  round.tonearest, fpexcept.ignore  -> round.dynamic, fpexcept.strict

`c /= b` and `f(a / b)` already had the strict metadata, because the
scope of the compound assignment or of the call was open. These
operators now open their scope before they promote, when they promote.

    [4 lines not shown]
DeltaFile
+98-0clang/test/CodeGen/promotion-strictfp.c
+19-3clang/lib/CodeGen/CGExprScalar.cpp
+13-0clang/lib/CodeGen/CGExprComplex.cpp
+130-33 files

LLVM/project 7025511 — clang/lib/CIR/Dialect/Transforms CIRFoldGotoDispatch.cpp GotoElimination.cpp, clang/test/CIR/CodeGen goto.cpp cleanup-scope-goto-within.cpp

[CIR] Route gotos into regions and between sibling regions

cir-goto-elimination now also handles a goto whose label is not in an
enclosing region: a goto into an if branch, a loop body, a scope, a case
of a switch (including default), or a cleanup scope body as MS
compatibility allows, and any goto that first leaves some regions and
then enters others, such as from one case of a switch to another.

The goto leaves regions up to the closest region that also holds the
label, as before, and then enters each region on the way to the label.
The op that holds a region is steered into it without evaluating
anything the goto skips: its if condition or switch value becomes the
argument of a new block right before it, which normal execution reaches
with the original operand and the goto with a constant. A while or for
loop condition branches to its cir.condition, now in a last block that
takes the condition as an argument, with true. Each entered region
starts, after its allocas, with a dispatch on the destination slot that
sends the goto on. A goto is left to GotoSolver if a value other than an
alloca, defined before the op it would branch to, is used after it, or if

    [12 lines not shown]
DeltaFile
+285-16clang/lib/CIR/Dialect/Transforms/GotoElimination.cpp
+147-0clang/test/CIR/Transforms/goto-elimination.cir
+114-5clang/lib/CIR/Dialect/Transforms/CIRFoldGotoDispatch.cpp
+80-0clang/test/CIR/Transforms/fold-goto-dispatch.cir
+39-13clang/test/CIR/CodeGen/cleanup-scope-goto-within.cpp
+30-11clang/test/CIR/CodeGen/goto.cpp
+695-454 files not shown
+785-6710 files

LLVM/project ccd87eb — clang/lib/CIR/Dialect/Transforms GotoElimination.cpp, clang/test/CIR/CodeGen cleanup-scope-goto-within.cpp goto.cpp

[CIR] Route gotos out of enclosing regions through a destination slot

A goto whose label is in an enclosing region stays a symbolic cir.goto
until GotoSolver, so every CIR-to-CIR pass sees control flow that neither
the CFG nor RegionBranchOpInterface describes.

cir-goto-elimination now rewrites such gotos without flattening anything.
The goto stores its label's id in a per-function i32 slot marked
goto_dest_slot and leaves each region in between through that region's
normal exit: cir.break for loop bodies, switch bodies and case regions
directly under their switch, cir.yield for cleanup-scope bodies, and a
branch to a block holding only the final cir.yield for if, scope, try and
catch regions. After each crossed op a cir.switch.flat on the slot routes
the goto onward; the last one clears the slot and branches to the label.
Cleanups, catch-handler end_catch and loop cleanups run exactly as for the
goto. cir-fold-goto-dispatch then folds those dispatches after FlattenCFG.

The slot is cleared after the entry block's allocas, before every crossed
op, and after every cir.begin_catch, so an exception thrown by a destructor

    [10 lines not shown]
DeltaFile
+358-6clang/lib/CIR/Dialect/Transforms/GotoElimination.cpp
+208-79clang/test/CIR/CodeGen/cleanup-scope-goto-out.cpp
+136-8clang/test/CIR/Transforms/goto-elimination.cir
+88-21clang/test/CIR/CodeGenCoroutines/coro-fallthrough.cpp
+52-19clang/test/CIR/CodeGen/goto.cpp
+20-7clang/test/CIR/CodeGen/cleanup-scope-goto-within.cpp
+862-1405 files not shown
+896-15411 files

LLVM/project 21e2651 — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/CodeGen strictfp-call-site.cpp strictfp-call-site.c

[CIR] Mark calls in strictfp functions strictfp

At -O1, ClangIR folded `erf(1.0)` to a constant under
`#pragma STDC FENV_ACCESS ON`, while classic codegen kept the call. The
difference is the call-site `strictfp` attribute. LangRef requires it on
every call in a function that uses constrained FP intrinsics, and LLVM's
libcall folders look at the call, not at the caller. Classic codegen
gets it from IRBuilder's constrained mode. ClangIR marked only the
function.

The CIR `strictfp` function attribute now lowers to the `strictfp`
attribute of `llvm.func` instead of a `passthrough` entry. After the
conversion, every `llvm.call`, `llvm.invoke`, `llvm.inline_asm` and
`llvm.call_intrinsic` in a `strictfp` function gets `strictfp` too, and
every named intrinsic op such as `llvm.intr.fabs` or `llvm.intr.memcpy`
gets `llvm.strictfp`. That includes indirect calls, constrained
intrinsics, and the calls LoweringPrepare and EH lowering create. CIR
itself does not change.


    [7 lines not shown]
DeltaFile
+143-0clang/test/CIR/Lowering/strictfp-call-site.cir
+134-0clang/test/CIR/CodeGen/strictfp-call-site.c
+89-0clang/test/CIR/CodeGen/strictfp-call-site.cpp
+32-0clang/test/CIR/Lowering/strictfp-call-site-asm.cir
+29-1clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+0-29clang/test/CIR/Lowering/strictfp.cir
+427-301 files not shown
+429-317 files

LLVM/project b438481 — mlir/docs/Dialects LLVM.md, mlir/lib/Dialect/LLVMIR/IR LLVMDialect.cpp

[mlir][LLVM] Add llvm.strictfp for intrinsic ops

In a function that uses constrained floating-point intrinsics, LLVM
requires every call to be `strictfp`, including calls of intrinsics such
as `llvm.fabs`, `llvm.memcpy` and `llvm.trap`. The call ops and
`llvm.func` have an inherent `strictfp` attribute, but the named
intrinsic ops have no call-site attributes, so a frontend could not mark
those calls.

This adds a discardable `llvm.strictfp` unit attribute. Export sets the
`strictfp` call-site attribute on the call the op translates to, the way
`llvm.memprof` attaches to the calls an op produces, and import sets it
on an intrinsic op whose call site is `strictfp`. A new
`IntrinsicOpTrait` marks the LLVM dialect's intrinsic ops, and the
verifier accepts `llvm.strictfp` only on them, so the call ops keep a
single spelling.

Assisted-by: Claude Code (Opus 5.5).
DeltaFile
+18-0mlir/test/Target/LLVMIR/strictfp-intrinsics.mlir
+17-0mlir/test/Dialect/LLVMIR/strictfp-invalid.mlir
+16-0mlir/test/Target/LLVMIR/Import/intrinsic-strictfp.ll
+13-0mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+12-0mlir/docs/Dialects/LLVM.md
+10-1mlir/lib/Target/LLVMIR/ModuleImport.cpp
+86-111 files not shown
+116-217 files

LLVM/project 607430f — clang/include/clang/CIR/Dialect Passes.h Passes.td, clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR] Add a pass that folds goto destination dispatches

Routing a goto out of nested regions without flattening them needs a
destination slot: the goto stores its label's id, leaves each region
through its normal exit, and a dispatch after each region's op switches
on the slot. After FlattenCFG those dispatches are plain blocks, and at
-O0 they would stay as loads, stores and switches.

Add a goto_dest_slot attribute on cir.alloca that marks such a slot, which
CXXABILowering preserves, and cir-fold-goto-dispatch, a cir.func pass that
runs after GotoSolver. The slot is only ever stored constants and loaded,
so a forward dataflow over the function's blocks gives the constant it
holds on each edge: a case edge of a dispatch carries the case's id, and a
case edge of FlattenCFG's cleanup dispatch carries the id stored together
with that cleanup exit's id, unless some exit to that dispatch stores an
unknown cleanup id. Each edge into a dispatch, looking through blocks that
only forward to it, whose id is known goes straight to the dispatch's
destination. This repeats until nothing changes; then dead dispatches go,
and the slot once nothing loads it. A slot with a non-constant or volatile

    [5 lines not shown]
DeltaFile
+437-0clang/lib/CIR/Dialect/Transforms/CIRFoldGotoDispatch.cpp
+299-0clang/test/CIR/Transforms/fold-goto-dispatch.cir
+27-0clang/include/clang/CIR/Dialect/Passes.td
+5-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+3-0clang/tools/cir-opt/cir-opt.cpp
+1-0clang/include/clang/CIR/Dialect/Passes.h
+772-03 files not shown
+775-09 files

LLVM/project 7ee200e — clang/lib/CIR/Dialect/Transforms GotoElimination.cpp, clang/test/CIR/CodeGen const-label-addr.c switch-pre-case-stmts.cpp

[CIR] Replace same-region gotos with branches

CIRGen emits C/C++ gotos as symbolic cir.goto ops that name a cir.label.
They are not CFG edges, so the core rewrite driver, eraseUnreachableBlocks
and dataflow analyses treat the label's block as dead until GotoSolver runs
after FlattenCFG.

Add cir-goto-elimination, a cir.func pass that runs first in the
CIR-to-CIR pipeline and again at the start of the pre-lowering pipeline for
input that skips it. A goto whose label is in the same region becomes a
cir.br to the label's block. Gotos that cross region boundaries are left
for GotoSolver. The pass then erases each label that no remaining goto
names and whose address is not taken.

A label's address can be taken from a global initializer, which a
function pass cannot read. So cir.label gets an address_taken attribute:
CIRGen sets it for every label that &&label names, in a cir.block_address
op or in a constant, and the function verifier requires it on the label
of each cir.block_address op in the function.

    [2 lines not shown]
DeltaFile
+91-0clang/lib/CIR/Dialect/Transforms/GotoElimination.cpp
+81-0clang/test/CIR/Transforms/goto-elimination.cir
+25-33clang/test/CIR/CodeGen/goto.cpp
+12-35clang/test/CIR/CodeGen/label.c
+6-23clang/test/CIR/CodeGen/switch-pre-case-stmts.cpp
+14-14clang/test/CIR/CodeGen/const-label-addr.c
+229-10522 files not shown
+369-14828 files

LLVM/project f2cf1ce — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/Lowering const-undef-aggregate.cir

[CIR] Lower complex constants through CIRAttrToValue (#246485)

The complex branch of the `cir.const` lowering rebuilt the same
`llvm.mlir.constant` that
`CIRAttrToValue::visitCirAttr(ConstComplexAttr)` already produces. It
now delegates to the visitor, keeping only the zero case, which lowers
to a `[0, 0]` constant rather than `llvm.mlir.zero`. It also drops
`UndefAttr` checks in the array, record and complex branches that the
early undef return makes unreachable.

Assisted-by: Claude Code (Opus 5.5).
DeltaFile
+13-37clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+31-0clang/test/CIR/Lowering/const-undef-aggregate.cir
+44-372 files

LLVM/project f1faf03 — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp, llvm/test/DebugInfo/PowerPC split-i64-arg-fragment-order.ll

[SelectionDAG] Fix big-endian order of split-argument debug fragments (#239512)

This PR addresses a bug discovered while porting LLVM to AVR32
(off-branch). The problem has also been verified on supported big-endian
targets. I relied heavily on Claude code for the porting and for
assessing, isolating, and fixing the bug. I understand the problem, but
lack the knowledge of LLVM internals to do it myself and to assess the
soundness of Claude's fix. The text below has been prepared by the AI
and contains a description of the problem and the fix.

An argument built from two registers with `ISD::BUILD_PAIR` is described
by two `DW_OP_LLVM_fragment`s, assigned at increasing offsets in the
order `getUnderlyingArgRegs()` returns the registers. A fragment offset
counts from the variable's lowest-addressed byte, so on a big-endian
target fragment 0 must be the high half. `BUILD_PAIR`'s operands are
(low, high) whatever the byte order, and they were walked in operand
order, so on big-endian targets the two halves were swapped: a debugger
showed 0x0102030405060708 as 0x0506070801020304.


    [13 lines not shown]
DeltaFile
+39-0llvm/test/DebugInfo/PowerPC/split-i64-arg-fragment-order.ll
+12-4llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+51-42 files

LLVM/project cdc14f5 — llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp, llvm/test/CodeGen/AMDGPU waitcnt-vavdst-loop-header.mir

[AMDGPU] Defer S_WAITCNT_DEPCTR erasure and updates in expert mode

A pre-existing S_WAITCNT_DEPCTR was erased, or had its VA_VDST and
VM_VSRC fields relaxed, as soon as the incoming state made those waits
look redundant. In a loop header that happens on the first visit, before
the backedge adds the instructions of the loop body. The wait is then
lost when the header is visited again with them pending.

Keep the original operand of every S_WAITCNT_DEPCTR, including
duplicates, while iterating to the fixed point, and only apply the final
encoding or erase the instruction at the end of the pass.

Also reset the VA_VDST field of a duplicate S_WAITCNT_DEPCTR to "no
wait" once its wait has been folded into the first one, instead of
leaving a redundant copy of the combined wait behind.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+34-36llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+6-4llvm/test/CodeGen/AMDGPU/waitcnt-vavdst-loop-header.mir
+40-402 files

LLVM/project ea9f521 — llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp

code review
DeltaFile
+2-2llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+2-21 files

LLVM/project 4a27bbe — llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp

[AMDGPU] Reuse waitcnt operand update helper
DeltaFile
+15-19llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+15-191 files