- Jul 14, 2023
-
-
Alexey Bataev authored
match the size of base node (PR63668). Need to adjust the check for assert and take into account case where the original scalars are reused and were extended to match the vector factor of the reused SLP node.
-
Matthias Springer authored
* Rename functions with underscore to camel case. * Return C++ bools of "in_bounds" values instead of an `ArrayAttr`. Differential Revision: https://reviews.llvm.org/D155277
-
Matthias Springer authored
No need to compute the `in_bounds` attribute. The folder will infer it. Differential Revision: https://reviews.llvm.org/D155172
-
Alexandros Lamprineas authored
Before looking up a value in the map of known constants we attempt to dynamically cast it. The code looks cleaner if we move the cast inside findConstantFor(), where the look up happens. Differential Revision: https://reviews.llvm.org/D155177
-
Markus Böck authored
Using MLIR attributes instead of metadata has many advantages: * No indirection: Attributes can simply refer to each other seemlessly without having to use the indirection of `SymbolRefAttr`. This also gives us correctness by construction in a lot of places as well * Multithreading safe: The Attribute infrastructure gives us thread-safety for free. Creating operations and inserting them into a block is not thread-safe. This is a major use case for e.g. the inliner in MLIR which runs in parallel * Easier to create: There is no need for a builder or a metadata region This patch therefore does exactly that. It leverages the new distinct attributes to create distinct access groups in a deterministic and threadsafe manner. Differential Revision: https://reviews.llvm.org/D155285
-
Nikita Popov authored
(zext a) + (sext a) is 0 if a is a bool. The regression is in a fuzzer-generated test. Proof: https://alive2.llvm.org/ce/z/KotnN6
-
Nikita Popov authored
-
Viktoriia Bakalova authored
Differential Revision: https://reviews.llvm.org/D155215
-
Tobias Hieta authored
We want lld-link to automatically find compiler-rt's and libc++ when it's in the same directory as the rest of the toolchain. This is because on Windows linking isn't done via the clang driver - but instead invoked directly. This prepends: <llvm>/lib <llvm>/lib/clang/XX/lib and <llvm>/lib/clang/XX/lib/windows automatically to the library search paths. Related to #63827 Differential Revision: https://reviews.llvm.org/D151188
-
Nikita Popov authored
cttz(-a & a) is the same as cttz(a). -a & a is an idiom to extract the lowest set bit, which naturally does not affect the number of trailing zeroes. Proof: https://alive2.llvm.org/ce/z/Yp26x7
-
Nikita Popov authored
-
Alex Bradbury authored
Some of these test cases will be changed by upcoming combines, even in the non-zicond case.
-
Matthias Springer authored
Supported ops are "memref.alloc" and "memref.alloca". Differential Revision: https://reviews.llvm.org/D155282
-
Matthias Springer authored
This new option allows users to specify a custom memcpy op. Differential Revision: https://reviews.llvm.org/D155280
-
Jay Foad authored
D149348 did this for readnone calls, which are handled by SimpleValue. This patch does the same for all other CSEable calls, which are handled by CallValue. Differential Revision: https://reviews.llvm.org/D153151
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D155210
-
Alex Bradbury authored
[RISCV] Introduce RISCVISD::CZERO_{EQZ,NEZ} nodes produce them when zicond is present in lowerSELECT This patch is a step towards altering how we handle the emission of condops. Marking ISD::SELECT as legal is a major change in the codegen path, and gives few options for maintaining the old codegen path when it is believed to be better (e.g. a better branchless sequence is possible using non-zicond instructions, or the branch-based sequence is preferable). This removes the existing SelectionDAG patterns and moves the logic into lowerSELECT. Along some small codegen changes you'll note a few minor regressions in the generated code quality - this are due to the fact that by lowering the SELECT node early we miss out on combines that would kick in later when setcc condcodes that aren't natively supported have been expanded (thus exposing opportunities for optimisation by performing logical negation and swapping truev/falsev). I've opted to split out work that addresses these into follow-on patches (especially as zicond is still 'experimental'). matchSetCC is a straight-forward translation from the version in RISCVISelDAGToDAG. Ideally, in the future it can be converted to a helper shared between both files. Differential Revision: https://reviews.llvm.org/D155083 -
Tobias Hieta authored
This patch is spun out of https://reviews.llvm.org/D151188 and makes it possible for lld-link to find libraries with relative paths. This will be used later to implement the changes to autolinking runtimes explained in #63827 Differential Revision: https://reviews.llvm.org/D155268
-
Nikita Popov authored
The select arm that takes the ctlz result can also instead be a constant with the bit width (as this is what the ctlz evaluates to for a==0). This avoids a regression when strengthening the simplifyWithOpReplaced() fold. Proof: https://alive2.llvm.org/ce/z/DMRL5A
-
Nikita Popov authored
-
Nikita Popov authored
-
Simon Pilgrim authored
-
Nikita Popov authored
-
David Green authored
This is similar to D153632, but for mul nodes instead of add/sub. They get recognised in LowerMUL in order to detect the mul(ext, ext), in a way that will work for i64 nodes as well as i16/i32. This extends it to look for mul(subvector_extract(ext(x), 0), subvector_extract(ext(y), 0)), generating a subvector_extract(mull(x,y)) if it matches. Differential Revision: https://reviews.llvm.org/D154063
-
Nicolas Vasilache authored
-
Nicolas Vasilache authored
This reverts commit afdb83b1. This was landed with a bad description.
-
Kiran Chandramohan authored
Use typed assignment in Atomic Write lowering to better handle type conversions of allowed types. Note: We should make similar changes for other constructs in later patches. Reviewed By: NimishMishra Differential Revision: https://reviews.llvm.org/D154163
-
Markus Böck authored
Using MLIR attributes instead of metadata has many advantages: * No indirection: Attributes can simply refer to each other seemlessly without having to use the indirection of `SymbolRefAttr`. This also gives us correctness by construction in a lot of places as well * Multithreading save: The Attribute infrastructure gives us thread-safety for free. Creating operations and inserting them into a block is not thread-safe. This is a major use case for e.g. the inliner in MLIR which runs in parallel * Easier to create: There is no need for a builder or a metadata region This patch therefore does exactly that. It leverages the new distinct attributes to create distinct alias domains and scopes in a deterministic and threadsafe manner. Differential Revision: https://reviews.llvm.org/D155159
-
Nikita Popov authored
-
Nikita Popov authored
-
Nikita Popov authored
-
Nikita Popov authored
-
Nikita Popov authored
Always returns true with opaque pointers.
-
Nikita Popov authored
This now always returns true (for pointer types).
-
Jim Lin authored
In our downstream, we define some intrinsics that don't require any extra extension enabled. Such as TARGET_BUILTIN(__builtin_riscv_xxx, "LiLi", "nc", "") But `split` function's `KeepEmpty` argument is True. Got the error message error: builtin requires at least one of the following extensions support to be enabled : '' when we use our customized intrinsic. Reviewed By: craig.topper, wangpc Differential Revision: https://reviews.llvm.org/D154596
-
Haojian Wu authored
flag
-
Matthias Springer authored
There was a bug in `TransferWriteNonPermutationLowering`, a pattern that extends the permutation map of a TransferWriteOp with leading transfer dimensions of size ones. These newly added transfer dimensions are always in-bounds, because the starting point of any dimension is in-bounds. VectorToSCF inserts out-of-bounds checks based on the "in_bounds" attribute and dims that are marked as out-of-bounds but that are actually always in-bounds lead to unnecessary "scf.if" ops. Differential Revision: https://reviews.llvm.org/D155196
-
Yeting Kuo authored
(shl (zext to iXLenVec), C) is a possible pattern in auto-vectorized code for indexed loads/stores. But extending to iXLen might be too aggressive, RVV indexed load/store instructions zero extend their indexed operand to XLEN. The patch tries to narrow the type of the zero extension. It's benefit to decrease register pressure. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D154687
-
XinWang10 authored
Previously we remove a pattern like: %reg = and32ri %in_reg, 5 ... // EFLAGS not changed. %src_reg = subreg_to_reg 0, %reg, %subreg.sub_index test64rr %src_reg, %src_reg, implicit-def $eflags We can remove test64rr since it has same functionality as and subreg_to_reg avoid the opt in previous code, so we handle this case specially. And this case is also can be opted for the same reason, like: %reg = and32ri %in_reg, 5 ... // EFLAGS not changed. %src_reg = copy %reg.sub_16bit:gr32 test16rr %src_reg, %src_reg, implicit-def $eflags The COPY from gr32 to gr16 prevent the opt in previous code too, just handle it specially as what we did for test64rr. Reviewed By: skan Differential Revision: https://reviews.llvm.org/D154193
-
Nikita Popov authored
Always returns false now.
-