LLVM/project e49672c — llvm/lib/Transforms/Utils ProfileVerify.cpp, llvm/test/Transforms/PGOProfile profcheck-mem-ops.ll

[ProfCheck] Annotate/verify memop VP metadata

This patch makes profcheck (optionally) inject/verify memory operation
VP metadata for variable sized memory operations. This is off by default
for now as it causes another ~50 tests to fail under profcheck.

Reviewers: mtrofin, david-xl, snehasish

Pull Request: https://github.com/llvm/llvm-project/pull/243582
DeltaFile
+46-0llvm/test/Transforms/PGOProfile/profcheck-mem-ops.ll
+21-0llvm/lib/Transforms/Utils/ProfileVerify.cpp
+67-02 files

LLVM/project e21e080 — llvm/lib/Transforms/Utils ProfileVerify.cpp, llvm/test/Transforms/PGOProfile profcheck-indirect-calls.ll

[ProfCheck] Annotate/verify indirect call VP metadata

This patch makes prof-inject add VP metadata to indirect calls and makes
prof-verify assert that indirect calls have VP metadata. This is left
off by default for now as it makes ~60 additional tests fail under the
ProfCheck configuration.

Replaces #154657.

Co-Authored-By: Mircea Trofin <mtrofin at google.com>

Reviewers: mtrofin, snehasish, david-xl

Pull Request: https://github.com/llvm/llvm-project/pull/243581
DeltaFile
+30-8llvm/lib/Transforms/Utils/ProfileVerify.cpp
+32-0llvm/test/Transforms/PGOProfile/profcheck-indirect-calls.ll
+62-82 files

LLVM/project 5ec9b5f — clang/test/Misc/target-invalid-cpu-note riscv.c, llvm/lib/TargetParser RISCVTargetParser.cpp

[RISCV] Sort the CPU list returned by fillValid(Tune)CPUArchList (#243708)

This puts vendor tune CPU names with their regular CPU names.

This will also affect the output of #243697
DeltaFile
+11-11clang/test/Misc/target-invalid-cpu-note/riscv.c
+6-0llvm/lib/TargetParser/RISCVTargetParser.cpp
+17-112 files

LLVM/project 51a8442 — clang/docs AllocToken.md, clang/include/clang/AST InferAlloc.h

[AllocToken] Infer the allocated type from placement new into the result (#241548)

-fsanitize=alloc-token infers the type of an untyped allocation (malloc,
size-returning new, alloc_size functions) from a sizeof in the size
argument or a cast of the result. The common "allocate raw storage, then
construct in place" idiom has neither:

  void *mem = alloc(size);
  T *obj = new (mem) T();

and so gets the fallback token, which misplaces the object under a
pointer-split token mode. Add placement new as a third source. The order
is sizeof, then placement new, then cast: a sizeof states what the
allocation was sized for (it may be a header plus elements placed by
pointer arithmetic), while a cast to a raw storage pointer carries less
information than the construction. Only the reserved global placement
form is considered; the storage is matched through parentheses, casts,
and the non-static fields of a by-value result (res.p of a
size-returning allocation). A local variable is used only if it is

    [8 lines not shown]
DeltaFile
+322-0clang/test/CodeGenCXX/alloc-token.cpp
+127-4clang/lib/AST/InferAlloc.cpp
+18-3clang/include/clang/AST/InferAlloc.h
+13-0clang/docs/AllocToken.md
+10-2clang/lib/CodeGen/CGExpr.cpp
+6-0clang/lib/CodeGen/CodeGenFunction.h
+496-92 files not shown
+504-108 files

LLVM/project d08d341 — clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaDeclCXX.cpp

[HLSL] disallow multiple inheritance in hlsl (#243555)

disallow multiple inheritance in HLSL.

Closes #236534
Assisted by Copilot GPT-6.1 Sol
DeltaFile
+16-0clang/test/SemaHLSL/Language/NoMultipleInheritance.hlsl
+8-0clang/lib/Sema/SemaDeclCXX.cpp
+1-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+25-03 files

LLVM/project dd82ed5 — lldb/source/API SBEvent.cpp, lldb/unittests/API CMakeLists.txt SBEventTest.cpp

[lldb] Fix a crash in SBEvent::GetBroadcasterClass (#243736)

An event has no broadcaster until it is broadcast. Return "unknown
class" instead of dereferencing null.

Assisted-by: Claude
DeltaFile
+23-0lldb/unittests/API/SBEventTest.cpp
+5-6lldb/source/API/SBEvent.cpp
+1-0lldb/unittests/API/CMakeLists.txt
+29-63 files

LLVM/project 9f73ca3 — llvm/lib/Analysis LoopAccessAnalysis.cpp, llvm/lib/Transforms/Utils LoopUtils.cpp

[LAA] Allow runtime checks between comparable address spaces. (#229588)

If casts between address spaces are no-ops, both address spaces
are integral and they have the same size, the pointers in the address
space should be guaranteed not to overlap. Otherwise the same
address would point to different objects.

In this case, we can compare them and generate runtime checks.

Fixes https://github.com/llvm/llvm-project/issues/229278.

PR: https://github.com/llvm/llvm-project/pull/229588
DeltaFile
+418-0llvm/test/Transforms/LoopVectorize/X86/runtime-checks-different-address-spaces.ll
+234-0llvm/test/Analysis/LoopAccessAnalysis/stencil-group-merging-address-spaces.ll
+180-0llvm/test/Analysis/LoopAccessAnalysis/runtime-checks-different-address-spaces.ll
+35-10llvm/lib/Analysis/LoopAccessAnalysis.cpp
+11-9llvm/lib/Transforms/Utils/LoopUtils.cpp
+8-0llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+886-192 files not shown
+890-228 files

LLVM/project 5c10134 — llvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp, llvm/test/CodeGen/AMDGPU half.ll

[AMDGPU] Add missing EXTLOAD/TRUNCSTORE legalization for v{5,6,7}f16 (#243383)

The legalization actions for EXTLOADs of v{5,6,7}f16 to corresponding
f32 types and TRUNCSTOREs from v{5,7}f32 to corresponding f16 types were
never added after those MVTs were introduced in 9b5502292d8e4 ("[CG] Add
VTs for v[567]i1 and v[567]f16").

Add the legalization actions and corresponding tests, also for the
preexisting TRUNCSTORE to v6f16 handling.

Fixes ROCM-33452.

Co-authored-by: Jacob Lambert <jacob.lambert at amd.com>
DeltaFile
+741-0llvm/test/CodeGen/AMDGPU/half.ll
+5-0llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+746-02 files

LLVM/project 4391b89 — llvm/test/Transforms/SLPVectorizer/AArch64 store-chain-split-wide-stored-values.ll, llvm/test/Transforms/SLPVectorizer/X86 gather-shuffle-all-candidates.ll

[SLP][NFC]Add extra tests for shuffles and costs, NFC

Pull-request: https://github.com/llvm/llvm-project/pull/243926
DeltaFile
+47-0llvm/test/Transforms/SLPVectorizer/X86/gather-shuffle-all-candidates.ll
+40-0llvm/test/Transforms/SLPVectorizer/AArch64/store-chain-split-wide-stored-values.ll
+87-02 files

LLVM/project f75598f — llvm/lib/Transforms/Utils LoopUtils.cpp, llvm/test/Transforms/LoopVectorize runtime-checks-difference-rmw-hoist.ll runtime-checks-hoist.ll

[LoopUtils] Check the first outer iteration for co-moving pointer groups

When runtime checks are hoisted out of the outer loop, the range of each
pointer group is widened to cover all iterations of the outer loop. If both
groups of a check advance by the same step in the outer loop, e.g. two rows
of the same image:

```cpp
for (y = 0; y < H; y += 2)
  for (x = 0; x < n; x++) {
    img[y*S + 3*x]     = ...;
    img[(y+1)*S + 3*x] = ...;
  }
```

the widened ranges overlap as soon as the outer loop runs twice, so the
check always fails and the vector loop never runs.

If all bounds of both groups are affine AddRecs of the outer loop with the

    [7 lines not shown]
DeltaFile
+63-15llvm/test/Transforms/LoopVectorize/AArch64/low_trip_memcheck_cost.ll
+22-29llvm/test/Transforms/LoopVectorize/runtime-checks-hoist-same-outer-step.ll
+18-14llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+23-5llvm/lib/Transforms/Utils/LoopUtils.cpp
+2-3llvm/test/Transforms/PhaseOrdering/AArch64/matrix-extract-insert.ll
+2-3llvm/test/Transforms/LoopVectorize/runtime-checks-difference-rmw-hoist.ll
+130-696 files

LLVM/project 7de98ce — llvm/test/Transforms/LoopVectorize runtime-checks-hoist-same-outer-step.ll

[LV] Add pre-commit tests (NFC)
DeltaFile
+633-0llvm/test/Transforms/LoopVectorize/runtime-checks-hoist-same-outer-step.ll
+633-01 files

LLVM/project 04ae114 — llvm/lib/Transforms/Utils LoopUtils.cpp

[LoopUtils] Factor out the same-step check of runtime check bounds (NFC)

The follow-up change uses four SCEV expressions for this type of change
so it also generalizes it to take an array.
DeltaFile
+37-28llvm/lib/Transforms/Utils/LoopUtils.cpp
+37-281 files

LLVM/project e7fd6bc — llvm/lib/Transforms/Utils LoopUtils.cpp, llvm/test/Transforms/LoopVectorize runtime-check.ll pointer-select-runtime-checks.ll

[LoopUtils][LV] Compute runtime check bounds per check (NFCI)

getRuntimeCheckBounds takes a single pointer group, but the bounds to use
for one group can depend on the group it is checked against.

This changes RuntimePointerCheck to include bounds of both of its groups.
RuntimeCheckBounds takes the new role of covering both groups and
RuntimeCheckGroupBounds covering single group bounds.
The per-group logic moved unchanged into a static helper.

In VPlan's createRuntimeChecks, compute and expand the bounds of each check
right before its compares, in a single loop over the checks, instead of
caching the expanded bounds per group.

We can do it because VPSCEVExpander already reuses expansions of the same SCEV,
and VPlan's CSE merges the resulting duplicate freezes.

As the result, this change only affects the order of the instructions in
the runtime checks.
DeltaFile
+208-208llvm/test/Transforms/PhaseOrdering/AArch64/quant_4x4.ll
+113-113llvm/test/Transforms/LoopVectorize/VPlan/memory-checks.ll
+31-31llvm/test/Transforms/LoopVectorize/pointer-select-runtime-checks.ll
+31-31llvm/test/Transforms/LoopVectorize/if-pred-non-void.ll
+36-20llvm/lib/Transforms/Utils/LoopUtils.cpp
+19-19llvm/test/Transforms/LoopVectorize/runtime-check.ll
+438-42227 files not shown
+577-56033 files

LLVM/project 7cc7f60 — llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer DependencyGraph.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer Scheduler.cpp DependencyGraph.cpp

Reapply "[SandboxVec][DAG] Implement verifier" (#243745) (#243748)

This reverts commit 70769f2c89d10f2203aa3268d2640ab9190af226.
DeltaFile
+140-0llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
+9-7llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
+10-3llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
+159-103 files

LLVM/project eceefac — flang-rt/lib/runtime edit-input.cpp, flang-rt/test/Driver boz-input-field-int16.f90 boz-input-field.f90

[flang-rt] Consume the whole field in B/O/Z input (#243678)

EditBOZInput reads a fixed-width field twice: the first pass counts the
significant digits, then it rewinds to the first significant digit and
the second pass decodes exactly that many digits. Nothing moved the
position back to the end of the field afterwards, so the next edit
descriptor started reading right after the last significant digit:
    
s = '1F XY'; read (s, '(z6,a2)') i, c ! c was ' ', not 'XY'
          s = '1f,2';     read (s, '(z4,i2)') i, j   ! j was 0, not 2
    
The second pass also called GotChar() again for each character it
re-read, so READ(SIZE=) counted the significant digits twice (8 instead
of 6 for '(z6)' on '  1F  ').
    
Record the position reached at the end of the first pass, which is past
any trailing blanks and any separator that ended the field early, and
return to it after decoding. Undo the SIZE= count of the re-read
characters.

    [11 lines not shown]
DeltaFile
+90-0flang-rt/test/Driver/boz-input-field.f90
+29-0flang-rt/unittests/Runtime/InputExtensions.cpp
+25-0flang-rt/test/Driver/boz-input-field-int16.f90
+12-0flang-rt/lib/runtime/edit-input.cpp
+6-0flang/docs/Extensions.md
+162-05 files

LLVM/project d216aa4 — libcxx/test/configs llvm-libc++-android.cfg.in, libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members put_string_en_US.pass.cpp

[libc++][Android] Trim LIBCXX-ANDROID-FIXME comments
DeltaFile
+6-6libcxx/test/support/filesystem_test_helper.h
+6-6libcxx/test/configs/llvm-libc++-android.cfg.in
+2-4libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp
+2-4libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_one.pass.cpp
+2-4libcxx/test/std/re/re.traits/translate_nocase.pass.cpp
+2-4libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp
+20-2844 files not shown
+94-18050 files

LLVM/project af19819 — libcxx/test/configs llvm-libc++-android.cfg.in, libcxx/test/std/input.output/iostream.objects/wide.stream.objects wcin.sync_with_stdio.sh.cpp wcin.sh.cpp

[libc++][Android] Clean up pre-API-23 carveouts and document LIBCXX-ANDROID-FIXMEs

Due to updating the Android sysroot and compiler in previous upgrades, certain test configurations can be updated by switching them from `UNSUPPORTED` to `XFAIL` and dropping obsolete API carveouts. In addition, document root cause and resolutions for other `LIBCXX-ANDROID-FIXME`.

Assisted-by: Gemini
DeltaFile
+7-8libcxx/test/configs/llvm-libc++-android.cfg.in
+6-8libcxx/test/support/filesystem_test_helper.h
+5-3libcxx/test/std/re/re.traits/translate_nocase.pass.cpp
+5-3libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.sync_with_stdio.sh.cpp
+5-3libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.sh.cpp
+5-3libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.readmany.sh.cpp
+33-2853 files not shown
+208-11659 files

LLVM/project e95b767 — libcxx/test/libcxx/atomics clear_padding.pass.cpp, libcxx/test/libcxx/atomics/atomics.types.generic padding.pass.cpp

[libc++][Android] Update compiler to r614150 for Android libc++ builders (#243691)

Libc++ is dropping Clang 21 in
https://github.com/llvm/llvm-project/pull/231580 so upgrade Android's
compiler from r596125 to r614150. Android's r614150 compiler was cut
before `__builtin_clear_padding` landed, causing the atomic padding
tests to fail so we also marked those tests as `UNSUPPORTED:
LIBCXX-ANDROID-FIXME` until the next compiler update.

Assisted-by: Gemini
DeltaFile
+2-2libcxx/utils/ci/docker/docker-compose.yml
+3-0libcxx/test/std/atomics/atomics.types.generic/padding.pass.cpp
+3-0libcxx/test/libcxx/atomics/clear_padding.pass.cpp
+3-0libcxx/test/libcxx/atomics/atomics.types.generic/padding.pass.cpp
+11-24 files

LLVM/project 2f3334c — llvm/lib/Target/SystemZ SystemZTargetMachine.h SystemZTargetMachine.cpp

SystemZ: Use LastSubtargetCache in getSubtargetImpl (#242777)

Migrate to the new common pattern and infrastructure.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+20-8llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
+14-0llvm/lib/Target/SystemZ/SystemZTargetMachine.h
+34-82 files

LLVM/project 01e724e — clang/docs LanguageExtensions.md, clang/include/clang/Options Options.td

Enable driver changes for fexec-charset
DeltaFile
+14-6clang/lib/Driver/ToolChains/Clang.cpp
+14-4clang/include/clang/Options/Options.td
+11-3clang/test/Driver/clang_f_opts.c
+10-0llvm/lib/Support/TextEncoding.cpp
+4-3clang/test/Driver/cl-options.c
+3-3clang/docs/LanguageExtensions.md
+56-193 files not shown
+60-199 files

LLVM/project a5ec6c0 — clang/include/clang/Options Options.td, clang/lib/Driver/ToolChains Clang.cpp

address comments
DeltaFile
+3-3clang/include/clang/Options/Options.td
+1-1clang/lib/Driver/ToolChains/Clang.cpp
+4-42 files

LLVM/project 9110aed — clang/include/clang/Basic TargetInfo.h, clang/lib/AST ASTContext.cpp

convert to exec-charset inside getPredefinedStringLiteralFromCache, test __builtin_FILE()
DeltaFile
+10-0clang/lib/AST/ASTContext.cpp
+3-1clang/test/CodeGen/systemz-charset.cpp
+3-0clang/lib/Basic/TargetInfo.cpp
+2-0clang/include/clang/Basic/TargetInfo.h
+18-14 files

LLVM/project 426ee1d — clang/lib/AST ASTContext.cpp, clang/lib/Lex TextEncoding.cpp

Convert the key before cache lookup to prevent encoding differences
DeltaFile
+9-9clang/lib/AST/ASTContext.cpp
+2-0clang/lib/Lex/TextEncoding.cpp
+11-92 files

LLVM/project 8cdcaef — clang/lib/AST ScanfFormatString.cpp FormatString.cpp

address comments
DeltaFile
+16-26clang/lib/AST/PrintfFormatString.cpp
+11-11clang/lib/AST/FormatString.cpp
+4-3clang/lib/AST/ScanfFormatString.cpp
+31-403 files

LLVM/project 60bc9ed — clang/lib/AST FormatStringParsing.h FormatString.cpp, clang/lib/Sema SemaChecking.cpp

Add format string handling
DeltaFile
+84-60clang/lib/AST/PrintfFormatString.cpp
+36-36clang/lib/AST/ScanfFormatString.cpp
+43-27clang/lib/Sema/SemaChecking.cpp
+31-25clang/lib/AST/FormatString.cpp
+27-2clang/lib/AST/FormatStringParsing.h
+19-0llvm/lib/Support/TextEncoding.cpp
+240-1507 files not shown
+270-16413 files

LLVM/project 8a368f3 — llvm/include/llvm/Analysis MustExecute.h, llvm/lib/Analysis MustExecute.cpp

[MustExecute] Define the block context helpers out of line

They use BasicBlock, which MustExecute.h only declares, so the header
did not compile without precompiled headers.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+33-0llvm/lib/Analysis/MustExecute.cpp
+2-30llvm/include/llvm/Analysis/MustExecute.h
+35-302 files

LLVM/project e856b2b — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU load.ll

[AMDGPU] Price uniform constant loads by their dword count (#242550)

Drop the model of how legalization splits and widens a scalar load whose
size is not a legal number of dwords. It is a lot of code for a few rare
shapes.

Addresses post-merge review in #238840
DeltaFile
+38-32llvm/test/Analysis/CostModel/AMDGPU/load.ll
+0-29llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+38-612 files

LLVM/project ec23795 — clang/test/OpenMP metadirective_device_isa_codegen.cpp, llvm/lib/Frontend/OpenMP OMPContext.cpp

[OpenMP] Compare ISA names when a selector requires more traits (#242465)

isStrictSubset compared ISA names only when both selectors required the
same number of traits. When the second selector required more, the first
was a strict subset even if the second didn't require its ISA names, so
with

```
  #pragma omp metadirective when(device = {isa("sse")} : parallel) \
      when(device = {isa("sse2")}, user = {condition(1)} : single)
```

both WHEN clauses score the same and SINGLE was selected, although
neither selector is a subset of the other and the first one should win.
Compare the ISA names before checking whether the count is strict.

Assisted with Copilot and Clause Opus 5.5.

Co-authored-by: Copilot <223556219+Copilot at users.noreply.github.com>
DeltaFile
+28-0llvm/unittests/Frontend/OpenMPContextTest.cpp
+8-5llvm/lib/Frontend/OpenMP/OMPContext.cpp
+12-0clang/test/OpenMP/metadirective_device_isa_codegen.cpp
+48-53 files

LLVM/project f985e51 — llvm/test/CodeGen/AArch64 misched-fusion-fmin-fmax-post-ra.mir

[AArch64] Test inexact-match overlap WAW is not clustered(NFC) (#243900)

Currently we only cluster exact-match WAW. Add a missing representative
tests that we dont cluster inexact overlap. AES requires FPR128 so it
cannot be easily tested.
DeltaFile
+36-0llvm/test/CodeGen/AArch64/misched-fusion-fmin-fmax-post-ra.mir
+36-01 files

LLVM/project dd2aecc — llvm/include/llvm/Transforms/IPO Attributor.h, llvm/lib/Target/AMDGPU AMDGPUAttributor.cpp

Revert "Attributor: Fix build with older GCC after AAKindSet (#240975)"

This reverts commit 19901848353e558519e4d6a9c2be2c1a2ab26ea1.
DeltaFile
+60-55llvm/include/llvm/Transforms/IPO/Attributor.h
+20-8llvm/lib/Transforms/IPO/Attributor.cpp
+20-8llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+100-713 files