- Apr 21, 2021
-
-
Roman Lebedev authored
-
Roman Lebedev authored
We already special-cased a few interesting patterns, but that is strictly less powerful than using KnownBits. So instead get the known bits for the operand of `and`, and iff all the unset bits of the `and`-mask are known to be zeros in the operand, we can omit said `and`.
-
Roman Lebedev authored
-
Roman Lebedev authored
If we can tell that trunc only chops off sign bits, and not all of them, then we can simply sign-extend the trunc's source.
-
Roman Lebedev authored
-
Sanjay Patel authored
There are several potential srem-by-2 folds because the result is known {-1,0,1}. https://alive2.llvm.org/ce/z/LuVyeK -
Sanjay Patel authored
-
Sam Clegg authored
Differential Revision: https://reviews.llvm.org/D100887
-
Zequan Wu authored
MSVC linker has this [[ https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-warning-lnk4102?view=msvc-160 | warning]], so lld-link should also warn on this. Differential Revision: https://reviews.llvm.org/D100606
-
Jez Ng authored
codesign/libstuff checks that the `__LLVM` segment is directly before `__LINKEDIT` by checking that `fileOff + fileSize == next segment fileOff`. Previously, there would be gaps between the segments due to the fact that their fileOffs are page-aligned but their fileSizes aren't. In order to satisfy codesign, we page-align fileOff *before* calculating fileSize. (I don't think codesign checks for the relative ordering of other segments, so in theory we could do this just for `__LLVM`, but ld64 seems to do it for all segments.) Note that we *don't* round up the fileSize of the `__LINKEDIT` segment. Since it's the last segment, it doesn't need to worry about contiguity; in addition, codesign checks that the last (hidden) section in `__LINKEDIT` covers the last byte of the segment, so if we rounded up `__LINKEDIT`'s size we would have to do the same for its last section, which is a bother. While at it, I also addressed a FIXME in the linkedit-contiguity.s test to cover more `__LINKEDIT` sections. Reviewed By: #lld-macho, thakis, alexshap Differential Revision: https://reviews.llvm.org/D100848
-
Jez Ng authored
The minuend (but not the subtrahend) can reference a section. Note that we do not yet properly validate that the subtrahend isn't referencing a section; I've filed PR50034 to track that. I've also extended the reloc-subtractor.s test to reorder symbols, to make sure that the addends are being associated with the minuend (and not the subtrahend) relocation. Fixes PR49999. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D100804
-
Alexey Bataev authored
Introduced the cost of thre reverse shuffles for AArch64, currently just copied the costs for PermuteSingleSrc. Differential Revision: https://reviews.llvm.org/D100871
-
Petr Hosek authored
This is another attempt to address the issue introduced in ae8b2cab. We cannot capture InstalledDir because FileCheck doesn't handle the backslashes correctly, so instead we just consume the entire path prefix which is what other tests are doing.
-
Petr Hosek authored
This addresses Windows breakage introduced by ae8b2cab.
-
Philip Reames authored
I'd reverted this in commit 3b6acb17 due to buildbot failures. This patch contains the fix for said issue. I'd forgotten to handle the case where two phis in the same block have different operand order. We canonicalize away from this, but it's still valid IR. The tests included in this change (as opposed to simply having test output changed), crashed without the fix. Original commit message follows... This extends the phi handling in isKnownNonEqual with a special case based on invertible recurrences. If we can prove the recurrence is invertible (which many common ones are), we can recurse through the start operands of the recurrence skipping the phi cycle. (Side note: Instcombine currently does not push back through these cases. I will implement that in a follow up change w/separate review.) Differential Revision: https://reviews.llvm.org/D99912
-
Peter Steinfeld authored
We were erroneously emitting error messages for assignments of derived types where the associated objects were instantiated with non-constant LEN type parameters. I fixed this by adding the member function MightBeAssignmentCompatibleWith() to the class DerivedTypeSpec and calling it to determine whether it's possible that objects of parameterized derived types can be assigned to each other. Its implementation first compares the uninstantiated values of the types. If they are equal, it then compares the values of the constant instantiated type parameters. I added tests to assign04.f90 to exercise this new code. Differential Revision: https://reviews.llvm.org/D100868
-
Jon Roelofs authored
... to only print when that fallback actually happens.
-
Thomas Lively authored
af7925b4 added a custom DAG combine for recognizing fp-to-ints of extract_subvectors that could be lowered to f64x2.convert_low_i32x4_{s,u} instructions. This commit extends the combines to recognize equivalent extract_subvectors of fp-to-ints as well. Differential Revision: https://reviews.llvm.org/D100790
-
Petr Hosek authored
Darwin driver currently uses libc++ headers that are part of Clang toolchain when available (by default ../include/c++/v1 relative to executable), but it completely ignores the libc++ library itself because it doesn't pass the location of libc++ library that's part of Clang (by default ../lib relative to the exceutable) to the linker always using the system copy of libc++. This may lead to subtle issues when the compilation fails because the headers that are part of Clang toolchain are incompatible with the system library. Either the driver should ignore both headers as well as the library, or it should always try to use both when available. This patch changes the driver behavior to do the latter which seems more reasonable, it makes it easy to test and use custom libc++ build on Darwin while still allowing the use of system version. This also matches the Clang driver behavior on other systems. Differential Revision: https://reviews.llvm.org/D45639
-
Nico Weber authored
...to remove double negation in the code. Requested in D100583. No behavior change. Differential Revision: https://reviews.llvm.org/D100849
-
peter klausler authored
Define APIs for, and implement, these three more recently-introduced standard reduction transformational intrinsic functions to the runtime. Differential Revision: https://reviews.llvm.org/D100863
-
Jason Molenda authored
Landing this fix for Augusto Noronha. The code is getting the Section from 'addr' passed in, but it may have been expressed as a load address when it was created and Target::ReadMemory tries to convert it to a Section+offset if that's now possible; use the Section found from that cleanup if it exists. Differential Revision: https://reviews.llvm.org/D100850
-
Christopher Di Bella authored
Implements parts of: * P0896R4 The One Ranges Proposal Depends on D99855. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D99863 -
Dan Liew authored
The previous check was wrong because it only checks that the LLVM CMake directory exists. However, it's possible that the directory exists but the `LLVMConfig.cmake` file does not. When this happens we would incorectly try to include the non-existant file. To fix this we make the check stricter by checking that the file we want to include actually exists. This is a follow up to fd28517d. rdar://76870467
-
Philip Reames authored
This reverts commit be20eae2. It appears to have caused a crash on a buildbot (https://lab.llvm.org/buildbot#builders/77/builds/5653). Reverting while investigating.
-
Philip Reames authored
Adding the switches to reduce diffs. I'm about to split that into an lshr part and an ashr part, doing the NFC part first makes it easier to maintain both diffs.
-
Nathan Sidwell authored
Add some specificity to libstdc++ hack, perhaps we can remove it at a later date.
-
Philip Reames authored
-
Roman Lebedev authored
[InstCombine] Recognize `((x * y) s/ x) !=/== y` as an signed multiplication overflow check (PR48769) We already had support for it's unsigned variant, so simply extend it to also handle the signed variant. Fixes https://bugs.llvm.org/show_bug.cgi?id=48769
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Roman Lebedev authored
We might as well test all of the codegen here.
-
Fangrui Song authored
An unfetched lazy symbol (undefined weak) should be considered to have its original versionId which is VER_NDX_GLOBAL, instead of the lazy symbol's versionId. (The original versionId cannot be non-VER_NDX_GLOBAL because a undefined versioned symbol is an error.) The regression was introduced in D77280 when making version scripts work with lazy symbols fetched by LTO calls. Fix PR49915 Differential Revision: https://reviews.llvm.org/D100624
-
Alessandro Vergani authored
Change cd ..\.. to cd llvm-project (the former is probably a leftover of the old svn instructions) Committer: Adrian McCarthy <amccarth@google.com> Differential Revision: https://reviews.llvm.org/D68321
-
Mathieu Fehr authored
Currently, it is only possible to register an operation or a type when the TypeID is defined at compile time. Same with InterfaceMaps which can only be defined with compile-time defined interfaces. With those changes, it is now possible to register types/operations with custom TypeIDs. This is necessary to define new operations/types at runtime. Differential Revision: https://reviews.llvm.org/D99084
-
Philip Reames authored
This extends the phi handling in isKnownNonEqual with a special case based on invertible recurrences. If we can prove the recurrence is invertible (which many common ones are), we can recurse through the start operands of the recurrence skipping the phi cycle. (Side note: Instcombine currently does not push back through these cases. I will implement that in a follow up change w/separate review.) Differential Revision: https://reviews.llvm.org/D99912
-
Kristina Bessonova authored
The debug mode tests for map/set's iterators construct empty containers, making the code after the first increment meaningless. It's never executed since the tests exit earlier. It doesn't seem to be intentional, so the patch makes the tests to construct containers that include at least one element. Reviewed By: curdeius, Quuxplusone Differential Revision: https://reviews.llvm.org/D100029
-
Nicolás Alvarez authored
Looking at the Doxygen-generated documentation for the clang namespace currently shows several random comments from different parts of the codebase. These are caused by: - File doc comments that aren't marked with \file, so they're attached to the next declaration, which is usually "namespace clang {". - Class doc comments placed before the namespace rather than before the class. This commit fixes these comments. The generated doxygen documentation now has proper docs for several classes and files, and the docs for the clang namespace is now empty. Differential Revision: https://reviews.llvm.org/D96738 -
Javier Setoain authored
A couple of standard op examples that use an outdated syntax need an update. Differential Revision: https://reviews.llvm.org/D100840
-
Nicolás Alvarez authored
The code example for "RecursiveASTVisitor based ASTFrontendActions" was using unique_ptr<X>(new X) when creating the AST consumer; change it to use make_unique instead. The main function of the same example already used make_unique. Differential Revision: https://reviews.llvm.org/D93185
-