LLVM/project 2f587d2 — llvm/test/CodeGen/AMDGPU neighboring-mfma-padding.mir, llvm/test/CodeGen/X86 expand-false-deps.mir compress-false-deps.mir

CodeGen: Remove -verify-machineinstrs from single -run-pass MIR tests

Since #228248 / 66366908, llc verifies MIR output by default. MIR
inputs were always verified so for an llc invocation running exactly
one pass with -run-pass, the -verify-machineinstrs flag does nothing
so these flags are pointless. We should more aggressively trim
-verify-machineinstrs uses in the future, but this covers the cases
that don't change behavior. This removal was performed by generated
script.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+17-17llvm/test/CodeGen/X86/bls-false-deps.mir
+16-16llvm/test/CodeGen/X86/bitcnt-false-deps.mir
+13-13llvm/test/CodeGen/X86/expand-false-deps.mir
+13-13llvm/test/CodeGen/X86/compress-false-deps.mir
+11-11llvm/test/CodeGen/AMDGPU/neighboring-mfma-padding.mir
+8-8llvm/test/MachineVerifier/AMDGPU/writelane_m0.mir
+78-782,161 files not shown
+3,261-3,2622,167 files

LLVM/project e541694 — llvm/lib/Target/AMDGPU SIShrinkInstructions.cpp, llvm/test/CodeGen/AMDGPU shrink-instructions-fold-imm-subreg.mir

AMDGPU: Fix folding 64-bit move imm into subreg use in SIShrinkInstructions (#237040)

foldImmediates folded the full 64-bit immediate of a move into a
subregister use, rather than the value of the used half. Extract the
immediate value of the used subregister. Global addresses were similarly
broken.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+171-0llvm/test/CodeGen/AMDGPU/shrink-instructions-fold-imm-subreg.mir
+13-6llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+184-62 files

LLVM/project c9b6490 — clang/docs SafeBuffers.md BoundsSafety.md, clang/docs/BoundsSafety BoundsSafetyImplPlans.md BoundsSafetyUpstreamStatus.md

[BoundsSafety][Docs] Add an index page and upstream status for -fbounds-safety

Add BoundsSafety/index.md as the landing page for the -fbounds-safety
docs. It covers how to contribute, standardization efforts in WG14,
open-source adoption efforts, RFCs, and talks.

Add BoundsSafetyUpstreamStatus.md, which lists what is available
upstream, what is in progress, and what is planned, with links to the
relevant PRs and issues.

Leave a stub at the old BoundsSafety.html location so existing links keep
working.

Assisted-by: Opus 5.5
DeltaFile
+97-0clang/docs/BoundsSafety/index.md
+47-0clang/docs/BoundsSafety/BoundsSafetyUpstreamStatus.md
+2-6clang/docs/index.md
+7-0clang/docs/BoundsSafety.md
+1-2clang/docs/BoundsSafety/BoundsSafetyImplPlans.md
+1-1clang/docs/SafeBuffers.md
+155-91 files not shown
+156-107 files

LLVM/project f6e0191 — llvm/lib/MC MCAsmStreamer.cpp, llvm/test/MC/Mips relocation-n64.s micromips-expansions.s

[ARM][MIPS] Show reloc comments in compressed instruction byte-order (#233599)

Little endian instruction encoding for Thumb/microMIPS consists of
higher order half-word followed by lower order half-word, each in
little-endian order. Relocation bits in this encoding need special
mapping logic.

Example encoding (starting MSB): AA BB CC DD
Layout in memory (starting low byte) [BB AA] [DD CC]

Also fix test cases for Thumb/microMIPS that captured the previously
broken relocation comments.

Co-authored-by: Faraz Shahbazker <faraz.shahbazker at mediatek.com>
DeltaFile
+17-22llvm/test/MC/Mips/relocation.s
+14-14llvm/test/MC/Mips/micromips-relocations.s
+9-9llvm/test/MC/Mips/micromips-branch-fixup.s
+11-3llvm/lib/MC/MCAsmStreamer.cpp
+4-4llvm/test/MC/Mips/relocation-n64.s
+4-4llvm/test/MC/Mips/micromips-expansions.s
+59-5610 files not shown
+91-6416 files

LLVM/project 8801f95 — llvm/lib/Target/AMDGPU SIInstructions.td, llvm/test/CodeGen/AMDGPU packed-fp64.ll

[AMDGPU] Preserve non-canonical values in packed f64 fneg (#236405)

Select divergent v2f64 fneg with sign-bit XORs. Restrict the
V_PK_ADD_F64 pattern to canonicalize-of-fneg so bare negation preserves
signaling NaNs and all operand bits except the sign.

Add explicit fneg and canonicalize-of-fneg coverage, and update the
affected packed vector negation checks.

Fixes #236341

---------

Co-authored-by: Jay Foad <jay.foad at gmail.com>
DeltaFile
+124-64llvm/test/CodeGen/AMDGPU/packed-fp64.ll
+7-2llvm/lib/Target/AMDGPU/SIInstructions.td
+131-662 files

LLVM/project ec9976b — llvm/lib/Target/AMDGPU AMDGPUInstructionSelector.h AMDGPUISelDAGToDAG.cpp, llvm/test/CodeGen/AMDGPU scale-offset-flat.ll scale-offset-global.ll

[AMDGPU] Fix scale_offset with wrapping offsets (#238016)

On gfx1250, vector memory scales the sign-extended offset in 64 bits,
but SMEM scales the offset in 32 bits and then zero-extends it. Both
selectors set scale_offset either way, so global and flat accesses
miscompiled a 32-bit scaled index that wraps, and SMEM loads an index
whose 64-bit scaled value reaches 4 GiB.

Keep scale_offset only when nsw or known bits prove that the hardware
computes the same address. Fix the SMEM tests that expected the wrong
code.

Fixes #237993
DeltaFile
+365-82llvm/test/CodeGen/AMDGPU/scale-offset-smem.ll
+285-4llvm/test/CodeGen/AMDGPU/scale-offset-global.ll
+29-7llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+26-5llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+19-0llvm/test/CodeGen/AMDGPU/scale-offset-flat.ll
+2-2llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
+726-1001 files not shown
+728-1017 files

LLVM/project 7067e38 — llvm/test/CodeGen/X86 vector-interleaved-load-i32-stride-8.ll vector-interleaved-load-i16-stride-7.ll

[X86] Enable SlotIndexes compaction by default

Compacting SlotIndexes before greedy allocation drops the entries of
erased instructions, so live range sizes and instruction distances
reflect the code being allocated rather than how much was erased
before it. AMDGPU has done this since #235806; do the same for X86.

Codegen changes only through allocation: no new crashes, verifier
errors or allocation failures in the lit suites, including
EXPENSIVE_CHECKS, and a stage-2 build of LLVM, clang and lld with
-verify-machineinstrs passes its own tests. On llvm-test-suite at -O3,
spills drop 0.3% and .text 0.06%, with compile time unchanged.

Most test updates are regenerated checks. misched-matmul now inserts
20 spills instead of 24. live-debug-vars-stale-slotindexes.mir gets
one more use of %27 so that accumulate_fit still reaches the stale
index path it was written for.
DeltaFile
+15,403-15,465llvm/test/CodeGen/X86/vector-interleaved-load-i64-stride-7.ll
+13,329-13,243llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-7.ll
+13,199-13,231llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-8.ll
+12,788-12,826llvm/test/CodeGen/X86/vector-interleaved-load-i64-stride-8.ll
+11,796-11,778llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-7.ll
+11,057-11,064llvm/test/CodeGen/X86/vector-interleaved-load-i32-stride-8.ll
+77,572-77,607447 files not shown
+344,071-345,717453 files

LLVM/project 490e671 — llvm/lib/Transforms/Coroutines CoroSplit.cpp, llvm/test/Transforms/Coroutines coro-split-final-suspend-profile.ll

Revert "[CoroSplit] Use resume-switch weights on the final-suspend de… (#238125)

…stroy branch (#237526)"

This reverts commit c797aca0865eae6328ddd4f327d905d4115f719f.

If we have some code like this that calls f (from the introduced test
case):
```cpp
for (int i = 0; i < 100; ++i) {
  Task t = f();
  while (!t.crt_handle.done())
    t.crt_handle.resume();
}
```

We call f.destroy 100 times, and hdl is null 100% of the time, which
contradicts the branch weights synthesized by the patch (~19/81).
DeltaFile
+0-67llvm/test/Transforms/Coroutines/coro-split-final-suspend-profile.ll
+3-19llvm/lib/Transforms/Coroutines/CoroSplit.cpp
+3-862 files

LLVM/project b3ce411 — clang/lib/Sema SemaHLSL.cpp, clang/test/CodeGenHLSL/builtins WaveMultiPrefixCountBits.hlsl

first attempt

Co-authored-by: Copilot <223556219+Copilot at users.noreply.github.com>
Copilot-Session: 40997c2f-5aaa-41c6-8d1f-3e2e9ada315f
DeltaFile
+63-0clang/test/SemaHLSL/BuiltIns/WaveMultiPrefixCountBits-errors.hlsl
+45-0clang/test/CodeGenHLSL/builtins/WaveMultiPrefixCountBits.hlsl
+32-10clang/lib/Sema/SemaHLSL.cpp
+20-0llvm/test/CodeGen/DirectX/WaveMultiPrefixCountBits.ll
+9-0llvm/lib/Target/DirectX/DXIL.td
+9-0llvm/test/CodeGen/DirectX/WaveMultiPrefixCountBits_errors.ll
+178-106 files not shown
+211-1012 files

LLVM/project 956dbd1 — llvm/lib/Target/AMDGPU AMDGPUInstructionSelector.cpp AMDGPUISelDAGToDAG.cpp

[AMDGPU] Return early in scale_offset wrap checks

Each wrap check now returns false itself, so the matchers no longer
need to guard the final Offset update with ScaleOffset. The update has
to stay after the checks, because the callers use Offset even when
the matcher fails. No functional change.
DeltaFile
+10-12llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+10-11llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+20-232 files

LLVM/project 0105110 — clang/docs BoundsSafetyAdoptionGuide.md BoundsSafetyImplPlans.md, clang/docs/BoundsSafety BoundsSafetyAdoptionGuide.md BoundsSafetyImplPlans.md

[BoundsSafety][Docs][NFC] Move -fbounds-safety docs into BoundsSafety/

Move BoundsSafety.md, BoundsSafetyAdoptionGuide.md and
BoundsSafetyImplPlans.md into a BoundsSafety/ directory without changing
their content, and update the references to them. A follow-up adds an
index page for the directory.

Assisted-by: Opus 5.5
DeltaFile
+0-969clang/docs/BoundsSafety.md
+969-0clang/docs/BoundsSafety/BoundsSafety.md
+0-238clang/docs/BoundsSafetyImplPlans.md
+238-0clang/docs/BoundsSafety/BoundsSafetyImplPlans.md
+0-79clang/docs/BoundsSafetyAdoptionGuide.md
+79-0clang/docs/BoundsSafety/BoundsSafetyAdoptionGuide.md
+1,286-1,2862 files not shown
+1,293-1,2938 files

LLVM/project 2655905 — llvm/include/llvm/CodeGen SelectionDAG.h, llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp SelectionDAG.cpp

[SelectionDAG] Expose the concat fold for DAG combining

Make FoldConcatVectors a SelectionDAG method shared by node construction
and DAG combining. Invoke it directly when revisiting concat operands
instead of using getNode to rerun construction-time folds.
DeltaFile
+17-20llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+5-0llvm/include/llvm/CodeGen/SelectionDAG.h
+2-2llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+24-223 files

LLVM/project 51826b1 — llvm/lib/Target/AMDGPU SIShrinkInstructions.cpp, llvm/test/CodeGen/AMDGPU shrink-instructions-fold-imm-subreg.mir

AMDGPU: Fix folding 64-bit move imm into subreg use in SIShrinkInstructions

foldImmediates folded the full 64-bit immediate of a move into a
subregister use, rather than the value of the used half. Extract the
immediate value of the used subregister. Global addresses were similarly
broken.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+171-0llvm/test/CodeGen/AMDGPU/shrink-instructions-fold-imm-subreg.mir
+13-6llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+184-62 files

LLVM/project d26ed4a — llvm/lib/Target/AMDGPU SIInstrInfo.h SIShrinkInstructions.cpp, llvm/test/CodeGen/AMDGPU shrink-instructions-fold-imm-subreg.mir

AMDGPU: Fold global address into subregister use with lo/hi relocation

Split 64-bit relocations into the 32-bit halves when applying a
subregister extract, similar to how immediates are modified when
folding. The same split is applied when 64-bit mov pseudos are
expanded.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+64-42llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+14-9llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+5-8llvm/test/CodeGen/AMDGPU/shrink-instructions-fold-imm-subreg.mir
+9-0llvm/lib/Target/AMDGPU/SIInstrInfo.h
+92-594 files

LLVM/project 7120cc7 — llvm/test/CodeGen/SystemZ twoaddr-kill.mir regcoal-subranges-update.mir

SystemZ: Remove kill flags on virtual registers from MIR tests (#236919)

The verifier will soon disallow these, so prepare test inputs. Delete
tests that were identical except for the kill flags.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+0-77llvm/test/CodeGen/SystemZ/machinelicm-sunk-kill-flags.mir
+30-30llvm/test/CodeGen/SystemZ/subregliveness-06.mir
+20-20llvm/test/CodeGen/SystemZ/regcoal-undef-lane-4-rm-cp-commuting-def.mir
+13-13llvm/test/CodeGen/SystemZ/subregliveness-07.mir
+10-10llvm/test/CodeGen/SystemZ/regcoal-subranges-update.mir
+7-7llvm/test/CodeGen/SystemZ/twoaddr-kill.mir
+80-1578 files not shown
+111-18814 files

LLVM/project 93876c5 — libunwind/src Unwind-sjlj.c, llvm/lib/CodeGen SjLjEHPrepare.cpp

libunwind: Use libgcc's function context layout for sjlj

Make call_site an i32 and the __data words pointer
sized. compiler-rt's SjLj_Function_Context was not defined in the same
way as libgcc.

This was broken for all 64-bit targets. Every field was i32, so the
exception pointer in __data[0] was truncated. It just happens that no
64-bit target defaults to SJLJ exceptions except VE. Instead of fixing
that, a VE special case was introduced in the libunwind sources and
SjLjEHPrepare, which had a special TargetMachine hook for this data
size. In reality it should just be a uintptr_t which we can already
infer from the DataLayout.

This is an ABI break for 64-bit targets other than VE when using
libunwind built for SjLj: the __data, personality, lsda and jbuf
offsets move, so compiled code and libunwind must be updated
together. That configuration was already broken by the pointer
truncation and is not the default anywhere. 32-bit targets are

    [4 lines not shown]
DeltaFile
+24-24llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll
+34-0llvm/test/Transforms/SjLjEHPrepare/function-context-layout.ll
+7-19libunwind/src/Unwind-sjlj.c
+7-14llvm/lib/CodeGen/SjLjEHPrepare.cpp
+5-5llvm/test/CodeGen/X86/sjlj-eh.ll
+4-4llvm/test/CodeGen/VE/Scalar/builtin_sjlj_callsite.ll
+81-6610 files not shown
+91-8716 files

LLVM/project 4315fa0 — llvm/lib/Transforms/InstCombine InstCombineLoadStoreAlloca.cpp, llvm/test/Transforms/InstCombine merging-multiple-stores-into-successor.ll

[InstCombine] Don't drop provenance when merging stores into successor
DeltaFile
+21-21llvm/test/Transforms/InstCombine/merging-multiple-stores-into-successor.ll
+10-3llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+31-242 files

LLVM/project 6931d20 — llvm/test/Transforms/InstCombine merging-multiple-stores-into-successor.ll

[InstCombine] Pre-commit tests for provenance when merging stores into successor
DeltaFile
+279-6llvm/test/Transforms/InstCombine/merging-multiple-stores-into-successor.ll
+279-61 files

LLVM/project 9e8e893 — llvm/test/CodeGen/AMDGPU scale-offset-global.ll

[AMDGPU] Reword zext scale_offset test comment

SelectionDAG keeps scale_offset in this test only because it narrows
the mask to the demanded bits first. GlobalISel keeps the wider mask,
whose shift can wrap. The old comment suggested that GlobalISel misses
a proof.
DeltaFile
+2-1llvm/test/CodeGen/AMDGPU/scale-offset-global.ll
+2-11 files

LLVM/project 8a8e72b — llvm/include/llvm/IR IntrinsicsAMDGPU.td, llvm/lib/Target/AMDGPU AMDGPUInstCombineIntrinsic.cpp SIISelLowering.cpp

[AMDGPU] Only demand the exponent bits of V_CVT_SCALEF32 scale operands (#229889)

The `V_CVT_SCALEF32_*` conversions from F32/F16/BF16 to
FP8/BF8/FP6/BF6/FP4 only read the exponent field (bits [30:23]) of their
f32 scale operand. This is documented in the CDNA4/CDNA5 ISA.

Frontends that build the scale from an E8M0 byte or an fp32 value often
mask or shift it first, e.g. `and %x, 0x7f800000` or `shl (zext i8
%e8m0), 23`, and those instructions currently survive to the final ISA.
Frontends like Triton lower straight to the ROCDL intrinsics, so the
logic in ArithToAMDGPU that works around this, doesn't reach them. Those
instructions are wasted work in the scale computation of kernels. This
patch tags the down-conversion intrinsics with a new
`AMDGPUExponentOnlyScale<ScaleArg>` class and adds a searchable table
that maps each intrinsic to its scale argument
(`AMDGPU::getExponentOnlyScaleArgIdx`). In InstCombine, the scale
operand drops any `fneg`, `fabs` or `copysign`. When the scale is a
bitcast of an i32 and every user of the bitcast is one of these scale
operands, the i32 is simplified with only the exponent bits demanded. In

    [3 lines not shown]
DeltaFile
+376-0llvm/test/Transforms/InstCombine/AMDGPU/cvt-scalef32-scale-demanded-bits.ll
+278-0llvm/test/CodeGen/AMDGPU/cvt-scalef32-scale-demanded-bits-gfx950.ll
+222-0llvm/test/CodeGen/AMDGPU/cvt-scalef32-scale-demanded-bits-gfx1250.ll
+44-28llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+33-0llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+25-0llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+978-284 files not shown
+1,026-2810 files

LLVM/project 409ce4d — llvm/test/Transforms/LoopUnrollAndJam reduction.ll

fixup! [LoopUnrollAndJam] Jamming Outside Loop for stencil
DeltaFile
+11-8llvm/test/Transforms/LoopUnrollAndJam/reduction.ll
+11-81 files

LLVM/project ba07ac0 — clang/docs SafeBuffers.md index.md, clang/docs/BoundsSafety BoundsSafetyImplPlans.md BoundsSafetyUpstreamStatus.md

[BoundsSafety][Docs] Add an index page and upstream status for -fbounds-safety

Add BoundsSafety/index.md as the landing page for the -fbounds-safety
docs. It covers how to contribute, standardization efforts in WG14,
open-source adoption efforts, RFCs, and talks.

Add BoundsSafetyUpstreamStatus.md, which lists what is available
upstream, what is in progress, and what is planned, with links to the
relevant PRs and issues.

Leave a stub at the old BoundsSafety.html location so existing links keep
working.

Assisted-by: Opus 5.5
DeltaFile
+97-0clang/docs/BoundsSafety/index.md
+47-0clang/docs/BoundsSafety/BoundsSafetyUpstreamStatus.md
+7-0clang/docs/BoundsSafety.md
+1-3clang/docs/index.md
+1-2clang/docs/BoundsSafety/BoundsSafetyImplPlans.md
+1-1clang/docs/SafeBuffers.md
+154-61 files not shown
+155-77 files

LLVM/project 40a8496 — libunwind/src Unwind-sjlj.c, llvm/lib/CodeGen SjLjEHPrepare.cpp

libunwind: Use libgcc's function context layout for sjlj

Make call_site an i32 and the __data words pointer
sized. compiler-rt's SjLj_Function_Context was not defined in the same
way as libgcc.

This was broken for all 64-bit targets. Every field was i32, so the
exception pointer in __data[0] was truncated. It just happens that no
64-bit target defaults to SJLJ exceptions except VE. Instead of fixing
that, a VE special case was introduced in the libunwind sources and
SjLjEHPrepare, which had a special TargetMachine hook for this data
size. In reality it should just be a uintptr_t which we can already
infer from the DataLayout.

This is an ABI break for 64-bit targets other than VE when using
libunwind built for SjLj: the __data, personality, lsda and jbuf
offsets move, so compiled code and libunwind must be updated
together. That configuration was already broken by the pointer
truncation and is not the default anywhere. 32-bit targets are

    [4 lines not shown]
DeltaFile
+24-24llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll
+34-0llvm/test/Transforms/SjLjEHPrepare/function-context-layout.ll
+7-19libunwind/src/Unwind-sjlj.c
+7-14llvm/lib/CodeGen/SjLjEHPrepare.cpp
+5-5llvm/test/CodeGen/X86/sjlj-eh.ll
+4-4llvm/test/CodeGen/VE/Scalar/builtin_sjlj_callsite.ll
+81-6610 files not shown
+91-8716 files

LLVM/project 1d8f4a7 — llvm/lib/Target/SystemZ SystemZISelLowering.cpp

[SystemZ]  Bugfix in verifyNarrowIntegerArgs(). (#238052)

Use isScalarInteger() instead of isInteger().
DeltaFile
+1-1llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+1-11 files

LLVM/project 7b1b7b1 — llvm/lib/Target/AArch64 AArch64CallingConvention.td, llvm/test/CodeGen/AArch64 win64_vararg_split.ll

[AArch64] Split composites between x7 and the stack in Windows varargs (#234836)

On Windows on Arm, the arguments of a variadic function, named ones
included, are laid out as if on a stack whose first 64 bytes are loaded
into x0-x7 (Microsoft's ARM64 ABI, "Addendum: Variadic functions").
A composite lowered to `[2 x i64]` or `[2 x ptr]` whose first half lands
in x7 is therefore passed in x7 and the first stack slot.
That is what MSVC emits and what clang's own `va_arg` lowering expects.
`CC_AArch64_Win64_VarArg` delegated such a block to the AAPCS64
consecutive-register block allocation, which puts it entirely on the
stack. For a variadic argument, the callee then read it and every later
argument 8 bytes off.

Allocate the elements of a consecutive-register block one at a time in
`CC_AArch64_Win64_VarArg`.
SelectionDAG also flags a byval pointer as a block when its pointee is
an array; it keeps the existing stack copy, since byval is only lowered
as a stack argument.


    [6 lines not shown]
DeltaFile
+663-0llvm/test/CodeGen/AArch64/win64_vararg_split.ll
+13-0llvm/lib/Target/AArch64/AArch64CallingConvention.td
+676-02 files

LLVM/project dd381bc — flang/include/flang/Optimizer/Builder FIRBuilder.h, flang/include/flang/Optimizer/HLFIR HLFIROps.td

[flang] Carry a requested alignment on hlfir.copy_in (#235854)

A copy-in buffer stands in for the variable it copies at a call site, so
a variable with an alignment requirement needs its buffer aligned the
same way. This patch gives `hlfir.copy_in` an optional `alignment`
attribute (a positive power of two, verified), to be set by lowering
when the actual argument carries such a requirement, and honors it in
both places that allocate the buffer: the loop-inlined form in
`InlineHLFIRCopy` and the `hlfir.copy_in` codegen in `ConvertToFIR`.
Copies made by the runtime (assumed-rank, polymorphic) do not honor it
yet.

The `FIRBuilder` temporary helpers (`createTemporaryAlloc`,
`createTemporary`, `createHeapTemporary`, `createAndDeclareTemp`,
`createArrayTemp`) gain a trailing optional alignment applied to the
`fir.alloca` or `fir.allocmem`, and `shouldUseStackForCopyin` takes the
alignment so the placement policy counts its padding against the stack
budget.


    [5 lines not shown]
DeltaFile
+27-14flang/lib/Optimizer/Builder/FIRBuilder.cpp
+21-9flang/include/flang/Optimizer/Builder/FIRBuilder.h
+26-0flang/test/HLFIR/inline-hlfir-copy-stack.fir
+13-6flang/lib/Optimizer/HLFIR/Transforms/InlineHLFIRCopy.cpp
+10-5flang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp
+13-1flang/include/flang/Optimizer/HLFIR/HLFIROps.td
+110-356 files not shown
+148-4112 files

LLVM/project ca852ea — llvm/lib/Transforms/InstCombine InstCombineLoadStoreAlloca.cpp, llvm/test/Transforms/InstCombine storemerge-dbg.ll merging-multiple-stores-into-successor.ll

[InstCombine] Don't drop provenance when merging stores into successor

mergeStoreIntoSuccessor built the phi in the type of the store being
visited, and cast the other stored value to it. Casting a byte to a
non-byte type, or a pointer to an integer, is lossy. Merge in the byte
or pointer type if either store has one.

Fixes #238063.
DeltaFile
+18-18llvm/test/Transforms/InstCombine/merging-multiple-stores-into-successor.ll
+20-0llvm/test/Transforms/InstCombine/storemerge-dbg.ll
+10-3llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+48-213 files

LLVM/project e652eba — mlir/lib/Dialect/OpenACC/Transforms ACCCGToGPU.cpp, mlir/test/Dialect/OpenACC acc-cg-to-gpu-per-row-barrier-unsupported.mlir

[mlir][acc] Return after NYI for non-NVIDIA per-row barrier (#238116)

createPerRowBarrier reports that a per-row barrier is not yet
implemented on non-NVIDIA devices, but it does not return afterwards.
Execution falls through to the NVVM named-barrier code, which asserts
that the device type is NVIDIA, so acc-cg-to-gpu aborts instead of
failing cleanly. This is reachable with the default device type for any
thread-partitioned loop wider than a subgroup. For example,
acc-cg-to-gpu-barrier-after-thread-loop.mlir crashes if its
device-type=nvidia option is removed.

Return after emitting the diagnostic, matching the other NYI sites in
this file, and add a test that checks the diagnostic for this case.
DeltaFile
+35-0mlir/test/Dialect/OpenACC/acc-cg-to-gpu-per-row-barrier-unsupported.mlir
+1-0mlir/lib/Dialect/OpenACC/Transforms/ACCCGToGPU.cpp
+36-02 files

LLVM/project 14e527c — clang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver lto-aix.c

CodeGen: Replace TargetOptions::DebuggerTuning with module flag

Read the debugger tuning from the module's "debugger-tuning" flag instead of
TargetOptions. Delete the now-dead -debugger-tune= cl::opt and the
TargetOptions::DebuggerTuning field.

Update the tests relying on it to directly use the module flag. The cases
that exercise multiple values do a text substitution to swap the value.
Alternatively this could be changed to synthesize the module flag in the
llc flag like some of the other widely used module flags do.

Co-authored-by: Claude Sonnet 5 <noreply at anthropic.com>
DeltaFile
+24-19llvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir
+6-16llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+12-9llvm/test/DebugInfo/X86/convert-debugloc.ll
+6-14clang/test/Driver/lto-aix.c
+13-5llvm/test/DebugInfo/X86/debugger-tune.ll
+0-17clang/lib/Driver/ToolChains/CommonArgs.cpp
+61-8058 files not shown
+243-25164 files

LLVM/project bd97ca8 — llvm/include/llvm/IR Module.h, llvm/lib/CodeGen/AsmPrinter DwarfDebug.cpp

Actually resolve the default in Module
DeltaFile
+2-1llvm/include/llvm/IR/Module.h
+0-2llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+1-1llvm/lib/IR/Module.cpp
+3-43 files