Age | Commit message (Collapse) | Author | Files | Lines |
|
(#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.
|
|
Use empty()-style functions instead of exposing the size if we don't
need it.
|
|
This should execute also the MLIR SPIRV Target tests which require the
SPIRV-Tools validator
---------
Signed-off-by: Davide Grohmann <davide.grohmann@arm.com>
|
|
This removes the errno dep for the stub libdl functions, since there is
no need for it.
|
|
Only BTI and PAC properties were added previously.
Fixes https://github.com/llvm/llvm-project/issues/152427.
|
|
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)
|
|
getScopeRep already returns NestedNameSpecifier *.
|
|
|
|
data() alaready returns const char *.
|
|
pattern is already of const char *.
|
|
getActiveBits() already returns unsigned.
|
|
This patch teaches moveFromOldBuckets to take an iterator_range so
that it can use a range-based for loop.
|
|
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
|
|
Added initial check for potential fmad conversion in reductions and
operands vectorization.
|
|
This way all the tracking is self-contained in `TrackingOutputBuffer`
and we can test the `SuffixRange` properly.
|
|
`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.
|
|
This allows not having the END CRITICAL directive in certain situations.
Update semantic checks and symbol resolution.
|
|
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.
|
|
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.
|
|
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...
|
|
(#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
|
|
(#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
|
|
Inspired by #152478
|
|
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.
|
|
[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
|
|
Desc is only used once and we can get that information from the Block as
well.
|
|
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
|
|
intrinsics to be used in constexpr (#152435)
Fixed #152313
---------
Co-authored-by: Simon Pilgrim <llvm-dev@redking.me.uk>
|
|
Added by https://github.com/llvm/llvm-project/pull/150846.
Checks the size of a structure, which is only correct for 64-bit
systems.
|
|
Make it easier for us to add ABI versions.
Close #144332
|
|
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.
|
|
Auto-generate checks for
https://github.com/llvm/llvm-project/pull/151925. Also update some
naming to make more consistent with other tests.
|
|
(#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>
|
|
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
|
|
To avoid noise in PRs such as in #146383.
|
|
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.
|
|
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.
|
|
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.
|
|
... so we don't have to create Pointer instances when we don't need
them.
|
|
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.
|
|
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
...
```
|
|
(#152431)
|
|
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.
|
|
Fixes https://github.com/llvm/llvm-project/issues/152141
|
|
|
|
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.
|
|
Removing the unnecessary friend declarations from `<__tree>` also
removes the need for forward declaration headers for `map` and `set`,
which this patch also removes.
|
|
constexpr (#152340)
Matches SSE3 handling
|
|
constexpr (#152305)
|
|
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
|