LLVM/project 5dc1235llvm/lib/Target/PowerPC PPCISelLowering.cpp

PowerPC: Drop AllowFPOpFusion from isProfitableToHoist (#221347)
DeltaFile
+1-2llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+1-21 files

LLVM/project afb42e8llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp

[AMDGPU] Rename the no-modifier operand predicate to *Target, NFC

Match the *Target naming used for the other alignment-aware operand
predicates.
DeltaFile
+48-48llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+48-481 files

LLVM/project fdd2691llvm/test/MC/AMDGPU out-of-range-registers.s misaligned-vgpr-tuples-err.s

[AMDGPU] Update no-modifier operand tests for the dropped align diagnostic

The no-modifier reg-or-inline operands routed through the HwMode
predicate now report a misaligned tuple as a plain invalid operand,
matching the diagnostic dropped earlier in the stack.
DeltaFile
+7-7llvm/test/MC/AMDGPU/misaligned-vgpr-tuples-err.s
+1-1llvm/test/MC/AMDGPU/out-of-range-registers.s
+8-82 files

LLVM/project 7ff1ca0llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp, llvm/test/MC/AMDGPU misaligned-vgpr-tuples-err.s

[AMDGPU] Route no-modifier reg-or-inline AsmParser operands through HwMode predicate

Convert the reg-or-inline operands with no modifiers (MFMA VGPR/AGPR
sources, VCSrc, v_pk_mov_b32, VOP scalar f64) from the fixed-class
isRegOrInlineNoMods to the HwMode-aware isRegOrInlineNoModsByHwMode, so an
odd-aligned tuple is rejected at the offending operand column instead of by
the validateVGPRAlign catch-all.

Co-Authored-By: Claude <noreply at anthropic.com>
DeltaFile
+53-46llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+7-7llvm/test/MC/AMDGPU/misaligned-vgpr-tuples-err.s
+60-532 files

LLVM/project cb84b46llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp

[AMDGPU] Rename the alignment-aware operand predicates to *Target, NFC

The predicates take a *_AlignTarget/_Target operand, so name them after
it. The HwMode resolution behind the operand's class is an implementation
detail that need not appear in the name.
DeltaFile
+14-14llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+14-141 files

LLVM/project 66219cbllvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

[AMDGPU] Make custom AsmParser matchers alignment aware

Currently custom matchers accept registers belonging to unaligned classes,
leaving the alignment check and its diagnostic to validateVGPRAlign. The problem
is that validateVGPRAlign does not account for the operand register class, which
may have a different alignment requirement on mixed-alignment targets.

The fix is to make a custom matcher resolve the operand's _AlignTarget class via
HwMode and use that resolved class to accept a register. However, doing so alone
would reject a misaligned register with a generic "invalid operand for
instruction" diagnostic, so extra infrastructure conveys the alignment diagnostic
instead: on a class miss, diagnoseRegAlign re-checks the register against the same
class with alignment relaxed (getUnalignedEquivalentRC, new in AMDGPUBaseInfo);
if it fits, the only problem is alignment, so it records
OperandMatchError::VGPRAlignMismatch on the operand. matchAndEmitInstruction
selects that reason and prints the alignment error, now at the offending operand
column instead of column 1.

This commit converts the input-mods and DP-ALU DPP matchers. The no-modifier

    [4 lines not shown]
DeltaFile
+87-18llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+87-0llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+6-6llvm/test/MC/AMDGPU/gfx1250_asm_vopd_errs.s
+5-0llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+1-1llvm/test/MC/AMDGPU/misaligned-vgpr-tuples-err.s
+186-255 files

LLVM/project e5dceeellvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

[AMDGPU] Drop the misaligned VGPR-tuple AsmParser diagnostic

The alignment-aware matchers already reject a misaligned tuple, so a
misaligned operand now fails as a plain invalid operand. Keeping the
dedicated "vgpr tuples must be 64 bit aligned" message only for that
case is not worth the extra match-error ranking, the per-operand
diagnostic, and getUnalignedEquivalentRC, so remove all of it.
DeltaFile
+0-87llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+13-57llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+3-3llvm/test/MC/AMDGPU/gfx1250_asm_vopd_errs.s
+0-5llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+1-1llvm/test/MC/AMDGPU/misaligned-vgpr-tuples-err.s
+17-1535 files

LLVM/project ef20856flang/include/flang/Optimizer/Analysis AliasAnalysis.h, flang/lib/Optimizer/Analysis AliasAnalysis.cpp

[fir][aa] Add opt-in cache for use by fir `AliasAnalysis` clients (#221973)

Adds `AliasAnalysisRecursiveEffectsCache`, an opt-in cache that memoizes
per-operation read/write summaries so that `getModRef` on an operation
with `HasRecursiveMemoryEffects` does not re-walk its nested regions on
every query.

This is independent of the `getSource()` memoization added separately:
that one is keyed on (value, flags) and answers "what memory does this
value refer to", while this one is keyed on the operation and answers
"what does this operation and everything nested in it read and write".
LICM enables both, since it only hoists pure-read ops and so invalidates
neither.
DeltaFile
+241-0flang/unittests/Optimizer/AliasAnalysisRecursiveEffectsCacheTest.cpp
+228-0flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+89-0flang/include/flang/Optimizer/Analysis/AliasAnalysis.h
+27-7flang/lib/Optimizer/Transforms/LoopInvariantCodeMotion.cpp
+1-0flang/unittests/Optimizer/CMakeLists.txt
+586-75 files

LLVM/project aaf7461llvm/lib/Target/X86 X86InstrInfo.cpp, llvm/test/CodeGen/X86 twoaddr-lea-eflags-liveintervals.ll

X86: Remove stale EFLAGS live range when converting ADD to LEA

convertToThreeAddress may rewrite an EFLAGS-clobbering ADD into an LEA, which
does not define EFLAGS. hasLiveCondCodeDef guarantees the EFLAGS def was dead, so
drop its LiveIntervals value, otherwise the verifier would fail.

Fixes verifier errors with -early-live-intervals.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+51-0llvm/test/CodeGen/X86/twoaddr-lea-eflags-liveintervals.ll
+15-0llvm/lib/Target/X86/X86InstrInfo.cpp
+66-02 files

LLVM/project c6197ddllvm/test/CodeGen/X86 twoaddr-lea-eflags-liveintervals.ll

more-tests
DeltaFile
+236-33llvm/test/CodeGen/X86/twoaddr-lea-eflags-liveintervals.ll
+236-331 files

LLVM/project 582f097llvm/lib/Target/X86 X86InstrInfo.cpp, llvm/test/CodeGen/X86 twoaddr-lea-eflags-liveintervals.ll

review feedback
DeltaFile
+2-9llvm/lib/Target/X86/X86InstrInfo.cpp
+3-0llvm/test/CodeGen/X86/twoaddr-lea-eflags-liveintervals.ll
+5-92 files

LLVM/project 2189ceallvm/test/Transforms/LoopVectorize iv-select-cmp-trunc.ll find-last-ptr-induction.ll, llvm/test/Transforms/LoopVectorize/AArch64 select-first-index-narrow.ll

[LV] Add tests for argmin/argmax with a narrow index and ptr IVs (NFC) (#222290)

Extend test coverage for argmin/argmax with truncated IVs and pointer
inductions.
DeltaFile
+494-0llvm/test/Transforms/LoopVectorize/select-first-index-narrow.ll
+345-0llvm/test/Transforms/LoopVectorize/find-last-ptr-induction.ll
+266-0llvm/test/Transforms/LoopVectorize/iv-select-cmp-trunc.ll
+49-0llvm/test/Transforms/LoopVectorize/AArch64/select-first-index-narrow.ll
+1,154-04 files

LLVM/project b3e6416clang/test/SemaCXX dllimport.cpp

[Clang](NFC) Rewrite test/SemaCXX/dllimport.cpp as done for dllexport.cpp (#191391)
DeltaFile
+368-780clang/test/SemaCXX/dllimport.cpp
+368-7801 files

LLVM/project ebeb871mlir/lib/Dialect/XeGPU/Transforms XeGPUPropagateLayout.cpp

[MLIR][XeGPU] Restrict XeGPUPropagateLayout analysis scope (#221793)

This PR prevents concurrent access to traversal and mutation of the
shared IR by restricting the walk scope to determine program order
within each gpu.module.

Previously, although the pass is scoped to a single gpu.module, this
walk climbs all the way up to the enclosing top-level builtin.module and
traverses the entire module — including sibling gpu.modules. When there
is multiple gpu.modules, it causes concurrent traversal and mutation of
the shared IR and eventually leads to a segfault.

Assisted-by: Claude
DeltaFile
+20-14mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp
+20-141 files

LLVM/project a86b585lld/test/ELF amdgpu-tid.s, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.cpp

AMDGPU: Remove xnack and sramecc subtarget features (#212792)

Now that these are controlled by module flags, the subtarget
features were just used for assembler and disassembler controls.
Now that the assembler and disassembler can infer these from
the e_flags and target directives, they are no longer necessary.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+9-76llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+71-12llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+38-24llvm/test/MC/AMDGPU/amdgcn-target-directive-conflict.s
+44-14llvm/test/MC/AMDGPU/amdgcn_target_directive_from_eflags.s
+30-14lld/test/ELF/amdgpu-tid.s
+16-12llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx10.s
+208-15224 files not shown
+320-25430 files

LLVM/project be7f0c8llvm/test/CodeGen/AArch64 arm64-abi_align.ll, llvm/test/CodeGen/AMDGPU loop-address.ll

llvm: Remove phantom relocation-model attributes from tests (#221931)

"relocation-model" was never a real function attribute.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+4-4llvm/test/CodeGen/AArch64/arm64-abi_align.ll
+2-2llvm/test/Transforms/SimplifyCFG/volatile-phioper.ll
+1-1llvm/test/CodeGen/Hexagon/vect/vect-xor.ll
+1-1llvm/test/CodeGen/Hexagon/vect/vect-v4i16.ll
+1-1llvm/test/CodeGen/Hexagon/insert4.ll
+1-1llvm/test/CodeGen/AMDGPU/loop-address.ll
+10-102 files not shown
+12-128 files

LLVM/project accf16eclang/include/clang/Lex Lexer.h, clang/lib/Parse ParseTentative.cpp ParseExprCXX.cpp

[clang][CUDA/HIP] Fix parsing of `operator<<<...>` (#218384)

In CUDA mode Lexer merges `<<<` into a single token and Parser fails to
recognize that it is actually a template specialization of `operator<<`
and not a CUDA kernel call expression. Split `<<<` following operator
token to `<<` and `<`.
DeltaFile
+53-0clang/test/Parser/cuda-operator-lesslessless.cu
+30-0clang/lib/Parse/ParseExprCXX.cpp
+7-0clang/lib/Parse/ParseTentative.cpp
+1-1clang/include/clang/Lex/Lexer.h
+91-14 files

LLVM/project 6b72801bolt/lib/Target/RISCV RISCVMCSymbolizer.cpp, bolt/test/RISCV unsymbolized-long-jump.s unsymbolized-call-entry.s

[BOLT][RISCV] Fix AUIPC/JALR call rewriting (#216882)

This builds on the RISC-V decoder support from #217550 and the BOLT
target symbolizer and GOT relocation handling from #217944, both of
which are now merged.

`R_RISCV_CALL` and `R_RISCV_CALL_PLT` cover an AUIPC/JALR pair, but BOLT
treated them as four-byte relocations and decoded only the AUIPC
immediate. Read both instructions and combine their signed high and low
immediates so relocated call targets retain the low 12 bits.

LTO can also leave linker-resolved intra-section AUIPC/JALR calls
without relocations. On RV64, recognize standard call and tail-call
pairs during disassembly, reconstruct the target (including JALR
target-bit clearing), and attach an exact entry-point symbol before
function reordering. Alternate link-register preservation is provided by
the merged #218408.

This follows the RISC-V Unprivileged ISA sections on AUIPC and JALR:

    [21 lines not shown]
DeltaFile
+116-0bolt/test/RISCV/unsymbolized-call-edge.s
+98-1bolt/lib/Target/RISCV/RISCVMCSymbolizer.cpp
+78-0bolt/test/RISCV/call-relocation-pair.s
+60-0bolt/test/RISCV/unsymbolized-call-entry.s
+60-0bolt/test/RISCV/unsymbolized-call.s
+38-0bolt/test/RISCV/unsymbolized-long-jump.s
+450-13 files not shown
+474-79 files

LLVM/project 48ae4d3libcxx/include/__optional optional_ref.h, libcxx/test/std/utilities/optional/optional.monadic transform.pass.cpp

[libc++] Fix `optional<T>::transform` into `optional<T&>` (#221506)

Resolves #220332

- Make `optional<T>` a friend of `optional<T&>`, and add tests.
DeltaFile
+33-0libcxx/test/std/utilities/optional/optional.monadic/transform.pass.cpp
+3-0libcxx/include/__optional/optional_ref.h
+36-02 files

LLVM/project 0952067lldb/source/Target StackFrameRecognizer.cpp, lldb/test/API/commands/frame/recognizer/step-through TestFrameRecognizerStepThrough.py

[lldb] Match frame recognizers by function when the frame has no symbol (#222060)

A frame can have a function without having a symbol: a PE/COFF image
built with DWARF carries no symbol table at all, so `symctx.symbol` is
null on Windows while `symctx.function` resolves fine from the debug
info. `GetRecognizerForFrame` bailed out on `!symbol`, so no frame
recognizer ever matched there.

Fall back to the function's start address when there is no symbol. The
symbol still wins when both are present, so this is a no-op on
ELF/Mach-O.

This fixes `TestFrameRecognizerStepThrough.py`.
DeltaFile
+7-3lldb/source/Target/StackFrameRecognizer.cpp
+0-1lldb/test/API/commands/frame/recognizer/step-through/TestFrameRecognizerStepThrough.py
+7-42 files

LLVM/project 7923040clang/include/clang/AST ASTContext.h, clang/lib/AST ASTContext.cpp

[clang][AST][NFC] Make ASTContext::isPFPField() static (#220265)
DeltaFile
+1-1clang/lib/AST/ASTContext.cpp
+1-1clang/include/clang/AST/ASTContext.h
+2-22 files

LLVM/project 4200a8ellvm/lib/Target/X86 X86CompressEVEX.cpp, llvm/test/CodeGen/X86 avx512-regcall-NoMask.ll compress-evex-vpmov-kill.mir

[X86] Compress masked VPBLENDM using VBLENDV (#221838)

Fixes #221678.

This extends the X86 EVEX compression pass to recognize compatible
`VPMOVD2M/VPMOVQ2M + VPBLENDMD/VPBLENDMQ` patterns and replace them with
the corresponding VEX `VBLENDVPS/VBLENDVPD` instruction when the mask
width and element granularity match.

For example, the reported AVX-512 sequence:

```asm
vpslld    $31, %xmm0, %xmm0
vpmovd2m  %xmm0, %k1
vpblendmd %xmm1, %xmm2, %xmm0 {%k1}
```

is reduced to:


    [31 lines not shown]
DeltaFile
+61-0llvm/test/CodeGen/X86/compress-evex-vpmov-blendv.mir
+35-9llvm/lib/Target/X86/X86CompressEVEX.cpp
+30-0llvm/test/CodeGen/X86/compress-evex-vpmov-kill.mir
+3-6llvm/test/CodeGen/X86/avx512-regcall-NoMask.ll
+129-154 files

LLVM/project 3d2f88dllvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 avx512-masked-op-fusion.ll

[X86] Fix commuteSelect miscompile with double-used condition value (#219436)

The multi-use loop iterated `Cond->users()` which yields duplicates when
a select uses the condition in multiple operand positions. This caused a
double-commute and iterator corruption, leaving other selects with an
inverted condition but unswapped operands.

Remove the in-place mutation loop and return a new select node. The DAG
combiner visits each select independently and `getSetCC` CSEs the
inverted condition so all commuted selects share it.
DeltaFile
+63-0llvm/test/CodeGen/X86/avx512-masked-op-fusion.ll
+2-14llvm/lib/Target/X86/X86ISelLowering.cpp
+65-142 files

LLVM/project 95dfce1llvm/lib/Target/AArch64 AArch64SchedNeoverseV3.td, llvm/test/tools/llvm-mca/AArch64/Neoverse V3-neon-instructions.s

[AArch64] Add Neoverse V3 scheduling info for v264 frecpe (#221917)

This was missing, falling back to the default information. It should be
like the others.

This is the Neoverse V3 equivalent of #219115
DeltaFile
+5-5llvm/test/tools/llvm-mca/AArch64/Neoverse/V3-neon-instructions.s
+1-0llvm/lib/Target/AArch64/AArch64SchedNeoverseV3.td
+6-52 files

LLVM/project f920a67llvm/test/CodeGen/AArch64 arm64-abi_align.ll, llvm/test/CodeGen/Hexagon/vect vect-xor.ll vect-v4i16.ll

llvm: Remove phantom relocation-model attributes from tests

"relocation-model" was never a real function attribute.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+4-4llvm/test/CodeGen/AArch64/arm64-abi_align.ll
+2-2llvm/test/Transforms/SimplifyCFG/volatile-phioper.ll
+1-1llvm/test/Transforms/LoopVectorize/vectorize-once.ll
+1-1llvm/test/Transforms/LoopVectorize/dbg.value.ll
+1-1llvm/test/CodeGen/Hexagon/vect/vect-xor.ll
+1-1llvm/test/CodeGen/Hexagon/vect/vect-v4i16.ll
+10-102 files not shown
+12-128 files

LLVM/project 6a20cacllvm/docs/CommandGuide llvm-objdump.md, llvm/tools/llvm-objdump ObjdumpOpts.td

[llvm-objdump] Document selecting symbols containing commas (#221619)

The documentation does not clearly distinguish how
`--disassemble-symbols=`
and `--disassemble=<symbol>` handle their arguments, making it easy to
overlook how to select symbols whose names contain commas.

Update the command guide and help text to explain that the former
accepts
a comma-separated list of symbols, while the latter accepts a single
symbol
name and may be specified multiple times.

Assisted-by: OpenAI Codex
DeltaFile
+12-3llvm/docs/CommandGuide/llvm-objdump.md
+3-2llvm/tools/llvm-objdump/ObjdumpOpts.td
+15-52 files

LLVM/project cc38b29llvm/test/MC/MachO zero-space.s weakdef.s, llvm/test/tools/llvm-readobj/MachO file-headers-arm64.test file-headers.test

[llvm-readobj] Display Mach-O CPU capability bits (#221617)

The Mach-O file header output masks the capability bits out of
`cpusubtype`
without printing them separately, so this information is missing from
the
output.

Add a `CpuCapabilities` field to print the high byte in hexadecimal,
matching the numeric representation used by `llvm-objdump`.

Fixes #80198.

Assisted-by: OpenAI Codex (implementation, tests, and initial
description).
DeltaFile
+61-0llvm/test/tools/llvm-readobj/MachO/cpu-capabilities.yaml
+2-0llvm/tools/llvm-readobj/MachODumper.cpp
+2-0llvm/test/tools/llvm-readobj/MachO/file-headers.test
+1-0llvm/test/tools/llvm-readobj/MachO/file-headers-arm64.test
+1-0llvm/test/MC/MachO/zero-space.s
+1-0llvm/test/MC/MachO/weakdef.s
+68-03 files not shown
+71-09 files

LLVM/project 4e76287llvm/lib/CodeGen/GlobalISel IRTranslator.cpp

[GlobalISel] Restrict value offset tracking to aggregates (NFC) (#221287)

The single-vreg fast path added in d30d5fe8dd5d3 still populated an
offset list, even though offsets are only necessary for aggregate
values.

This wasn't the only place doing so. Avoid creating or updating offset
lists for non-aggregate values and add an assertion to enforce this
invariant.

Small -0.04% geomean improvement on CTMark aarch64-O0-g.

https://llvm-compile-time-tracker.com/compare.php?from=97cbc1e404b980edc58bfbcabb6f1c61793b624b&to=2aeb9d236a2cacf8ab93722b8b629243384bae68&stat=instructions:u

Assisted-by: codex
DeltaFile
+10-9llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+10-91 files

LLVM/project ae9cbb7llvm/lib/Target/AMDGPU SIMemoryLegalizer.cpp, llvm/test/CodeGen/AMDGPU memory-legalizer-non-volatile.mir

Comments
DeltaFile
+3-3llvm/test/CodeGen/AMDGPU/memory-legalizer-non-volatile.mir
+1-1llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
+4-42 files

LLVM/project f3d9ca0llvm/test/CodeGen/AMDGPU memory-legalizer-non-volatile.mir

Fix MIR test
DeltaFile
+3-3llvm/test/CodeGen/AMDGPU/memory-legalizer-non-volatile.mir
+3-31 files