- Aug 22, 2023
-
-
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
-
Christian Ulmann authored
This commit adds a missed update of the call mapping in the LLVM export for calls with no result. Before, these calls were not inserted and thus, the export dropped branch weights on them. Reviewed By: zero9178 Differential Revision: https://reviews.llvm.org/D158453
-
Mikael Holmen authored
Apparently the testcase coalesce-partial-redundant-reguse-terminator.mir was broken in a way that -verify-coalescing detected. Update the testcase so -verify-coalescing doesn't complain and so that it still exposes the problem originally fixed in 6c062b76. Differential Revision: https://reviews.llvm.org/D158397
-
huqizhi authored
Depth of the parameter of friend template class declaration in a template class is 1, while in the specialization the depth is 0. This will cause failure on 'IsStructurallyEquivalent' as a name conflict in 'VisitClassTemplateDecl'(see testcase of 'SkipComparingFriendTemplateDepth'). The patch fix it by ignore the depth only in this special case. Reviewed By: balazske Differential Revision: https://reviews.llvm.org/D156693
-
Christian Sigg authored
-
Kai Luo authored
-
Congcong Cai authored
``` struct XY { int *x; int *y; }; void recordInitList(int *x) { XY xy = {x, nullptr}; } ``` x cannot be const int* becase it in a initialize list which only accept int* Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D158152 -
Douglas Yung authored
-
Fangrui Song authored
See issue llvm#64166 for more information about layering.
-
Slava Zakharin authored
On x86, a simplified F128 maxval ends up calling fmaxl that does not work properly for F128 arguments. It is probably an LLVM issue, but we also should not use arith.maxf if NaN or -0.0 operands are possible. The change is to use cmpf and select. Unfortunately, these arith ops do not support FastMathFlags currently, so I will have to fix this sooner or later (depending on how this affects performance). Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D158200
-