LLVM/project af166f4llvm/test/CodeGen/LoongArch/lasx/ir-instruction fpext.ll, llvm/test/CodeGen/LoongArch/lsx/ir-instruction fpext.ll

[LoongArch][NFC] Pre-commit tests for vector fpext from vxf32 to vxf64 (#164740)
DeltaFile
+71-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/fpext.ll
+64-0llvm/test/CodeGen/LoongArch/lasx/ir-instruction/fpext.ll
+135-02 files

LLVM/project 1249cb6clang/test/ClangScanDeps p1689-mf-nested-dir.c, clang/tools/clang-scan-deps ClangScanDeps.cpp

[clang-scan-deps] Fixes an assertion in clang-scan-deps (#193619)

Please see ticket #191921 for detailed description of the issue and a reproducer.

clang-scan-deps crashes with an assertion failure if a compile_commands.json entry contains a depfile path (-MF) whose parent directory does not exist.

The fix is made so that clang-scan-deps tool create the directory if it doesn't exist and finish execution without failing.
DeltaFile
+30-7clang/tools/clang-scan-deps/ClangScanDeps.cpp
+34-0clang/test/ClangScanDeps/p1689-mf-nested-dir.c
+64-72 files

LLVM/project 61b0de5llvm/lib/Target/RISCV RISCVISelLowering.cpp

[RISCV] Remove codegen for vp_fneg, vp_fma. NFC (#193214)

Part of the work to remove trivial VP intrinsics from the RISC-V
backend, see
https://discourse.llvm.org/t/rfc-remove-codegen-support-for-trivial-vp-intrinsics-in-the-risc-v-backend/87999

We began expanding these nodes in #190589 since vp_fadd/vp_fmul/vp_fsub
could be combined into them. Now that these intrinsics are expanded too,
the lowering for these is dead and can be removed.
DeltaFile
+2-15llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+2-151 files

LLVM/project 67e1411llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/RISCV iv-select-cmp.ll

[VPlan] Fold lhs | (headermask && rhs) -> vp.merge rhs, true, lhs, evl (#193511)

This is a combine on mask vectors that can show up with EVL tail
folding.

Split off from #190196
DeltaFile
+8-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-2llvm/test/Transforms/LoopVectorize/RISCV/iv-select-cmp.ll
+9-22 files

LLVM/project e3ab368clang/lib/Driver/ToolChains Clang.cpp, clang/test/Driver basic-block-address-map.c

[X86][COFF] Enable basic-block-address-map emission (#191347)

Enable -fbasic-block-address-map fo X86 COFF.
Add COFF section creation for .llvm_bb_addr_map.
DeltaFile
+33-14llvm/lib/MC/MCObjectFileInfo.cpp
+28-8llvm/test/CodeGen/X86/basic-block-address-map-function-sections.ll
+9-4llvm/test/CodeGen/X86/basic-block-address-map.ll
+2-1clang/lib/Driver/ToolChains/Clang.cpp
+2-0clang/test/Driver/basic-block-address-map.c
+74-275 files

LLVM/project f4da38allvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/CodeGen/AMDGPU/NextUseAnalysis spill-vreg-many-lanes.mir acyclic-770bb.mir

Merge branch 'main' into users/ylzsx/precommit-fpext
DeltaFile
+158,755-173,230llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+275,101-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/spill-vreg-many-lanes.mir
+144,679-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/acyclic-770bb.mir
+50,477-50,088llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+92,827-0llvm/test/CodeGen/RISCV/rvv/clmulh-sdnode.ll
+42,349-42,348llvm/test/MC/AMDGPU/gfx8_asm_vop3.s
+764,188-265,66645,091 files not shown
+6,916,728-3,318,75945,097 files

LLVM/project 6e2f5e9clang/docs ReleaseNotes.rst, clang/include/clang/Basic DiagnosticSemaKinds.td

[OpenCL] Diagnose error for zero-length array (#193163)

OpenCL C is based on C99 and C11, which don't support zero-length array.

Update clang/docs/ReleaseNotes.rst for potential breaking change.
DeltaFile
+12-12clang/test/Misc/languageOptsOpenCL.cl
+14-0clang/test/SemaOpenCL/zero-length-array.cl
+6-0clang/docs/ReleaseNotes.rst
+6-0clang/lib/Sema/SemaType.cpp
+1-1clang/include/clang/Basic/DiagnosticSemaKinds.td
+39-135 files

LLVM/project 528e673clang/lib/CodeGen CGCall.cpp, clang/test/CodeGenHIP sret-lifetime-markers.cpp

[Clang][CodeGen] Fix sret lifetime marker AS mismatch after #186275 (#193850)

After #186275, the sret address space can differ from the alloca address
space (e.g., AS 0 vs AS 5 on AMDGPU). In CGCall.cpp EmitCall(), when a
discarded-value sret temporary is created, SRetPtr is allocated in the
alloca AS and a lifetime.start is emitted. The pointer is then
addrspacecast'd to match the sret AS, but the CallLifetimeEnd cleanup
was using the addrspacecast'd pointer, triggering an assertion in
EmitLifetimeEnd ("Pointer should be in alloca address space").

Saves the original alloca pointer before the addrspacecast and uses it
for the lifetime-end cleanup.

Fixes buildbot failure: hip-third-party-libs-tests
DeltaFile
+60-0clang/test/CodeGenHIP/sret-lifetime-markers.cpp
+10-2clang/lib/CodeGen/CGCall.cpp
+70-22 files

LLVM/project 969247clibclc CMakeLists.txt, libclc/test CMakeLists.txt

[libclc] Allow testing unresolved symbols on multiple libraries (#193647)

Our downstream generates multiple libraries for a single target. This
change allows testing multiple libraries.
DeltaFile
+19-18libclc/test/CMakeLists.txt
+2-0libclc/CMakeLists.txt
+21-182 files

LLVM/project f319238libclc/cmake/modules CMakeDetermineCLCCompiler.cmake

[libclc][CMake] Remove CMAKE_C_COMPILER_ID check (#186717)

When LLVM_TARGETS_TO_BUILD does not contain the host target, runtime
build can not identify a compatible target triple for the host compiler.
CMAKE_C_COMPILER is set to clang, and CMAKE_C_COMPILER_ID is empty
although the compiler is functional.

Remove CMAKE_C_COMPILER_ID check. CMakeTestCLCCompiler.cmake already
provides a real functional guard.

This change ensures valid configurations can proceed, e.g.:
LLVM_TARGETS_TO_BUILD=AMDGPU;
RUNTIMES_amdgcn-amd-amdhsa-llvm_LLVM_ENABLE_RUNTIMES=libclc;
LLVM_RUNTIME_TARGETS="amdgcn-amd-amdhsa-llvm".

Note CMAKE_C_COMPILER_WORKS is always true after `project(Runtimes C CXX
ASM)` in runtimes/CMakeLists.txt.
DeltaFile
+0-5libclc/cmake/modules/CMakeDetermineCLCCompiler.cmake
+0-51 files

LLVM/project a95a1c4llvm/lib/Analysis LazyValueInfo.cpp, llvm/test/Transforms/CorrelatedValuePropagation vectors.ll

[LazyValueInfo] Support vector types in ICmp condition handling (#192900)

Use m_APInt matcher instead of ConstantInt dyn_cast so splat vector
constants are handled, and relax the integer type check to accept
integer vector types.

Fixes https://github.com/llvm/llvm-project/issues/192094
DeltaFile
+27-0llvm/test/Transforms/CorrelatedValuePropagation/vectors.ll
+3-3llvm/lib/Analysis/LazyValueInfo.cpp
+30-32 files

LLVM/project 7f3edbellvm/lib/Transforms/Vectorize LoopVectorizationPlanner.cpp

[LV] moved call site to new location in VFSelectionContext::computeFeasibleMaxVF after a recent change
DeltaFile
+7-0llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.cpp
+7-01 files

LLVM/project c6b9984clang/include/clang/Sema Sema.h

[NFC][Clang][Sema] Apply rule of three to Sema helper classes (#193835)

Static analysis flagged these classes. They declared a destructor but
not copy constructor or copy assignment. Since these classes don't need
them, this change declares them deleted.
DeltaFile
+5-0clang/include/clang/Sema/Sema.h
+5-01 files

LLVM/project a9fb479clang/test/SemaCXX source_location.cpp

[clang] NFC: Add test case for #178324 and mark it as fixed (#190490)

Issue #178324 was actually fixed by #187755

We lost the "declaration does not declare anything" warning since the
regression was introduced, but that was because:
1) Since #78436 we treat __builtin_FUNCSIG in a dependent context
effectivelly as if it contained a template parameter.
2) Our decltype implementation treats eexpressions containing template
parameters as if they were completely opaque (but alas this goes against
the spec, which says in [temp.type]p4 this should be looking only at
type dependence).
3) Since the decltype is opaque, we don't know what lookup will find, so
we can't issue the warning because we don't know if we are going to end
up with a type or an expression.

Fixes #178324
DeltaFile
+10-0clang/test/SemaCXX/source_location.cpp
+10-01 files

LLVM/project f131d16clang/docs ReleaseNotes.rst, clang/lib/AST Expr.cpp

[clang] fix error: cannot compile this l-value expression yet (#187755)
DeltaFile
+17-0clang/test/CodeGenCXX/builtin_FUNCTION.cpp
+1-1clang/lib/AST/Expr.cpp
+1-0clang/docs/ReleaseNotes.rst
+19-13 files

LLVM/project deb238ellvm/utils/gn/secondary/llvm/unittests/MC BUILD.gn

[gn build] Port 3081d52d8242 (#193862)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/MC/BUILD.gn
+1-01 files

LLVM/project 2611f15llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysisFramework/Analyses BUILD.gn

[gn build] Port a4538a3ad902 (#193863)
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysisFramework/Analyses/BUILD.gn
+1-01 files

LLVM/project 9b7b83bllvm/utils/gn/secondary/libcxx/src BUILD.gn

[gn build] Port d137e6601f1c (#193864)
DeltaFile
+0-1llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+0-11 files

LLVM/project 07b7077llvm/utils/gn/secondary/libcxx/include BUILD.gn, llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize BUILD.gn

Merge branch 'main' into users/mcberg2021/explict_LMUL
DeltaFile
+1-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn
+2-02 files

LLVM/project 40399c5llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/CodeGen/RISCV/rvv fixed-vectors-fp-setcc.ll fixed-vectors-setcc-fp-vp.ll

Merge branch 'main' into users/mcberg2021/explict_LMUL
DeltaFile
+4,811-4,818llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+326-4,626llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-setcc.ll
+1,872-1,883llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+565-2,727llvm/test/CodeGen/RISCV/rvv/fixed-vectors-setcc-fp-vp.ll
+1,117-1,613llvm/test/CodeGen/RISCV/rvv/setcc-fp-vp.ll
+764-1,425llvm/test/CodeGen/RISCV/rvv/vfadd-vp.ll
+9,455-17,0922,613 files not shown
+109,777-66,5812,619 files

LLVM/project 0cd635cllvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize BUILD.gn

[gn build] Port d64dd5a2afea (#193865)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn
+1-01 files

LLVM/project 4f877e4llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 2039a51881bb (#193861)
DeltaFile
+1-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-01 files

LLVM/project 6b4cdb0llvm/utils/gn/secondary/lldb/test BUILD.gn

Revert "[gn] port 40fcd2517a110 (#193293)" (#193860)

This reverts commit dd5632f51d3f36d08b125193c067a813aac26823.

40fcd2517a110 was reverted in 39865a002e6b51.
DeltaFile
+0-1llvm/utils/gn/secondary/lldb/test/BUILD.gn
+0-11 files

LLVM/project 2a74f30clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenCoroutine.cpp

[CIR] Add coroutine cleanup handling and update co_return semantics (#189281)

This PR adds cleanup handling for coroutine frame destruction. The
cleanup is emitted as a conditional that checks the result of the
`coro.free` builtin, which is used to determine whether the coroutine
frame was heap-allocated, if the returned pointer is null, no
destruction is performed. Additionally, this PR changes how co_return is
represented: previously, it was lowered directly into a branch to the
block containing the final suspend logic, but now a new `cir.coro.body`
operation is introduced to represent the user-written coroutine body.
Inside this region, `cir.co_return` operations mark exits from the
coroutine body and represent structured control flow that transfers
execution to the final suspend point. The lowering of this structured
control flow into explicit branches is deferred to a future PR in the
FlattenCFG pass.
DeltaFile
+421-184clang/test/CIR/CodeGen/coro-task.cpp
+125-18clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
+67-3clang/include/clang/CIR/Dialect/IR/CIROps.td
+52-1clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+21-0clang/test/CIR/IR/invalid-coro-body.cir
+21-0clang/test/CIR/IR/co-return.cir
+707-2069 files not shown
+757-22415 files

LLVM/project 0bdcf4eclang/include/clang/Driver ModulesDriver.h, clang/lib/Driver ModulesDriver.cpp

Revert "Reapply "[clang][modules-driver] Add support for C++ named modules and `import std`" (#193857)

Reverts llvm/llvm-project#193815 due to a test failure
(`clang/test/Driver/modules-driver-import-std.cpp`) on some systems.
DeltaFile
+0-111clang/test/Driver/modules-driver-both-modules-types.cpp
+11-89clang/lib/Driver/ModulesDriver.cpp
+0-88clang/test/Driver/modules-driver-cxx-modules-only.cpp
+0-60clang/test/Driver/modules-driver-import-std.cpp
+0-10clang/test/Driver/modules-driver-incompatible-options.cpp
+0-4clang/include/clang/Driver/ModulesDriver.h
+11-3622 files not shown
+11-3668 files

LLVM/project 20fd94cllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer loads-with-large-distance.ll

[SLP] Fix a very long loads offset, being stored in DenseMap

Added a check for a very long offset to avoid a crash in the compiler

Fixes #181682

(cherry picked from commit 7ec7907b80f8137f06bfb84b47f4a9b4805402ba)
DeltaFile
+21-0llvm/test/Transforms/SLPVectorizer/loads-with-large-distance.ll
+4-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+25-02 files

LLVM/project 0d1bf3aclang/utils/TableGen HLSLEmitter.cpp

[HLSL][NFC] Refactor worklist loop in HLSLEmitter.cpp to use index-based iteration (#193638)

As suggested by @shafik, the worklist loop in HLSLEmitter.cpp would be
more readable as an index-based for-loop as opposed to a range-based
for-loop. This PR changes the range-based for-loop over worklist items
into an index-based for-loop.
DeltaFile
+3-3clang/utils/TableGen/HLSLEmitter.cpp
+3-31 files

LLVM/project 3174c94flang/lib/Optimizer/Dialect FIROps.cpp CMakeLists.txt, flang/test/Fir array-coor-canonicalization-cuf.fir

Revert "[flang][cuda] Preserve fir.rebox captured by cuf.kernel in SimplifyArrayCoorOp" (#193855)

Reverts llvm/llvm-project#193837
DeltaFile
+0-67flang/test/Fir/array-coor-canonicalization-cuf.fir
+0-10flang/lib/Optimizer/Dialect/FIROps.cpp
+0-1flang/lib/Optimizer/Dialect/CMakeLists.txt
+0-783 files

LLVM/project 9473873clang/include/clang/Driver ModulesDriver.h, clang/lib/Driver ModulesDriver.cpp

Reapply "[clang][modules-driver] Add support for C++ named modules and `import std`" (#193815)

This reverts #193677 and relands #193312.

This adds basic support for explicit C++ named module builds, managed
natively by the Clang driver, including support for use of the Standard
library modules. This follows #187606, which adds the same for Clang
modules.

Current limitations:
- Standard library modules are still compiled to object files instead of
using the provided shared library. (This will be addressed in a
follow-up soon.)
- Caching is not supported yet (but likely to be added during the
upcoming GSoC cycle).
- Importing C++ standard library modules into Clang modules is not
supported (and not expected in the near term).

RFC:

https://discourse.llvm.org/t/rfc-modules-support-simple-c-20-modules-use-from-the-clang-driver-without-a-build-system
DeltaFile
+111-0clang/test/Driver/modules-driver-both-modules-types.cpp
+89-11clang/lib/Driver/ModulesDriver.cpp
+88-0clang/test/Driver/modules-driver-cxx-modules-only.cpp
+60-0clang/test/Driver/modules-driver-import-std.cpp
+10-0clang/test/Driver/modules-driver-incompatible-options.cpp
+4-0clang/include/clang/Driver/ModulesDriver.h
+362-112 files not shown
+366-118 files

LLVM/project 689dc6cclang/lib/CIR/CodeGen CIRGenExpr.cpp, clang/test/CIR/CodeGen array.cpp vla.c

[CIR] Handle boolean expression as array indexes (#193814)

We were hitting a CIR verification error in some cases when a boolean
expression was used as an index to an array because the GetElementOp
verifier expected the index operand to be a fundamental integer type. To
fix this, I'm updating the emitArraySubscriptExpr to cast index values
to ptrDiffTy, which more closely matches what classic codegen does in
the corrsponding code.

The improved alignment with the classic codegen implementation caused
some minor changes in generated IR that required some tests to be
updated.

Assisted-by: Cursor / claude-4.7-opus-high
DeltaFile
+117-20clang/test/CIR/CodeGen/array.cpp
+21-6clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+11-9clang/test/CIR/CodeGen/vla.c
+8-4clang/test/CIR/CodeGen/array-init-loop-exprs.cpp
+6-6clang/test/CIR/CodeGen/pointers.cpp
+5-4clang/test/CIR/CodeGen/no-odr-use.cpp
+168-498 files not shown
+187-6314 files