- Aug 22, 2023
-
-
Simon Pilgrim authored
[X86] Move gather/scatter index shl(x,c) -> index:x, scale:c fold into X86DAGToDAGISel::matchIndexRecursively
-
Kadir Cetinkaya authored
We seem to be hitting limits in some windows build bots, see https://github.com/clangd/clangd/issues/1712#issuecomment-1686478931. So bumping the timeouts to 60 seconds and completely dropping them for sync requests. As mentioned in the comment above, this should improve things, considering even the tests that don't touch any complicated scheduler is failing. Differential Revision: https://reviews.llvm.org/D158426
-
Guray Ozen authored
This work introduces a new Op, `wgmma.generate.descriptor`, designed to create a wgmma descriptor for inputs of matrix multiply and accumulate operations using `wgmma.mma_async` PTX instruction. The descriptor format specifications can be found in the following link: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#asynchronous-warpgroup-level-matrix-shared-memory-layout-matrix-descriptor It's important to note that this op is in its initial phase, and it does come with certain limitations. It only supports 128b swizzling and does not incorporate interleaving. In the future, different calculations will be addressed in separate works, expanding the capabilities of the op. Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D157382
-
zhijian authored
Summary: llvm-ar is symlinked as llvm-ranlib and will act as ranlib when invoked in that mode. llvm-ar since [[ https://github.ibm.com/compiler/llvm-project/commit/4f2cfbe5314b064625b2c87bde6ce5c8d04004c5 | compiler/llvm-project@4f2cfbe ]] supports the -X options, but doesn't seem to accept them when running as llvm-ranlib. In AIX OS , according to https://www.ibm.com/docs/en/aix/7.2?topic=r-ranlib-command -X mode Specifies the type of object file ranlib should examine. The mode must be one of the following: 32 Processes only 32-bit object files 64 Processes only 64-bit object files 32_64, any Processes both 32-bit and 64-bit object files The default is to process 32-bit object files (ignore 64-bit objects). The mode can also be set with the OBJECT_MODE environment variable. For example, OBJECT_MODE=64 causes ranlib to process any 64-bit objects and ignore 32-bit objects. The -X flag overrides the OBJECT_MODE variable. Reviewers: James Henderson, MaskRay, Stephen Peckham Differential Revision: https://reviews.llvm.org/D142660
-
David Green authored
This extends the existing legalization combine to fold G_BUILD_VECTOR where the sources are all from the same G_UNMERGE, to handle cases where some of the lanes are undef. This comes up in the legalization of <3 x ..> vectors in AArch64, where they are padded with undef. There are two choices for what to create. This patch just removes the G_BUILD_VECTOR/G_UNMERGE, losing the information about which lanes are undef. The alternative would be to generate an identity G_SHUFFLE_VECTOR with undef lanes marked as undef. I think both have advantages and disadvantages. Differential Revision: https://reviews.llvm.org/D158063
-
Nikita Popov authored
-
Alexey Bataev authored
If the masked gathers can be reordered, it may produce strided access pattern and the reordering does not affect common reodering, better to try to reorder masked gathers for better performance. Differential Revision: https://reviews.llvm.org/D157009
-
Simon Pilgrim authored
[X86] Add X86DAGToDAGISel::matchIndexRecursively helper to match/resolve address indices, scaling + displacement This currently just splits ADD/AddLike constant offset values, but we should be able to expand on this as part of handling the regressions noticed in D155472 without adding more duplicate zext/sext code inside matchAddressRecursively
-
Jolanta Jensen authored
This patch removes intrinsics that have no definitions in Intrinsics.td from mappings to vector functions in SLEEF library. It also removes mappings for non-scalar intrinsics. Differential Revision: https://reviews.llvm.org/D158089
-
Adrian Kuegel authored
Use .empty() instead of checking for size().
-
Andrzej Warzynski authored
This patch effectively enables the CastAwayElementwiseLeadingOneDim rewrite pattern for scalable vectors. To this end, `ExtractOp::inferReturnTypes` is updated so that scalable dimensions are correctly recognised. The change to ExtractOp will likely make also other conversion patterns valid for scalable vectors, but this patch focuses on just one case. Other conversion patterns will be enabled in the forthcoming patches. Depends on D157993 Differential Revision: https://reviews.llvm.org/D158335
-
Sergio Afonso authored
This patch explicitly marks supported clauses for OpenMP directives missing an implementation, so that compilation fails if they are specified, rather than silently ignoring them. Differential Revision: https://reviews.llvm.org/D158076
-
Nico Weber authored
-
Benjamin Kramer authored
-
Luke Lau authored
For the same reasons as D157973, remove the LMUL flag from the tests to simplify them and make the diffs in D157976 easier to read. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D158270
-
Luke Lau authored
We currently don't lower this to a vid because the addend doesn't fit into a vadd.vi immediate. An extra li here seems like a small cost to pay for a constant pool load. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D157975
-
Luke Lau authored
Some of these tests have multiple vid sequence build_vectors in them, and machine CSE tidies up their output. But now that small build_vectors are sometimes lowered to scalar `vmv.x.s`s, the output is harder to read with no CSE, e.g. see `buildvec_no_vid_v4i8`. This patch splits them up into separate functions to address this, and also makes the diff in D157976 more clear since it causes `vmv.x.s` to be lowered to more frequently. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D157974
-
Luke Lau authored
I'm not sure why the flag was added initially but I find the tests a bit easier to read with it off, and it matches the default behaviour. Reviewed By: craig.topper, reames Differential Revision: https://reviews.llvm.org/D157973
-
Keith Walker authored
When generating armv6-m (Thumb1) Position Independent (PI) code there are currently some code sequences that are not compatible with eXecute-Only (XO) code. For example, this simple code sequence when compiler for XO & PI: extern int x; int fn() { return x; } is a problem as the address of x is currently loaded by: ldr r0, .L0 : : .L0: .long x which is not XO compiant as this involves reading the value at .L0 which is in the code section. Generating correct code is currently hindered by lack of suitable relocations. Disallow the generation of armv6-m PI code together with XO code until they can be made to work together. Differential Revision: https://reviews.llvm.org/D157620 -
Sam McCall authored
-
Sam McCall authored
For applications like clangd, the preamble remains an important optimization when editing a module definition. The global module fragment is a good fit for it as it by definition contains only preprocessor directives. Before this patch, we would terminate the preamble immediately at the "module" keyword. Differential Revision: https://reviews.llvm.org/D158439
-
Andrzej Warzynski authored
This patch simply removes one of the pre-conditions of scalable vectorisation. Namely, that only the trailing vector dimension can be scalable, e.g. vector<2x4x[8]xi32> This limitation can be lifted following the recent work to support scalable vectorisation in Linalg, most notably: * https://reviews.llvm.org/D154336 * https://reviews.llvm.org/D153372 A test is added that demonstrates scalable vectorisation of `linalg.matmul`. This is simply a copy of a similar test for fixed-width vectorisation. The latter is updated - check lines are simplified and annotated with regex patterns. This in the spirit of [1]: Tests should be minimal, and only check what is absolutely necessary. Note that this change is just one step towards scalable vectorisation in Linalg. It will allow us to exercise new code paths in the context of scalable vectors in Linalg and hence make further progress in the forthcoming patches. [1] https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices Differential Revision: https://reviews.llvm.org/D158423
-
Luke Lau authored
When folding a vmerge into its operands, if the resulting VL is smaller than what the vmerge had originally then what was previously in its body then gets moved to the tail. In that case, we can't relax the tail policy to agnostic when the merge operand is undefined, since we need to preserve these elements past the new VL. Fixes https://github.com/llvm/llvm-project/issues/64754 Reviewed By: craig.topper, reames Differential Revision: https://reviews.llvm.org/D158161
-
Luke Lau authored
Reviewed By: reames Differential Revision: https://reviews.llvm.org/D158160
-
Tuan Chuong Goh authored
Recognise G_FSHR with constant shift amount as a legal instruction. Lowers G_FSHL with constant shift to G_FSHR. If shift amount is non-constant, generic lowering is applied to the instruction. Differential Revision: https://reviews.llvm.org/D155484
-
Andrzej Warzynski authored
This patch updates one specific hook in "VectorDropLeadUnitDim.cpp" to make sure that "scalable dims" are handled correctly. While this change affects multiple patterns, I am only adding one regression tests that captures one specific case that affects me right now. I am also adding Vector dialect to the list of dependencies of `-test-vector-to-vector-lowering`. Otherwise my test case won't work as a standalone test. Differential Revision: https://reviews.llvm.org/D157993
-
Alexandros Lamprineas authored
* Changes the default value of FuncSpecMaxIters from 1 to 10. This allows specialization of recursive functions. * Adds an option to control the maximum codesize growth per function. * Measured ~45% performance uplift for SPEC2017:548.exchange2_r on AWS Graviton3. Differential Revision: https://reviews.llvm.org/D145819
-
Nikita Popov authored
In degenerate cases, the backedge value can be folded to poison. Fixes https://github.com/llvm/llvm-project/issues/64891.
-
Nikita Popov authored
With opaque pointers, we no longer need to insert the bitcast.
-
Lorenzo Chelini authored
`tensor.unpack` implements the DPS (Destination Passing Style) interface and expects the result to be "stored" in the `outs` operand, but this is not the case with the current decomposition as the final operation is a `tensor.extract_slice` that does not implement DPS. Add a `linalg.copy` to fix the problem. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D158393
-
Nikita Popov authored
As part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179, this removes support for and and or constant expressions. Places creating such expressions have been migrated in advance, so this is mostly API removal and test updates. Differential Revision: https://reviews.llvm.org/D155924
-
Nikita Popov authored
SCEVExpander tries to reuse existing instruction with the same SCEV expression. However, doing this replacement blindly is not safe, because the instruction might be more poisonous. What we were already doing is to drop poison-generating flags on the reused instruction. But this is not the only way that more poison can be introduced. The poison-generating flag might not be directly on the reused instruction, or the poison contribution might come from something like 0 * %var, which folds to 0 but can still introduce poison. This patch fixes the issue in a principled way, by determining which values can contribute poison to the SCEV expression, and then checking whether any additional values can contribute poison to the instruction being reused. Poison-generating flags are dropped if doing that enables reuse. This is a pretty big hammer and does cause some regressions in tests, but less than I would have expected. I wasn't able to come up with a less intrusive fix that still satisfies the correctness requirements. Fixes https://github.com/llvm/llvm-project/issues/63763. Fixes https://github.com/llvm/llvm-project/issues/63926. Fixes https://github.com/llvm/llvm-project/issues/64333. Fixes https://github.com/llvm/llvm-project/issues/63727. Differential Revision: https://reviews.llvm.org/D158181
-
pvanhout authored
Rewrites some simple rules that cause little to no codegen regressions as MIR patterns. I may have missed some easy cases, but some other rules have intentionally been left as-is because bigger changes are needed to make them work. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D157690
-
Jim Lin authored
-
wangpc authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D158388
-
Matthias Springer authored
The operands for which elementwise access is relevant can now be specified. All other operands are ignored. This is useful because only two particular operands participate in a RaW conflict. Furthermore, the two tensors no longer must be equivalent to rule out conflicts due to elementwise access. Equivalent tensor sets may be formed after an inplace bufferization decision is made. The two tensors are actually not required to be equivalent. The only important thing is that they have "equivalent" indexing into the same base buffer. Differential Revision: https://reviews.llvm.org/D158428
-
Fangrui Song authored
-
Congcong Cai authored
[clang-tidy][readability-braces-around-statements] ignore false-positive for constexpr if statement in lambda expression Fixed: #64545 When TreeTransform, Stmt in constexpr IfStmt will be transform to NullStmt. This NullStmt has the different beginning token. This patch add addtional check in checkStmt to handle this case. Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D158480
-
Christian Sigg authored
-
Christian Sigg authored
-