- Feb 10, 2022
-
-
Valentin Clement authored
Replace the hardcoded attribute name with the constexpr StringRef defined in the FIROps.td file. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D119422
-
Craig Topper authored
The VLMaxSentinel is represented as TargetConstant, but that's included in isa<ConstantSDNode>. To keep constant VLs and VLMax separate as long as possible, use the X0 register during lowering and only convert to VLMaxSentinel during isel. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D118845
-
Hans Wennborg authored
we already accept "--target=". No reason to not accept "-target" too (that's the one I typically use for some reason). Differential revision: https://reviews.llvm.org/D119446
-
Paul Walker authored
These nodes provide an indirection that is not necessary because SVE has unpredicated add/sub instructions and there's no downside to using them for partial register operations. In fact, the test changes show that unifying how fixed-length and scalable vector add/sub are lowered enables better use of existing isel patterns. Differential Revision: https://reviews.llvm.org/D119355
-
Simon Pilgrim authored
Add smulo and umulo test coverage
-
Simon Pilgrim authored
Matches what we do in getThreeSrcCommuteCase. Fixes static analyzer out of bounds array access warning.
-
Arthur Eubanks authored
Previously memaccess-clobber.ll relied on both legacy PM-specific things like `-analyze` and MemoryDependenceAnalysis, which are both deprecated. This uses MemorySSA, which is the cool new thing that a bunch of passes have migrated to. Differential Revision: https://reviews.llvm.org/D119393
-
Craig Topper authored
Now that we pre-process SPLAT_VECTOR to VFMV_V_F_VL, these patterns handled scalable vectors and vectors converted from fixed. These are also used by vp.fma lowering.
-
Jordan Rupprecht authored
[libc++] Remove usage of `_LIBCPP_DEBUG` in `__comp_ref_type` and replace with `_LIBCPP_DEBUG_LEVEL` In libc++, checking specific `_LIBCPP_DEBUG_LEVEL` levels is used everywhere except in `comp_ref_type.h`. `_LIBCPP_DEBUG` is meant as a user-facing option, and internally libc++ should be checking the value of `_LIBCPP_DEBUG_LEVEL`. The definition of `std::__debug_less` doesn't need to be hidden behind the macro, we can unconditionally expose it. It will be unused by `__comp_ref_type` unless debug mode is enabled. This was suggested in D118940. Reviewed By: #libc, philnik, Quuxplusone, ldionne Differential Revision: https://reviews.llvm.org/D118950
-
Jordan Rupprecht authored
b07b5bd7 adds a use of `__comp_ref_type.h` to `std::min`. When libc++ is built with `-D_LIBCPP_DEBUG=0`, this enables `std::__debug_less`, which is only marked constexpr after c++17. `std::min` itself is marked as being `constexpr` as of c++14, so by extension, `std::__debug_less` should also be marked `constexpr` for the same versions so that `std::min` can use it. This change lowers the guard from `> 17` to `> 11`. Reproducer in godbolt: https://godbolt.org/z/ans3TGsj8 ``` constexpr int x() { return std::min<int>({1, 2, 3, 4}); } static_assert(x() == 1); ``` Reviewed By: #libc, philnik, Quuxplusone, ldionne Differential Revision: https://reviews.llvm.org/D118940
-
Mark de Wever authored
This avoids using an libc++ internal macro in our tests. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D119352
-
Jeremy Morse authored
This new-ish LEA-fixup code path creates two substitutions for an instruction number -- this is incorrect because each Value should be replaced by a single replacement Value. Fix by deleting the duplicate substitution. Add some test coverage for this path with debug-info attached. Differential Revision: https://reviews.llvm.org/D119232
-
alex-t authored
This change includes tablegen patterns that were missed by https://reviews.llvm.org/D110950 and https://reviews.llvm.org/D76230 Reviewed By: foad Differential Revision: https://reviews.llvm.org/D119302
-
Simon Pilgrim authored
This is guaranteed to be evaluated so we can avoid repeated calls. Helps the static analyzer as it couldn't recognise that each getVecSize() would return the same value.
-
David Sherwood authored
When lowering the get.active.lane.mask intrinsic with a fixed-width predicate vector result, we can actually make use of the SVE whilelo instruction when SVE is enabled. We do this by carefully choosing a sensible VT for the whilelo instruction, then promoting it to an integer vector, i.e. nxv16i1 -> nx16i8. We can then extract a v16i8 subvector and truncate back to the original return type, i.e. v16i1. This leads to a significant improvement in code quality. Differential Revision: https://reviews.llvm.org/D116664
-
Nikolas Klauser authored
Reviewed By: ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D119304
-
Florian Hahn authored
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D119395
-
dreachem authored
Differential Revision: https://reviews.llvm.org/D119440
-
Rainer Orth authored
As reported in Issue #53690, `tools/flang/unittests/Optimizer/FlangOptimizerTests` `FAIL`s to link on Solaris: Undefined first referenced symbol in file _ZN3fir7runtimeL8getModelIcEEPFN4mlir4TypeEPNS2_11MLIRContextEEv lib/libFIRBuilder.a(Reduction.cpp.o) which is `mlir::Type (*fir::runtime::getModel<char>())(mlir::MLIRContext*)`. `clang++` warn's In file included from /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp:14: /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h:60:34: warning: function 'fir::runtime::getModel<char>' has internal linkage but is not defined [-Wundefined-internal] static constexpr TypeBuilderFunc getModel(); ^ /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h:289:29: note: used here TypeBuilderFunc ret = getModel<RT>(); ^ Fixed by adding an explicit template instantiation for `getModel<char>`. I suppose this is necessary because on Solaris `char` is `signed`. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D119438
-
LLVM GN Syncbot authored
-
Nikita Popov authored
With opaque pointers, a zero-index GEP is a no-op. It does not need to be retained for the pointer element type change it may perform.
-
Nikolas Klauser authored
Implement `std::ranges::swap_ranges()` Reviewed By: Quuxplusone, #libc, ldionne Spies: ldionne, mgorny, jloser, libcxx-commits Differential Revision: https://reviews.llvm.org/D116303
-
Christian Kandeler authored
... if there is a match. This is needed to that clients can can make a connection between a diagnostic and an associated quickfix-tweak. Ideally, quickfix-kind tweak code actions would be provided inline along with the non-tweak fixes, but this doesn't seem easily achievable. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D118976
-
Jay Foad authored
This is just a reminder that the operands are swapped compared with all the other CmpXChg instructions. Differential Revision: https://reviews.llvm.org/D119421
-
Paul Walker authored
The are several places where hasBF16 is used to protect code that has no requirement for the +bf16 feature. The lowering code uses stock SVE instructions for things like loads and stores and so is safe even when +bf16 is not available. NOTE: Currently the nxvbf16 type is not legal unless the +bf16 feature is available, but that isn't an issue because the affected code is post type legalisation. NOTE: This patch mirrors previous work that removed the same redundant protection from isel patterns where the resulting selection emitted stock SVE instructions. Differential Revision: https://reviews.llvm.org/D119328
-
Roman Lebedev authored
While that effectively concludes i1 select handling, that boolean restriction can be lifted later.
-
-
-
Roman Lebedev authored
By definition, `umin_seq` has the exact same poison stopping properties the original `select` had: https://alive2.llvm.org/ce/z/N6XwV-
-
Roman Lebedev authored
By definition, `umin_seq` has the exact same poison stopping properties the original `select` had: https://alive2.llvm.org/ce/z/aqe9GK
-
Roman Lebedev authored
By definition, `umin_seq` has the exact same poison stopping properties the original `select` had: https://alive2.llvm.org/ce/z/MUfbTL
-
Roman Lebedev authored
By definition, `umin_seq` has the exact same poison stopping properties the original `select` had: https://alive2.llvm.org/ce/z/59KuZZ
-
Roman Lebedev authored
We'd catch the tautological select pattern later anyways due to constant folding, so that leaves PHI-like select, but it does not appear to fire there.
-
Roman Lebedev authored
Currently `createNodeForSelectOrPHI()` takes an Instruction, and only works on the Cond that is an ICmpInst, but that can be relaxed somewhat. For now, simply rename the existing function, and add a thin wrapper ontop that still does the same thing as it used to.
-
Roman Lebedev authored
https://alive2.llvm.org/ce/z/ULuZxB We could transparently handle wider bitwidths, by effectively casting iN to <N x i1> and performing the `add` bit/element -wise, the expression will be rather large, so let's not do that for now.
-
Roman Lebedev authored
https://alive2.llvm.org/ce/z/aKAr94 We could transparently handle wider bitwidths, by effectively casting iN to <N x i1> and performing the `umin` bit/element -wise, the expression will be rather large, so let's not do that for now.
-
Roman Lebedev authored
https://alive2.llvm.org/ce/z/SMEaoc We could transparently handle wider bitwidths, by effectively casting iN to <N x i1> and performing the `umax` bit/element -wise, the expression will be rather large, so let's not do that for now.
-
Roman Lebedev authored
-
Paul Walker authored
The decision is perhaps arbitrary but I figure zeroing has no dependency on the value being loaded. Differential Revision: https://reviews.llvm.org/D119327
-