- Apr 21, 2021
-
-
Zi Xuan Wu authored
Resort the instruction description in td to make it easy to upstream more instructions and add predicts later.
-
Siva Chandra authored
The current generic implementation of the fmaf function has been moved to the FPUtil directory. This allows one use the fma operation from implementations of other math functions like the trignometric functions without depending on/requiring the fma/fmaf/fmal function targets. If this pattern ends being convenient, we will switch all generic math implementations to this pattern. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D100811
-
Jonas Devlieghere authored
This reverts the following commits because it breaks TestAppleSimulatorOSType.py on GreenDragon [1]. caff17e5 f5efe0aa ae8b2cab [1] http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/31346/
-
Liu, Chen3 authored
Support for _mm512_i32logather_pd, _mm512_mask_i32logather_pd, _mm512_i32logather_epi64, _mm512_mask_i32logather_epi64, _mm512_i32loscatter_pd, _mm512_mask_i32loscatter_pd, _mm512_i32loscatter_epi64, _mm512_mask_i32loscatter_epi64. Differential Revision: https://reviews.llvm.org/D100368
-
Craig Topper authored
-
Amy Zhuang authored
Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D100512
-
George Balatsouras authored
All related instrumentation tests have been updated. Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D100903
-
Fangrui Song authored
sanitizer_linux_libcdep.cpp doesn't build for Linux sparc (with minimum support but can build) after D98926. I wasn't aware because the file didn't mention `__sparc__`. While here, add the relevant support since it does not add complexity (the D99566 approach). Adds an explicit `#error` for unsupported non-Android Linux and FreeBSD architectures. ThreadDescriptorSize is only used by lsan to scan thread-specific data keys in the thread control block. On TLS Variant II architectures (i386/x86_64/s390/sparc), our dl_iterate_phdr based approach can cover the region from the first byte of the static TLS block (static TLS surplus) to the thread pointer. We just need to extend the range to include the first few members of struct pthread. offsetof(struct pthread, specific_used) satisfies the requirement and has not changed since 2007-05-10. We don't need to update ThreadDescriptorSize for each glibc version. Technically we could use the 524/1552 for x86_64 as well but there is potential risk that large applications with thousands of shared object dependency may dislike the time complexity increase if there are many threads, so I don't make the simplification for now. Differential Revision: https://reviews.llvm.org/D100892
-
Adrian Prantl authored
PHIElimination may insert copy instructions in multiple basic blocks. Moving debug locations across basic block boundaries would be misleading as illustrated by the test case. rdar://75463656 Differential Revision: https://reviews.llvm.org/D100886
-
Sam Clegg authored
This is just a cleanup of the very high level stuff. I'm sure there is more to update here but I'll leave that to others and/or a followup. Differential Revision: https://reviews.llvm.org/D100888
-
Jez Ng authored
XCode 12 ships with mismatched platforms for these libraries, so this hack is necessary... Fixes PR49799. Reviewed By: #lld-macho, gkm, smeenai Differential Revision: https://reviews.llvm.org/D100913
-
Arthur Eubanks authored
FunctionAnalysisManagerCGSCCProxy should not be preserved if any of its keys may be invalid. Since we are not removing/adding functions in FuncAttrs, it's fine to preserve it. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D100893
-
Jim Radford authored
Changing global flags can break builds of projects that include/build llvm as a sub-project, as the effect is global. Ideally we would disable this warning at the directory level instead, but the obvious way (disabling warning D9025) isn't supported. At least we can limit the effect to only MSVC. Patch by Jim Radford. Differential Revision: https://reviews.llvm.org/D100900
-
Reid Kleckner authored
Revert "[InstCombine] Recognize `((x * y) s/ x) !=/== y` as an signed multiplication overflow check (PR48769)" This reverts commit 13ec913b. This commit introduces new uses of the overflow checking intrinsics that depend on implementations in compiler-rt, which Windows users generally do not link against. I filed an issue (somewhere) to make clang auto-link the builtins library to resolve this situation, but until that happens, it isn't reasonable for the optimizer to introduce new link time dependencies.
-
Matthias Springer authored
The current implementation allows for TransferWriteOps with broadcasts that do not make sense. E.g., a broadcast could write a vector into a single (scalar) memory location, which is effectively the same as writing only the last element of the vector. Differential Revision: https://reviews.llvm.org/D100842
-
Philip Reames authored
This reverts commit d87b9b81. Post commit review raised concerns, reverting while discussion happens.
-
Dávid Bolvanský authored
-
Roman Lebedev authored
I forgot about the case where we sign-extend to width smaller than the original. This reverts commit 1e6ca23a.
-
Roman Lebedev authored
I forgot about the case where we sign-extend to width smaller than the original. This reverts commit 41b71f71.
-
Philip Reames authored
It used to be that all of our intrinsics were call instructions, but over time, we've added more and more invokable intrinsics. According to the verifier, we're up to 8 right now. As IntrinsicInst is a sub-class of CallInst, this puts us in an awkward spot where the idiomatic means to check for intrinsic has a false negative if the intrinsic is invoked. This change switches IntrinsicInst from being a sub-class of CallInst to being a subclass of CallBase. This allows invoked intrinsics to be instances of IntrinsicInst, at the cost of requiring a few more casts to CallInst in places where the intrinsic really is known to be a call, not an invoke. After this lands and has baked for a couple days, planned cleanups: Make GCStatepointInst a IntrinsicInst subclass. Merge intrinsic handling in InstCombine and use idiomatic visitIntrinsicInst entry point for InstVisitor. Do the same in SelectionDAG. Do the same in FastISEL. Differential Revision: https://reviews.llvm.org/D99976 -
Mehdi Chinoune authored
Removes alternate spelling 'not' with '!'. Reviewed by: ashermancinelli, awarzynski, Meinersbur Differential revision: https://reviews.llvm.org/D100442
-
Roman Lebedev authored
This is a more convoluted form of the same pattern "sext of NSW trunc", but in this case the operand of trunc was a right-shift, and the truncation chops off just the zero bits that were shifted-in.
-
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
-