LLVM/project ef1b46fclang/lib/Sema SemaTemplate.cpp, clang/test/CXX/drs cwg25xx.cpp

[Clang] Fix a crash when checking the constraints of a self-referential concept (#208465)

Mark self-referencial concepts as invalid to prevent them from being
evaluated (which would crash).

Fixes #206336
DeltaFile
+22-6clang/test/SemaTemplate/concepts.cpp
+0-6clang/test/CXX/drs/cwg25xx.cpp
+1-0clang/lib/Sema/SemaTemplate.cpp
+23-123 files

LLVM/project 810a463flang/lib/Optimizer/OpenACC/Support FIROpenACCTypeInterfaces.cpp, flang/test/Lower/OpenACC acc-reduction.f90 acc-reduction-maxmin.f90

[flang][openacc] make openacc-use-reduction-combine cl switch default (#208473)

Turn the switch on now that is has been tested.
Will remove the switch in a later patch.
DeltaFile
+21-193flang/test/Lower/OpenACC/acc-reduction.f90
+8-8flang/test/Lower/OpenACC/acc-reduction-maxmin.f90
+1-1flang/lib/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.cpp
+30-2023 files

LLVM/project 5eb8007clang/cmake/modules ClangConfig.cmake.in, cmake/Modules GetTripleCMakeSystemName.cmake NormalizeTriple.cmake

Revert "Reapply "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133) (#205522)" (#208644)

The change broke the runtimes build for Android; see discussion on the
PR. There are fixes in progress, but let's revert to unbreak the tree
until all those are ready to land.

This reverts commit 00b2f81418233397e601afaeea6d62c47a6c368a and the
follow-up commit 1008b485e4807476c831910cf404a0315f06c788.
DeltaFile
+0-89cmake/Modules/GetTripleCMakeSystemName.cmake
+45-40llvm/cmake/modules/LLVMConfig.cmake.in
+15-49llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+0-36cmake/Modules/NormalizeTriple.cmake
+16-2runtimes/CMakeLists.txt
+1-4clang/cmake/modules/ClangConfig.cmake.in
+77-2201 files not shown
+81-2207 files

LLVM/project 06e7dfclldb/test/API/tools/lldb-dap/module TestDAP_module.py, lldb/test/API/tools/lldb-dap/module-event TestDAP_module_event.py

[lldb-dap] Migrate all DAP module tests. (#207869)

migrate tests module, moduleEvents and moduleSymbols
DeltaFile
+84-75lldb/test/API/tools/lldb-dap/module/TestDAP_module.py
+33-34lldb/test/API/tools/lldb-dap/module-event/TestDAP_module_event.py
+16-18lldb/test/API/tools/lldb-dap/moduleSymbols/TestDAP_moduleSymbols.py
+133-1273 files

LLVM/project 83950f4lldb/packages/Python/lldbsuite/test/tools/lldb_dap lldb_dap_testcase.py utils.py

[lldb-dap] Log the adapter's stdio during cleanup (#208432)

The adapter may crash for any reason especially if it is built with
sanitizers. Log the adapter's stdout and stderr.
DeltaFile
+7-0lldb/packages/Python/lldbsuite/test/tools/lldb_dap/lldb_dap_testcase.py
+1-0lldb/packages/Python/lldbsuite/test/tools/lldb_dap/utils.py
+8-02 files

LLVM/project 679d5a2libc/docs full_host_build.md full_cross_build.md, libc/docs/dev builtin_compatibility.md code_style.md

[docs] Rewrite libc docs from reST to markdown (#208374)

Tracking issue: https://github.com/llvm/llvm-project/issues/201242
Migration guide docs:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840

This was prepared with rst2myst plus LLM-assisted cleanup. I paged
through all the generated HTML looking for migration artifacts, and all
of the differences I could find appear to be formatting error
corrections. Please spot check my work and approve if it looks good. You
can use the HTML links below to confirm it renders properly.

-----

Before/after validation links:

| Source file | Before HTML | After HTML |

    [109 lines not shown]
DeltaFile
+175-345libc/docs/dev/builtin_compatibility.md
+206-217libc/docs/dev/code_style.md
+162-164libc/docs/full_host_build.md
+135-145libc/docs/full_cross_build.md
+87-91libc/docs/dev/undefined_behavior.md
+84-88libc/docs/talks.md
+849-1,05024 files not shown
+1,808-2,11630 files

LLVM/project 9a4ad0alibc/src/__support/OSUtil/linux/syscall_wrappers setitimer.h getitimer.h, libc/src/sys/time/linux setitimer.cpp

[libc] Assorted improvements to [gs]etitimer (#206974)

This started out as a patch adding a syscall wrapper for the two
functions. It still does that, but along the way I (or rather AI)
discovered an edge case in the truncation of microsecond values, where
we could turn bogus values into seemingly valid ones by throwing away
the high-order bits.

Additionally, when writing a test case, I noticed that the (64-bit)
kernel returns EINVAL for these out-or-range values. Our check returns
EOVERFLOW in this case, so I also change our error code in order to
provide an uniform behavior for the test case.

Neither of these (the check and the EINVAL error code) are present in
glibc (which lets truncated usec values through and returns EOVERFLOW on
second truncation), but I think it's better to be consistent with the
64-bit behavior. The EOVERFLOW error also has no foundation in POSIX
whereas EINVAL is mentioned as an error for invalid microseconds.


    [4 lines not shown]
DeltaFile
+82-0libc/src/__support/OSUtil/linux/syscall_wrappers/setitimer.h
+55-0libc/src/__support/OSUtil/linux/syscall_wrappers/getitimer.h
+5-48libc/src/sys/time/linux/setitimer.cpp
+49-0libc/src/__support/OSUtil/linux/syscall_wrappers/alarm.h
+5-38libc/src/unistd/linux/alarm.cpp
+43-0libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt
+239-8610 files not shown
+327-12016 files

LLVM/project 24ce77eclang/lib/CodeGen CGStmtOpenMP.cpp, clang/test/OpenMP teams_distribute_parallel_for_simd_if_openmp52_codegen.cpp target_teams_distribute_parallel_for_simd_if_openmp52_codegen.cpp

[Clang][OpenMP] Fix `if` clause not affecting `teams` construct on host (#207444)

In #205345, it was discovered that the `if` clause for the `teams`
construct
does not actually create a serial league when the code is built with
Clang.
Looking at the emitted IR, no call to `__kmpc_push_num_teams` was added
for an `if` clause. Hence, `__kmpc_fork_teams` always created the number
of
teams specified via the `num_teams` clause, or the _nteams-var_ ICV.

During `emitCommonOMPTeamsDirective`, only the `num_teams` and
`thread_limit`
clauses were checked, whereas the `if` clause was missing.
To fix the missing code, check for an `if` clause mapped to `teams` or
`unknown`. If the clause is present, and false, emit
`__kmpc_push_num_teams`
with the number of teams set to 1. The `thread_limit` clause is
unaffected.

    [21 lines not shown]
DeltaFile
+12,190-0clang/test/OpenMP/teams_distribute_parallel_for_simd_if_openmp52_codegen.cpp
+12,098-0clang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_openmp52_codegen.cpp
+41-8clang/lib/CodeGen/CGStmtOpenMP.cpp
+24,329-83 files

LLVM/project c1d66b5clang/www cxx_dr_status.html

[clang] Update C++ DR status page (#208641)
DeltaFile
+59-10clang/www/cxx_dr_status.html
+59-101 files

LLVM/project 0faf45clibcxx/include/__cxx03/__configuration abi.h, libcxx/include/__ranges chunk_by_view.h drop_while_view.h

[libc++] Rename the macro for the LLVM 18 ABI tag used in ranges (#208464)

We typically use macros like _LIBCPP_ABI_XYZ for ABI settings that can
be configured by the user. Since _LIBCPP_ABI_LLVM18_NO_UNIQUE_ADDRESS is
not one of those, rename it to make it clearer it's an ABI tag
attribute.

As a drive-by remove the definition in the frozen C++03 config header
since it should never be needed (Ranges are not provided in C++03).
DeltaFile
+0-10libcxx/include/__cxx03/__configuration/abi.h
+1-1libcxx/include/__ranges/chunk_by_view.h
+1-1libcxx/include/__ranges/drop_while_view.h
+1-1libcxx/include/__ranges/filter_view.h
+1-1libcxx/include/__ranges/repeat_view.h
+1-1libcxx/include/__ranges/single_view.h
+5-153 files not shown
+8-189 files

LLVM/project c93aefblibcxx/include/__configuration abi.h

[libc++] Remove diagnostic about _LIBCPP_ABI_NO_ITERATOR_BASES (#208460)

This was slated for removal in LLVM 22 but we hadn't removed it yet.
DeltaFile
+0-9libcxx/include/__configuration/abi.h
+0-91 files

LLVM/project 3c59a21lldb/test/API/lang/cpp/builtin_types/int TestIntTypes.py main.cpp

[lldb][test] Add a new test for integer types (#208441)

This is a new modern test for integer types that replaces the test logic
from `API/types` test that is about to be deleted.

See also #208402

assisted-by: claude
DeltaFile
+43-0lldb/test/API/lang/cpp/builtin_types/int/TestIntTypes.py
+23-0lldb/test/API/lang/cpp/builtin_types/int/main.cpp
+3-0lldb/test/API/lang/cpp/builtin_types/int/Makefile
+69-03 files

LLVM/project 6ec6a77llvm/lib/Target/SPIRV SPIRVLegalizerInfo.cpp

[NFC][SPIR-V] Remove unused GR parameter from vector elt legalizers (#208495)
DeltaFile
+5-6llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
+5-61 files

LLVM/project 445d6c3clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp, clang/test/CodeGen/AArch64 v8.2a-fp16-intrinsics.c

[CIR][AArc64] Add lowering for fp16 intrinsics (sqrt + max + min) (#207786)

This PR adds lowering for the following intrinsic groups:
* https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#markdown-toc-square-root-1
* https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#maximum-1O
* https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#markdown-toc-minimum-1

It also moves the corresponding tests from:

* clang/test/CodeGen/AArch64/v8.2a-fp16-intrinsics.c

to:
* clang/test/CodeGen/AArch64/neon/fullfp16.c

The lowering follows the existing implementation in
CodeGen/TargetBuiltins/ARM.cpp.
DeltaFile
+60-1clang/test/CodeGen/AArch64/neon/fullfp16.c
+20-21clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+0-35clang/test/CodeGen/AArch64/v8.2a-fp16-intrinsics.c
+80-573 files

LLVM/project 380c581offload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include OffloadError.h PluginInterface.h

[Offload] Fix warn-unused function (#208642)

Unblock the `-Werror` build in pre-merge by adding a few
[[maybe_unused]] here and there.
DeltaFile
+2-2offload/plugins-nextgen/common/include/OffloadError.h
+2-2offload/plugins-nextgen/amdgpu/src/rtl.cpp
+2-1offload/plugins-nextgen/host/src/rtl.cpp
+2-1offload/plugins-nextgen/common/include/PluginInterface.h
+8-64 files

LLVM/project 09fbfb5llvm/lib/Transforms/Vectorize VPlan.cpp LoopVectorizationPlanner.h

[VPlan] Remove FoldTail argument for createConsecutiveVecPtr (NFC). (#208550)

The argument is no longer needed now that we can look up the information
directly from VPlan.
DeltaFile
+4-4llvm/lib/Transforms/Vectorize/VPlan.cpp
+1-2llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+1-2llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+6-83 files

LLVM/project 4516eb3clang/test/AST/HLSL Texture2D-AST.hlsl, clang/test/CodeGenHLSL/resources Texture2D-Load.hlsl Texture2DArray-GetDimensions.hlsl

[HLSL] Implement RWTexture2D (#208267)

Add HLSL front-end support for RWTexture2D and related test cases.

Where appropriate test cases have been parameterized across the
Texture2D types (and redundant Texture2DArray tests removed).

Assisted by Cursor

Fixes: #194742

---------

Co-authored-by: Tim Corringham <tcorring at amd.com>
DeltaFile
+112-103clang/test/CodeGenHLSL/resources/Texture2D-Load.hlsl
+178-0clang/test/AST/HLSL/Texture2D-AST.hlsl
+0-103clang/test/CodeGenHLSL/resources/Texture2DArray-GetDimensions.hlsl
+46-37clang/test/CodeGenHLSL/resources/Texture2D-GetDimensions.hlsl
+58-0clang/test/SemaHLSL/Resources/Texture2D-Load-errors.hlsl
+0-44clang/test/SemaHLSL/Texture2DArray-Load-errors.hlsl
+394-2875 files not shown
+489-33211 files

LLVM/project a1409edclang/docs UsersManual.md, llvm/docs LangRef.rst LangRef.md

Merge branch 'main' into users/jmmartinez/fix_illegal_Trunc
DeltaFile
+20,241-21,265llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+0-33,206llvm/docs/LangRef.rst
+30,305-0llvm/docs/LangRef.md
+8,882-7,730llvm/test/MC/AMDGPU/gfx12_asm_vopc.s
+5,013-5,520llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+6,460-0clang/docs/UsersManual.md
+70,901-67,7213,661 files not shown
+222,093-158,9163,667 files

LLVM/project e27fa2cclang/lib/Driver/ToolChains FreeBSD.cpp, clang/test/Driver freebsd-pie.c freebsd-mips-as-pie.c

[Clang] Switch to Default PIE on FreeBSD

We have started to compile the binary in our base as PIE by defualt. It
makes sense to compile the binary to PIE by default in toolchain as
Linux now. Also, extended testcases to support default PIE and no-pie
parameter in freebsd-pie.c, freebsd-mips-as-pie.c and hip-fpie-option-freebsd.hip.
DeltaFile
+275-0clang/test/Driver/freebsd-pie.c
+94-0clang/test/Driver/freebsd-mips-as-pie.c
+38-0clang/test/Driver/hie-fpie-option-freebsd.hip
+16-16flang/test/Driver/linker-options.f90
+7-0clang/test/Driver/freebsd-default-pie.c
+3-4clang/lib/Driver/ToolChains/FreeBSD.cpp
+433-2011 files not shown
+453-2017 files

LLVM/project 977f4d6llvm/lib/Target/AMDGPU AMDGPURewriteOutArguments.cpp

[AMDGPU] Employ MemorySSA when rewriting out arguments (NFCI) (#207922)

While transitioning away from MemoryDependenceAnalysis, replace MDA
`getPointerDependencyFrom` query with a reverse traversal of the memory
accesses of the return basic block (MemoryDefs and MemoryUses), looking
for the must-aliasing store to the out argument. The existing behaviour
is meant to be preserved.
DeltaFile
+60-17llvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp
+60-171 files

LLVM/project 03aca1allvm/test/CodeGen/AMDGPU rewrite-out-arguments-2.ll

[AMDGPU] Introduce tests for PR207922 (NFC) (#208640)
DeltaFile
+349-0llvm/test/CodeGen/AMDGPU/rewrite-out-arguments-2.ll
+349-01 files

LLVM/project 2d5aa73clang-tools-extra/clang-tidy/readability TrivialSwitchCheck.cpp TrivialSwitchCheck.h, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Add IgnoreMacros option to readability-trivial-switch (#208622)

AI Usage: Assisted by Codex 5.6
Closes https://github.com/llvm/llvm-project/issues/208474
DeltaFile
+14-0clang-tools-extra/test/clang-tidy/checkers/readability/trivial-switch.cpp
+12-0clang-tools-extra/clang-tidy/readability/TrivialSwitchCheck.cpp
+8-0clang-tools-extra/docs/clang-tidy/checks/readability/trivial-switch.rst
+5-2clang-tools-extra/clang-tidy/readability/TrivialSwitchCheck.h
+5-0clang-tools-extra/docs/ReleaseNotes.rst
+44-25 files

LLVM/project 5b27878llvm/lib/Object COFFObjectFile.cpp, llvm/test/Object coff-invalid.test

COFF: Start error message with lowercase letter (#208636)

Follow style guideline for error messages.
DeltaFile
+1-1llvm/lib/Object/COFFObjectFile.cpp
+1-1llvm/test/Object/coff-invalid.test
+2-22 files

LLVM/project 3595454llvm/lib/MC ELFObjectWriter.cpp MachObjectWriter.cpp, llvm/test/MC/ELF size-expression-must-be-absolute.s

MC: Start some error messages with a lowercase (#208570)

Also add a missing test for one of them.
DeltaFile
+6-0llvm/test/MC/ELF/size-expression-must-be-absolute.s
+1-1llvm/lib/MC/ELFObjectWriter.cpp
+1-1llvm/lib/MC/MachObjectWriter.cpp
+1-1llvm/test/MC/X86/check-end-of-data-region.s
+9-34 files

LLVM/project 1cc5d2clldb/source/Plugins/SymbolFile/DWARF DWARFUnit.cpp, lldb/unittests/Expression DWARFExpressionTest.cpp

[lldb] Fix DW_OP_convert type handling (#208435)

This PR fixes  #208197

A nonzero DW_OP_convert operand must reference a DW_TAG_base_type DIE.
LLDB previously accepted any DIE that happened to carry base-type-like
size and encoding attributes. This patch rejects non-base-type DIEs
before using them as DW_OP_convert target types.

## Tests

Extended DWARFExpression.DW_OP_convert coverage to verify:

- non-DW_TAG_base_type DIEs are rejected as DW_OP_convert target types;
DeltaFile
+21-1lldb/unittests/Expression/DWARFExpressionTest.cpp
+3-0lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+24-12 files

LLVM/project 469f6bcllvm/lib/Target/AMDGPU SIISelLowering.cpp

Make truncate legal
DeltaFile
+4-3llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+4-31 files

LLVM/project 29b5243llvm/test/CodeGen/AMDGPU fract-match.ll annotate-kernel-features-hsa-call.ll

AMDGPU: Manually convert some tests to use subarches

Manually adjust some edge case tests that require content
changes or splitting to cleanly test different subarches.
This separates out the difficult cases before script driven
bulk migrations.
DeltaFile
+168-350llvm/test/CodeGen/AMDGPU/fract-match.ll
+69-143llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call.ll
+57-83llvm/test/CodeGen/AMDGPU/private-memory-atomics.ll
+134-0llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call-addrspacecast.ll
+57-57llvm/test/CodeGen/AMDGPU/hsa-note-no-func.ll
+29-40llvm/test/CodeGen/AMDGPU/default-fp-mode.ll
+514-67326 files not shown
+767-97032 files

LLVM/project b5a27b4llvm/test/CodeGen/AMDGPU target-cpu.ll

AMDGPU: Rewrite target-cpu test for new subarches (#206485)

The function subtargets should now be a valid subtarget for
the top-level subarch.
DeltaFile
+52-74llvm/test/CodeGen/AMDGPU/target-cpu.ll
+52-741 files

LLVM/project 9c4e4b1llvm/unittests/CodeGen AMDGPUMetadataTest.cpp, llvm/unittests/MC/AMDGPU DwarfRegMappings.cpp

AMDGPU: Migrate unittests to subarch triples (#206486)

Replace specifying a processor name with the triple
subarch.

The register-limit helpers in AMDGPUUnitTests.cpp that enumerate every
valid CPU via fillValidArchListAMDGCN still pass the CPU explicitly, as
does the MC Disassembler smoke test (its C disassembler API derives the
subtarget from the CPU, not the triple subarch).

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+6-6llvm/unittests/Target/AMDGPU/DwarfRegMappings.cpp
+6-6llvm/unittests/MC/AMDGPU/DwarfRegMappings.cpp
+3-3llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp
+2-2llvm/unittests/MI/LiveIntervalTest.cpp
+2-2llvm/unittests/MIR/MachineMetadata.cpp
+2-2llvm/unittests/Target/AMDGPU/AMDGPUUnitTests.cpp
+21-2110 files not shown
+33-3316 files

LLVM/project 4d49badflang/lib/Lower PFTBuilder.cpp, flang/test/Lower do_loop_unstructured.f90 do_loop_execute_region_wrap.f90

[flang][PFT-to-MLIR] Wrap unstructured Fortran constructs in scf.execute_region

Extend the PFT-to-MLIR (HLFIR/FIR) lowering so unstructured DO and IF
constructs are emitted inside scf.execute_region, hiding their multi-block
CFG behind a single op. OpenACC and OpenMP lowerings that reject
multi-block content (e.g. the "unstructured do loop in combined acc
construct" TODO in OpenACC.cpp) now see a structured op instead.

Flag: -mmlir --wrap-unstructured-constructs-in-execute-region (default on).

An evaluation is wrappable iff all of the following hold:

  * wrap flag on
  * eval is parser::DoConstruct or parser::IfConstruct
  * eval.isUnstructured
  * branchesAreInternal(eval) -- every controlSuccessor in the subtree
    targets a nested eval or the constructExit
  * !hasIncomingBranch(eval) -- no outside eval branches into the body
    (PFT's synthetic IfConstruct around `if(c) goto X` absorbs label

    [29 lines not shown]
DeltaFile
+234-2flang/lib/Lower/PFTBuilder.cpp
+103-102flang/test/Lower/OpenMP/unstructured.f90
+177-24flang/test/Lower/OpenACC/acc-unstructured.f90
+38-87flang/test/Lower/do_loop_unstructured.f90
+111-0flang/test/Lower/do_loop_execute_region_wrap.f90
+47-61flang/test/Lower/mixed_loops.f90
+710-27621 files not shown
+1,058-51727 files