- Apr 01, 2021
-
-
Nick Desaulniers authored
This reverts commit 3cc3c0f8. Breaks non-linux platforms. https://reviews.llvm.org/D99556#2662706 Signed-off-by:
Nick Desaulniers <ndesaulniers@google.com>
-
Alexander Shaposhnikov authored
This diff is a preparation for fixing FunStabs (incorrect size calculation). std::map<uint32_t, InputSection*> (SubsectionMap) is replaced with a sorted vector + binary search. If .subsections_via_symbols is set this vector will contain the list of subsections, otherwise, the offsets will be used for calculating the symbols sizes. Test plan: make check-all Differential revision: https://reviews.llvm.org/D98837
-
Philip Reames authored
If we know we don't shift out bits (e.g. exact), all we need to know is that input is non-zero.
-
Philip Reames authored
-
Jian Cai authored
Clang currently only supports -Wa,--version when -no-integrated-as is used. This adds support to -Wa,--version with -integrated-as. Link: https://github.com/ClangBuiltLinux/linux/issues/1320 Reviewed By: nickdesaulniers, MaskRay Differential Revision: https://reviews.llvm.org/D99556
-
Philip Reames authored
-
Simonas Kazlauskas authored
This allows these optimisations to apply to e.g. `urem i16` directly before `urem` is promoted to i32 on architectures where i16 operations are not intrinsically legal (such as on Aarch64). The legalization then later can happen more directly and generated code gets a chance to avoid wasting time on computing results in types wider than necessary, in the end. Seems like mostly an improvement in terms of results at least as far as x86_64 and aarch64 are concerned, with a few regressions here and there. It also helps in preventing regressions in changes like {D87976}. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D88785 -
Craig Topper authored
[RISCV] Add UnsupportedSchedZfh multiclass to reduce duplicate lines from RISCVSchedRocket.td and RISCVSchedSiFive7.td. NFC
-
YangKeao authored
While probing stack, the stack register is moved without dwarf information, which could cause panic if unwind the backtrace. This commit only add annotation for the inline stack probe case. Dwarf information for the loop case should be done in another patch and need further discussion. Reviewed By: nagisa Differential Revision: https://reviews.llvm.org/D99579
-
natashaknk authored
Lowering reciprocal and sigmoid elementwise operations to linalg dialect. Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D99676
-
Jianzhou Zhao authored
This was not set from when the wrapper was introduced. Reviewed By: gbalats Differential Revision: https://reviews.llvm.org/D99678
-
Thomas Preud'homme authored
LLVM test Transforms/InferFunctionAttrs/annotate contains two RUN invokation (UNKNOWN and NVPTX lines) which involve a CHECK-NOT directive with a variable not defined by the enabled CHECK prefixes. This commit fixes that by: - enabling CHECK prefix for unknown target with specialisation when it differs from other targets - checking for absence of bcmp with any attribute for NVPTX Reviewed By: tra Differential Revision: https://reviews.llvm.org/D99589
-
Roman Lebedev authored
-
Philip Reames authored
This reverts commit 2c3cf62d. Causes build failures on x86_64, will respond to commit thread with link errors.
-
Aaron Puchert authored
That's how it was originally intended but that wasn't possible because we still needed to support older CMake versions. The problem here is that the sources in TableGenGlobalISel are meant to be linked into both llvm-tblgen and TableGenTests (a unit test), but not be part of LLVM proper. So they shouldn't be an ordinary LLVM component. Because they are used in llvm-tblgen, they can't draw in the LLVM dylib dependency, but then we'd have to do the same thing in TableGenTests to make sure we don't link both a static Support library and another copy through the LLVM dylib. With an object library we're just reusing the object files and don't have to care about dependencies at all. Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D74588
-
Alexey Bataev authored
Need to bitcast the function pointer passed as a parameter to the real type to avoid possible problem with calling conventions. Differential Revision: https://reviews.llvm.org/D99521
-
Alexey Bataev authored
No need to consider hint clause kind as the main atomic clause kind at the codegen. Differential Revision: https://reviews.llvm.org/D99611
-
Philip Reames authored
-
Jez Ng authored
This reuses the approach (and some code) from LLD-ELF. It's a decent win when linking chromium_framework on a Mac Pro (3.2 GHz 16-Core Intel Xeon W): N Min Max Median Avg Stddev x 20 4.58 4.83 4.66 4.6685 0.066591844 + 20 4.42 4.61 4.5 4.505 0.04751731 Difference at 95.0% confidence -0.1635 +/- 0.0370242 -3.5022% +/- 0.793064% (Student's t, pooled s = 0.0578462) The output binary is 381MB. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D99279 -
Jez Ng authored
The functionality was originally added in {D95265}, but the test in that diff only checked if `-ObjC` would cause bitcode containing ObjC class symbols to be loaded. It neglected to test for bitcode containing categories but no class symbols. This diff also changes the lto-archive.ll test to use `-why_load` instead of inspecting the output binary's symbol table. This is motivated by the stacked diff {D99105}, which will hide irrelevant bitcode symbols. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D99215 -
Alexey Bataev authored
-
Craig Topper authored
There's an assert right before that makes sure the size already matches. Earlier in this function's life, scalars and vectors shared more code.
-
Andrew Young authored
If an operation has been inserted as a key in to the known values hashtable, then it can not be modified in a way which changes its hash. This change avoids modifying the operands of any previously recorded operation, which prevents their hash from changing. In an SSACFG region, it is impossible to visit an operation before visiting its operands, so this is not a problem. This situation can only happen in regions without strict dominance, such as graph regions. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D99486
-
George Mitenkov authored
When folding addo/subo with undef, the current convention is to use { -1, false } for addo and { 0, false } for subo. This was fixed for InstSimplify in https://reviews.llvm.org/rGf094d65beaa492e845b03561eddd75b5be653a01, but not in ConstantFolding. Reviewed By: nikic, lebedev.ri Differential Revision: https://reviews.llvm.org/D99564 -
Alexey Bataev authored
-
peter klausler authored
f18 was emitting a bogus error message about the lack of a TARGET attribute when a pointer was initialized with a component of a variable that was a legitimate TARGET. Differential Revision: https://reviews.llvm.org/D99665
-
Huihui Zhang authored
Use SetVector instead of SmallPtrSet to track values with uniform use. Doing this can help avoid non-determinism caused by iterating over unordered containers. This bug was found with reverse iteration turning on, --extra-llvm-cmake-variables="-DLLVM_REVERSE_ITERATION=ON". Failing LLVM test consecutive-ptr-uniforms.ll . Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D99549
-
Suraj Sudhir authored
Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D99628
-
Petr Hosek authored
This helper method is useful even outside of Gnu toolchains, so move it to ToolChain so it can be reused in other toolchains such as Fuchsia. Differential Revision: https://reviews.llvm.org/D88452
-
Thomas Lively authored
Removes the prototype builtin and intrinsic for i64x2.eq and implements that instruction as well as the other i64x2 comparison instructions in the final SIMD spec. Unsigned comparisons were not included in the final spec, so they still need to be scalarized via a custom lowering. Differential Revision: https://reviews.llvm.org/D99623
-
Juneyoung Lee authored
This is a patch teaching ValueTracking that `s/u*.with.overflow` intrinsics do not create undef/poison and they propagate poison. I couldn't write a nice example like the one with ctpop; ValueTrackingTest.cpp were simply updated to check these instead. This patch helps reducing regression while fixing https://llvm.org/pr49688 . Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D99671
-
Philip Reames authored
This fixes an issue introduced with my change d4648e, and reported in pr49768. The root problem is that dominance collapses in unreachable code, and that LoopInfo explicitly only models reachable code. Since the recurrence matcher doesn't filter by reachability (and can't easily because not all consumers have domtree), we need to bailout before assuming that finding a recurrence implies we found a loop.
-
Craig Topper authored
The default expansion creates a MUL and either a MULHS/MULHU. Each of those separately expand to sequences that use one or more PMULLW instructions as well as additional instructions to extend the types to vXi16. The MULHS/MULHU expansion computes the whole 16-bit product, but only keeps the high part. We can improve the lowering of SMULO/UMULO for some cases by using the MULHS/MULHU expansion, but keep both the high and low parts. And we can use those parts to calculate the overflow. For AVX512 we might have vXi1 overflow outputs. We can improve those by using vpcmpeqw to produce a k register if AVX512BW is enabled. This is a little better than truncating the high result to use vpcmpeqb. If we don't have avx512bw we can extend up to v16i32 to use vpcmpeqd to produce a k register. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D97624
-
Shimin Cui authored
On ppc64 linux , MachineLICM will hoist caller preserved registers, including TOC loads of the global variable address, out of loops. This is to enable this on AIX for both ppc64 and ppc32. Differential Revision: https://reviews.llvm.org/D99076
-
Craig Topper authored
We previously couldn't optimize out a TEST if the branch/setcc/cmov used the overflow flag. This patches allows the TEST to be removed if the flag producing instruction is known to clear the OF flag. Thats what the TEST instruction would have done so that should be equivalent. Need to add test cases. I'll try to get back to this if I have bandwidth. Fixes PR48768. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D94856
-
Wael Yehia authored
in this patch we add a new libLTO API to specify debug options independent of an lto_code_gen_t. This allows clients to pass codegen flags (through libLTO) which otherwise today are ignored. Reviewed By: steven_wu Differential Revision: https://reviews.llvm.org/D92611
-
Craig Topper authored
Our CLZW isel pattern is quite easily broken by surrounding code preventing it from matching sometimes. This usually results in failing to remove the and X, 0xffffffff inserted by type legalization. The add with -32 that type legalization also inserts will often gets combined into other add/sub nodes. That doesn't usually result in extra code when we don't use clzw. CTTZ seems to be less fragile, but I wanted to keep it consistent with CTLZ. Reviewed By: asb, HsiangKai Differential Revision: https://reviews.llvm.org/D99317
-
Jay Foad authored
-
Jay Foad authored
-
Craig Topper authored
[RISCV] Add isel patterns to select vsub_vx intrinsic to vadd.vi if it uses a small enough immediate Also modify the simm5_plus1 check because Imm-1 is UB if Imm happens to be INT64_MIN. I don't think the compiler would optimize based on that in this usage, but it could fail UBSan or -ftrapv. Reviewed By: HsiangKai, frasercrmck Differential Revision: https://reviews.llvm.org/D99637
-