aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-08-07[mlir][vector] Use `llvm::Align` when constructing vector load and stores. ↵Erick Ochoa Lopez2-6/+7
(#152207) This patchset uses `llvm::Align` when constructing `vector.{load,store}` operations. The use of `llvm::Align` allows us to specify the unit of alignment and strongly type alignment as opposed to having just unsigned integers.
2025-08-07[clang][bytecode][NFC] Refactor DynamicAllocator a bit (#152510)Timm Baeder3-9/+9
Use empty()-style functions instead of exposing the size if we don't need it.
2025-08-07[mlir][spirv] Add mlir-spirv-tests CI to run for mlir-spv target tests (#152124)Davide Grohmann1-0/+32
This should execute also the MLIR SPIRV Target tests which require the SPIRV-Tools validator --------- Signed-off-by: Davide Grohmann <davide.grohmann@arm.com>
2025-08-07[libc][dlfcn] Remove unused errno dep (#152222)Caslyn Tonelli1-5/+0
This removes the errno dep for the stub libdl functions, since there is no need for it.
2025-08-07[compiler-rt][AArch64] Add GCS property in assembly files (#152502)Csanád Hajdú8-14/+22
Only BTI and PAC properties were added previously. Fixes https://github.com/llvm/llvm-project/issues/152427.
2025-08-07 Reland "[RISCV] Refactor X60 scheduling model helper classes. NFC." (#152336)Mikhail R. Gadelha1-70/+93
This PR fixes the issue that caused an ub in PR #151472. The issue was a shl call taking a negative shift amount (posDiff). The result was never used, but tablegen would perform the calculation anyway. The fix was to replace the shl call with just multiplications with constants. Original PR description: This patch improves the helper classes in the SpacemiT-X60 vector scheduling model and will be used in follow-up PRs: There are now two functions to map LMUL to values: * ConstValueUntilLMULThenDoubleBase: returns BaseValue for LMUL values before startLMUL, Value for startLMUL, then doubles Value for each subsequent LMUL. Useful for cases where fractional LMULs have constant cycles, and integer LMULs double as they increase. * GetLMULValue: takes an ordered list of LMUL cycles and LMUL and returns the corresponding cycle. Useful for cases we can't easily cover with ConstValueUntilLMULThenDoubleBase. This PR also adds some useful simplified versions of ConstValueUntilLMULThenDoubleBase, e.g.: ConstValueUntilLMULThenDouble (when BaseValue == Value), or ConstOneUntilMF4ThenDouble (when cycles start to double after MF2)
2025-08-07[Sema] Remove an unnecessary cast (NFC) (#152440)Kazu Hirata1-1/+1
getScopeRep already returns NestedNameSpecifier *.
2025-08-07[llvm] Proofread MergeFunctions.rst (#152444)Kazu Hirata1-19/+19
2025-08-07[llvm-objdump] Remove unnecessary casts (NFC) (#152443)Kazu Hirata1-8/+8
data() alaready returns const char *.
2025-08-07[Support] Remove an unnecessary cast (NFC) (#152442)Kazu Hirata1-1/+1
pattern is already of const char *.
2025-08-07[CodeGen] Remove an unnecessary cast (NFC) (#152441)Kazu Hirata1-1/+1
getActiveBits() already returns unsigned.
2025-08-07[ADT] Use a range-based for loop in DenseMap.h (NFC) (#152438)Kazu Hirata1-13/+16
This patch teaches moveFromOldBuckets to take an iterator_range so that it can use a range-based for loop.
2025-08-07[mlir][cmake] Fix MLIR shared library installation (#152195)Boyana Norris1-20/+24
When `LLVM_INSTALL_TOOLCHAIN_ONLY=ON`, the MLIR shared library (`libMLIR*`) is not installed even though it is built with the `INSTALL_WITH_TOOLCHAIN` argument to the `add_mlir_library` cmake function. This patch ensures that `libMLIR*` is installed when `LLVM_INSTALL_TOOLCHAIN_ONLY=ON`. Patch verified [here](https://github.com/llvm/llvm-project/issues/151247#issuecomment-3156387055). fixes #151247
2025-08-07[SLP]Initial FMAD support (#149102)Alexey Bataev13-292/+840
Added initial check for potential fmad conversion in reductions and operands vectorization.
2025-08-07[lldb][Mangled] Move SuffixRange computation into TrackingOutputBuffer (#152483)Michael Buch5-20/+31
This way all the tracking is self-contained in `TrackingOutputBuffer` and we can test the `SuffixRange` properly.
2025-08-07[NFC][Offload] Move conformance test warning outside of function (#152466)Ross Brunton2-5/+5
`add_conformance_test` checks for libc and prints a warning if it is not found. However, this warning ends up being printed once for each test, spamming the cmake log. Moving it up to the folder cmake allows it to be reported only once.
2025-08-07[flang][OpenMP] Make OpenMPCriticalConstruct follow block structure (#152007)Krzysztof Parzyszek16-133/+154
This allows not having the END CRITICAL directive in certain situations. Update semantic checks and symbol resolution.
2025-08-07[CI] Add --succinct to lit args (#152335)Aiden Grossman2-2/+2
We currently log every single test that we run in premerge. This leads to gigantic logs (200k+ lines on Linux) that can be difficult to parse through. Having an indicator of progress is nice, especially for the LLVM tests, but is not strictly necessary and not often used (I imagine). Having a progress indicator from lit that works in CI cases is on my TODO list. For the rare cases where someone does need to see the list of tests that run, the JUnit XML emitted by lit is available in the artifacts.
2025-08-07[clang][x86] Add C/C++ and 32/64-bit test coverage to constexpr tests (#152478)Pedro Lobo4-119/+130
Adds missing C++ run lines to test files containing `constexpr` tests. Also adds missing 32/64-bit test coverage to the following tests: - `clang/test/CodeGen/X86/avx512-reduceIntrin.c` - `clang/test/CodeGen/X86/avx512-reduceMinMaxIntrin.c` - `clang/test/CodeGen/X86/avx512vpopcntdq-builtins.c` - `clang/test/CodeGen/X86/avx512vpopcntdqvl-builtins.c` Additionally, fixes a `_mm512_popcnt_epi64` `constexpr` test that incorrectly assumed 32-bit integers, leading to incorrect bit counts. This change updates the test result to assume 64-bit integers.
2025-08-07[TypeSanitizer] Use alloca size for lifetime markers (#152154)Nikita Popov2-5/+66
Split out from https://github.com/llvm/llvm-project/pull/150248: Use the size of the alloca instead of the size passed to the lifetime intrinsic. As a bonus, this handles dynamic allocas correctly (see the added test) instead of doing a memset with size -1...
2025-08-07[flang-rt] Use correct flang-rt build for flang-rt unit tests on Windows ↵David Truby2-17/+23
(#152318) Currrently flang-rt assumes that LLVM was always built with the dynamic MSVC runtime. This may not be the case, if the user has specified a different runtime with -DCMAKE_MSVC_RUNTIME_LIBRARY. Since this flag is implied by -DLLVM_ENABLE_RPMALLOC=On, which is used by the Windows release script, this is causing that script to fail. Fixes #151920
2025-08-07[mlir][linalg] Morphism across linalg -- named, category and generic ops. ↵Javed Absar8-0/+290
(#148424) Adds `linalg-morph-ops` pass to convert an op from one representation to another: named-op <--> category_op (elementwise, contraction, ..) <--> generic e.g. ```mlir %exp = linalg.exp ins(%A : tensor<16x8xf32>) outs(%B : tensor<16x8xf32>) -> tensor<16x8xf32> ``` After `mlir-opt -linalg-morph-ops=named-to-category ..` ```mlir %0 = linalg.elementwise kind=#linalg.elementwise_kind<exp> ins(%arg0 : tensor<16x8xf32> .. Note: this is generalization of `--linalg-generalize-named-ops` is the path `named-op --> generic-op` `--linalg-specialize-generic-ops` is the path `named-op <-- generic-op` email: quic_mabsar@quicinc.com
2025-08-07[X86] avx512dq-builtins.c - add C/C++ and 32/64-bit test coverageSimon Pilgrim1-227/+230
Inspired by #152478
2025-08-07Reland [VectorUtils] Trivially vectorize ldexp, [l]lround (#152476)Ramkumar Ramachandra5-0/+813
Changes: The original patch, landed as 1336675, was reverted due to a bug in LoopVectorize resulting in a crash. The bug has now been fixed by 95c32bf ([VPlan] Return invalid cost if any skeleton block has invalid costs), and this reland is identical to the original patch.
2025-08-07[NVPTX] Add prefetch tensormap variant (#146203)Abhilash Majumder7-28/+197
[NVPTX] Add Prefetch tensormap intrinsics This PR adds prefetch intrinsics with the relevant tensormap_space. * Lit tests are added as part of prefetch.ll * The generated PTX is verified with a 12.3 ptxas executable. * Added docs for these intrinsics in NVPTXUsage.rst. For more information, refer to the PTX ISA for prefetch intrinsic : [Prefetch Tensormap](https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-prefetch-prefetchu) @durga4github @schwarzschild-radius
2025-08-07[clang][bytecode][NFC] Remove unnecessary local variable (#152468)Timm Baeder1-4/+1
Desc is only used once and we can get that information from the Block as well.
2025-08-07[Support] Enable CRTP for GraphWriter (NFC) (#152322)Naveen Seth Hanig1-18/+31
Previously, specializing the GraphWriter class required a full class specialization. This change introduces CRTP for GraphWriter, allowing for partial specialization. This change is in support of printing the module dependency graph as part of the RFC for driver-managed module builds, for which we want to print the graph nodes in a more human-readable format by: - Printing descriptive IDs instead of pointer addresses as node labels. - Printing the full node labels separately from the node relations to avoid clutter. With this approach, only GraphWriter::writeNodes() needs to be specialized (, aside from DOTGraphTraits). RFC for driver-managed module builds: https://discourse.llvm.org/t/rfc-modules-support-simple-c-20-modules-use-from-the-clang-driver-without-a-build-system
2025-08-07[Headers][X86] Update AVX/AVX512 float/double add/sub/mul/div/unpck ↵Yi-Chi Lee4-75/+72
intrinsics to be used in constexpr (#152435) Fixed #152313 --------- Co-authored-by: Simon Pilgrim <llvm-dev@redking.me.uk>
2025-08-07[llvm][MC][test] Disable many-instructons.s on 32-bit systemsDavid Spickett1-1/+2
Added by https://github.com/llvm/llvm-project/pull/150846. Checks the size of a structure, which is only correct for 64-bit systems.
2025-08-07[Clang][NFC] Enumerate Clang ABI versions in a separate header file (#151995)Yanzuo Liu3-153/+160
Make it easier for us to add ABI versions. Close #144332
2025-08-07[NFC][analyzer] Conversion to CheckerFamily: RetainCountChecker (#152138)Donát Nagy4-165/+105
This commit converts RetainCountChecker to the new checker family framework that was introduced in the commit 6833076a5d9f5719539a24e900037da5a3979289 This commit also performs some minor cleanup around the parts that had to be changed, but lots of technical debt still remains in this old codebase.
2025-08-07[LV] Auto-generate checks for sve-low-trip-count.ll.Florian Hahn1-53/+72
Auto-generate checks for https://github.com/llvm/llvm-project/pull/151925. Also update some naming to make more consistent with other tests.
2025-08-07[Headers][X86] Allow AVX512 reduction intrinsics to be used in constexpr ↵Pedro Lobo3-16/+38
(#152363) Closes #152324. Part of #30794. This PR adds `constexpr` support for the following AVX512 integer reduction intrinsics: - `_mm512_reduce_add_epi32` - `_mm512_reduce_add_epi64` - `_mm512_reduce_mul_epi32` - `_mm512_reduce_mul_epi64` - `_mm512_reduce_and_epi32` - `_mm512_reduce_and_epi64` - `_mm512_reduce_or_epi32` - `_mm512_reduce_or_epi64` - `_mm512_reduce_max_epi32` - `_mm512_reduce_max_epi64` - `_mm512_reduce_min_epi32` - `_mm512_reduce_min_epi64` - `_mm512_reduce_max_epu32` - `_mm512_reduce_max_epu64` - `_mm512_reduce_min_epu32` - `_mm512_reduce_min_epu64` --------- Co-authored-by: Simon Pilgrim <llvm-dev@redking.me.uk>
2025-08-07[VPlan] Return invalid cost if any skeleton block has invalid costs. (#151940)Florian Hahn2-34/+20
We need to reject plans that contain recipes with invalid costs. LICM can move recipes with invalid costs out of the loop region, which then get missed by the main cost computation. Extend the logic to check recipes for invalid cost currently only covering the middle block to include all skeleton blocks. Fixes https://github.com/llvm/llvm-project/issues/144358 Fixes https://github.com/llvm/llvm-project/issues/151664 PR: https://github.com/llvm/llvm-project/pull/151940
2025-08-07[DA][NFC] clang-format DependenceAnalysis (#151505)Michael Kruse2-1236/+1041
To avoid noise in PRs such as in #146383.
2025-08-07[AArch64] Allow splitting bitmasks for EOR/ORR. (#150394)Ricardo Jesus2-7/+229
This patch extends #149095 for EOR and ORR. It uses a simple partition scheme to try to find two suitable disjoint bitmasks that can be used with EOR/ORR to reconstruct the original mask. Fixes: #148987.
2025-08-07[AVR] Fix codegen after getConstant assertions got enabled (#152269)Ayke2-2/+20
This fixes https://github.com/llvm/llvm-project/issues/152097 This commit fixes two instances of a (somewhat) recently enabled assertion. One with a test, the other I can't reproduce (might be dead code) but certainly looks like an instance of the same problem. The PR that introduced the regression: https://github.com/llvm/llvm-project/pull/117558 With this patch, the AVR backend is usable again for TinyGo.
2025-08-07[llvm][cmake] Remove version number from runtimes in PROJECTS warnings (#152457)David Spickett1-5/+6
Judging from the reaction to https://github.com/llvm/llvm-project/pull/152302, we are not ready to make this a fatal error. Remove the specific version number, and update the libc message to match the others' wording.
2025-08-07[clang][bytecode] Refactor Check* functions (#152300)Timm Baeder7-82/+123
... so we don't have to create Pointer instances when we don't need them.
2025-08-07[Offload] Don't create events for empty queues (#152304)Ross Brunton6-4/+62
Add a device function to check if a device queue is empty. If liboffload tries to create an event for an empty queue, we create an "empty" event that is already complete. This allows `olCreateEvent`, `olSyncEvent` and `olWaitEvent` to run quickly for empty queues.
2025-08-07[AArch64][SVE] Use FeatureUseFixedOverScalableIfEqualCost for A320 (#152156)Ties Stuij2-5/+76
With this new A320 in-order core, we follow adding the FeatureUseFixedOverScalableIfEqualCost feature to A510 and A520 (#132246), which reaps the same code generation benefits of preferring fixed over scalable when the cost is equal. So when we have: ``` void foo(float* a, float* b, float* dst, unsigned n) { for (unsigned i = 0; i < n; ++i) dst[i] = a[i] + b[i]; } ``` When compiling without the feature enabled, we get: ``` ... ld1b { z0.b }, p0/z, [x0, x10] ld1b { z2.b }, p0/z, [x1, x10] add x12, x0, x10 ldr z1, [x12, #1, mul vl] add x12, x1, x10 ldr z3, [x12, #1, mul vl] fadd z0.s, z2.s, z0.s add x12, x2, x10 fadd z1.s, z3.s, z1.s dech x11 st1b { z0.b }, p0, [x2, x10] incb x10, all, mul #2 str z1, [x12, #1, mul vl] ... ``` When compiling with, we get: ``` ... ldp q0, q1, [x12, #-16] ldp q2, q3, [x11, #-16] subs x13, x13, #8 fadd v0.4s, v2.4s, v0.4s fadd v1.4s, v3.4s, v1.4s add x11, x11, #32 add x12, x12, #32 stp q0, q1, [x10, #-16] add x10, x10, #32 ... ```
2025-08-07[libclc] Add missing clc/lib/ptx-nvidiacl/SOURCES to CMAKE_CONFIGURE_DEPENDS ↵Wenju He1-0/+1
(#152431)
2025-08-07[BOLT] Fix unit test failures with LLVM_LINK_LLVM_DYLIB=ON (#152190)Anatoly Trosinenko2-2/+5
When LLVM_LINK_LLVM_DYLIB is ON, `check-bolt` target reports unit test failures: BOLT-Unit :: Core/./CoreTests/failed_to_discover_tests_from_gtest BOLT-Unit :: Profile/./ProfileTests/failed_to_discover_tests_from_gtest The reason is that when llvm-lit runs a unit-test executable: /path/to/CoreTests --gtest_list_tests '--gtest_filter=-*DISABLED_*' an assertion is triggered with the following message: LLVM ERROR: Option 'default' already exists! This assertion triggers when the initializer of defaultListDAGScheduler defined at SelectionDAGISel.cpp:219 is called as a statically-linked function after already being called during the initialization of libLLVM. The issue can be traced down to LLVMTestingSupport library which depends on libLLVM as neither COMPONENT_LIB nor DISABLE_LLVM_LINK_LLVM_DYLIB is specified in a call to `add_llvm_library(LLVMTestingSupport ...)`. Specifying DISABLE_LLVM_LINK_LLVM_DYLIB for LLVMTestingSupport makes Clang unit test fail and COMPONENT_LIB is probably inappropriate for a testing-specific library, thus as a workaround, added Error.cpp source from LLVMTestingSupport directly to the list of source files of CoreTests target (as it depends on `llvm::detail::TakeError(llvm::Error)`) and removed LLVMTestingSupport from the list of dependencies of ProfileTests.
2025-08-07[DAG] canCreateUndefOrPoison - add FP_EXTEND (#152249)Chaitanya Koparkar3-62/+68
Fixes https://github.com/llvm/llvm-project/issues/152141
2025-08-07[gn build] Port 6897ca460e6eLLVM GN Syncbot1-2/+0
2025-08-07AMDGPU: Disable AGPR selection in mfma rewrite testMatt Arsenault1-130/+143
This makes the test actually test the intended rewrite pass. Also add some tests with inline immediates in src2. Switch the target to gfx942 for future test functions.
2025-08-07[libc++] Remove unnecessary friend declarations from <__tree> (#152133)Nikolas Klauser7-100/+14
Removing the unnecessary friend declarations from `<__tree>` also removes the need for forward declaration headers for `map` and `set`, which this patch also removes.
2025-08-07[Headers][X86] Allow AVX movddup/movsldup/movshdup intrinsics to be used in ↵Simon Pilgrim4-6/+12
constexpr (#152340) Matches SSE3 handling
2025-08-07[Headers][X86] Update SSE/AVX and/andnot/or/xor intrinsics to be used in ↵Simon Pilgrim10-40/+95
constexpr (#152305)
2025-08-07AMDGPU: Add a few missing mfma rewrite tests (#152434)Matt Arsenault2-67/+1501
Test other splitting situations that appear in greedy. This includes ensuring we have a case that hits a local split and instruction split (most of the tests hit the region split path). Also test a few cases where the final result isn't fully used, resulting in partial copy bundles instead of a simple full copy. Test physreg and virtreg agpr interference with a reassignment candidate. I'm accumulating too many failure cases, and MIR tests are very prone to painful merge conflicts, so I've added a few more tests and extracted new tests from #147975. Closes #149026