- Jul 06, 2023
-
-
Nico Weber authored
-
Markus Böck authored
The original plan was to turn this into its own pattern, but one of the difficulties was deeming when splitting the vector is required. `SplitIntegerStores` essentially already did that by checking for field overlap. Therefore, it was renamed to `SplitStores` and extended to splitting stores with values of vector and integer type. The vector splitting is done in a simple manner by simply using `extractelement` to get each vector element. Subsequent pattern applications are responsible for further cleaning up the output and making it type-consistent. Worst case, if the code cannot be transformed into a type-consistent form (due to e.g. the code explicitly doing partial writes to elements or similar), we might needlessly do a vector split. Differential Revision: https://reviews.llvm.org/D154583
-
Markus Böck authored
Jeremy Morse noted in D154451 that LLVM doesn't drop a `dbg.value` when its value is being removed, but rather sets the operand to `undef`. This preserves the debug info and gives allows the debugger to instead inform the user that the variable has been optimized out, rather than not displaying the variable at all. This patch fixes that mistake done in the previous revision by mirroring that behaviour in MLIR as well. Differential Revision: https://reviews.llvm.org/D154476
-
Florian Hahn authored
Add test coverage for demanded bit analysis of shl.
-
Aleksandr Popov authored
Added tests on range checks with non-strick predicate: * N - IV > limit * IV - N < limit * IV + N < limit Also added tests with known to be non-negative N Differential Revision: https://reviews.llvm.org/D154593 -
Eduard Zingerman authored
Extended BPFCheckAndAdjustIR pass with sinkMinMax() transformation that undoes LICM hoistMinMax pass. The undo transformation converts the following patterns: x < min(a, b) -> x < a && x < b x > min(a, b) -> x > a || x > b x < max(a, b) -> x < a || x < b x > max(a, b) -> x > a && x > b Where 'a' or 'b' is a constant. Also supports `sext min(...) ...` and `zext min(...) ...`. Differential Revision: https://reviews.llvm.org/D147990 -
Florian Hahn authored
Include the function name + analysis when printing the analysis for testing.
-
Hans Wennborg authored
-
Simon Pilgrim authored
-
Nikita Popov authored
With the semantics change from D154051, it is no longer valid to fold gep inbounds undef to poison (unless we know the index is non-zero). Fold it to undef instead. Differential Revision: https://reviews.llvm.org/D154215
-
Renato Golin authored
Re-apply eda47fdd after implementing __truediv__ for TensorUse. [MLIR][Linalg] Add more arith named ops to linalg Following up the 'add' named op, here are the remaining basic arithmetic and maths, including a 'div_unsigned' for integer unsigned values. In the same pattern as 'matmul_unsigned', the simply named 'div' assumes signed values and the '_unsigned' variation handles the unsigned values. It's a bit odd, but there doesn't seem to be a easy way to restrict to specific types to make 'div_unsigned' only work with integers in the structured ops framework. Same as 'add', these have strict semantics regarding casts. Unary math ops will need some massaging, so I split these ones for now as I continue working on them. Differential Revision: https://reviews.llvm.org/D154524
-
Amy Kwan authored
This patch is a follow up to D149722, D152669 and D153645, where a slightly more optimized code sequence is generated for 64-bit and 32-bit local-exec accesses when optimizations are turned on. Handling is added PPCISelDAGToDAG.cpp in order to check if any D-form loads or stores that follow an PPCISD::ADD_TLS can be optimized to use an X-Form load or store. In this particular situation, this allows the ADD_TLS node to be removed completely. Differential Revision: https://reviews.llvm.org/D150367
-
Timm Bäder authored
-
Timm Bäder authored
These are supposed to be regular comments.
-
Timm Bäder authored
-
Timm Bäder authored
And add some assertions.
-
Timm Bäder authored
They are generally immutable anyway. Also fix some doc comments.
-
Nikita Popov authored
Currently, our GEP specification has a special case that makes gep inbounds (null, 0) legal. This patch proposes to expand this special case to all gep inbounds (ptr, 0), where ptr is no longer required to point to an allocated object. This was previously discussed in some detail at https://discourse.llvm.org/t/question-about-getelementptr-inbounds-with-offset-0/62533. The motivation for this change is twofold: * Rust relies on getelementptr inbounds with zero offset to be legal for arbitrary pointers to support zero-sized types. The current rules are unclear on whether this is legal or not (saying that there is a zero-size "allocated object" at every address may be consistent with our current rules, but more clarity is desired here). * The current semantics require us to drop the inbounds flag when materializing zero-index GEPs, which is done by some InstCombine transforms. Preserving the inbounds flag can substantially improve optimization quality in some cases, as illustrated in D154055. As far as I know, the only analysis/transforms affected by this semantics change are: * A special-case for comparisons with null in CaptureTracking, which is fixed by D154054. As far as I can tell, that special case is not particularly valuable and should be recovered by other transforms. * Folding gep inbounds undef, idx to poison. We now need to fold to undef instead (D154215). Differential Revision: https://reviews.llvm.org/D154051
-
Louis Dionne authored
Based on the comment in https://reviews.llvm.org/D54290#4418958, these attributes need to be on the top-level functions in order to work properly. Also, add tests. Fixes http://llvm.org/PR57035. Differential Revision: https://reviews.llvm.org/D154354
-
Alex Bradbury authored
Thanks to D154555, these intrinsics no longer crash when used with a soft float ABI.
-
Florian Hahn authored
When a scalar epilogue is required, at least one iteration of the scalar loop has to execute. Adjust ConstTripCount accordingly to avoid picking a max VF that results in a dead vector loop. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D154261
-
Felipe de Azevedo Piovezan authored
Two identical loops were iterating over different ranges, leading to code duplication. We replace this by a loop over the concatenation of the ranges. We also use early returns to avoid deeply nested code and explicitly check for a condition mentioned in comments. Differential Revision: https://reviews.llvm.org/D154505
-
John Brawn authored
This test is failing to compile when LLVM_ENABLE_MODULES=ON due to NamedDecl being multiply defined. Fix this by avoiding declaring our own NamedDecl in the test and instead cast a struct of appropriate size and alignment to NamedDecl.
-
Eddie Phillips authored
Matches behaviour in update_llc_test_checks.py etc. Fixes #63112 Differential Revision: https://reviews.llvm.org/D152333
-
Ivan Kosarev authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D154527
-
Marco Elver authored
Current FreeBSD has increased size of cpuset. Match it to not break the build on newer FreeBSD. Patch by John F. Carr Fixes: https://github.com/llvm/llvm-project/issues/63485
-
Amilendra Kodithuwakku authored
This commit provides linker support for Cortex-M Security Extensions (CMSE). The specification for this feature can be found in ARM v8-M Security Extensions: Requirements on Development Tools. The linker synthesizes a security gateway veneer in a special section; `.gnu.sgstubs`, when it finds non-local symbols `__acle_se_<entry>` and `<entry>`, defined relative to the same text section and having the same address. The address of `<entry>` is retargeted to the starting address of the linker-synthesized security gateway veneer in section `.gnu.sgstubs`. In summary, the linker translates input: ``` .text entry: __acle_se_entry: [entry_code] ``` into: ``` .section .gnu.sgstubs entry: SG B.W __acle_se_entry .text __acle_se_entry: [entry_code] ``` If addresses of `__acle_se_<entry>` and `<entry>` are not equal, the linker considers that `<entry>` already defines a secure gateway veneer so does not synthesize one. If `--out-implib=<out.lib>` is specified, the linker writes the list of secure gateway veneers into a CMSE import library `<out.lib>`. The CMSE import library will have 3 sections: `.symtab`, `.strtab`, `.shstrtab`. For every secure gateway veneer <entry> at address `<addr>`, `.symtab` contains a `SHN_ABS` symbol `<entry>` with value `<addr>`. If `--in-implib=<in.lib>` is specified, the linker reads the existing CMSE import library `<in.lib>` and preserves the entry function addresses in the resulting executable and new import library. Reviewed By: MaskRay, peter.smith Differential Revision: https://reviews.llvm.org/D139092 -
Haojian Wu authored
We're in favor of the llvm::writeToOutput API, and all writeFileAtomically usages have been migrated to writeToOutput. Differential Revision: https://reviews.llvm.org/D153740
-
Matthias Springer authored
This should have been part of D154585.
-
Lorenzo Chelini authored
Make the transformation accessible to other drivers (i.e., passes).
-
Simon Pilgrim authored
Fold allsignbits pack patterns to make better use of cheap (and commutable) logic ops Reapplied after a32d14fd / 156913cb with bitcast fix
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Matthias Springer authored
The TileOp builders did not set `scalable_sizes`, which produces invalid ops. `scalable_sizes` must contain as any booleans as there are sizes. Differential Revision: https://reviews.llvm.org/D154585
-
Haojian Wu authored
Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D153340
-
Gedare Bloom authored
Fixes a bug that prevents alignment from proceeding through a function pointer in a list of declarations. Fixes #63451. Differential Revision: https://reviews.llvm.org/D153585
-
Dmitri Gribenko authored
-
Gedare Bloom authored
Fixes a bug with the handling of right aligned references with left/middle alignment pointers. Fixes #63452. Differential Revision: https://reviews.llvm.org/D153579
-
David Spickett authored
Previously the following would crash: (lldb) run Process 2594053 launched: '/tmp/test.o' (aarch64) Process 2594053 exited with status = 0 (0x00000000) (lldb) register read <tab> As the completer assumed that the execution context would always have a register context. After a program has finished, it does not. Split out the generic parts of the test from the x86 specific tests, and added "register info" to both. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D154413
-
Craig Topper authored
This matches the data type of the intrinsics. This case be seen from the removal of sext and trunc instructions from the IR. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D154572
-