- May 20, 2021
-
-
Simon Pilgrim authored
This will make it easier to track address offsets in folded loads/broadcasts of subvectors
-
Luke authored
Check if it is legal to vectorize reduction. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D99509
-
David Sherwood authored
When attempting to return something like a <vscale x 1 x i32> type from a function we end up trying to widen the vector by inserting a <vscale x 1 x i32> subvector into an undefined <vscale x 4 x i32> vector. However, during legalisation we then attempt to widen the INSERT_SUBVECTOR operands and hit an error in WidenVectorOperand. This patch adds a new WidenVecOp_INSERT_SUBVECTOR function that currently only supports inserting subvectors into undefined vectors. Differential Revision: https://reviews.llvm.org/D102501
-
Nicolas Vasilache authored
Instead, use createOrFold builders which result in more static information available. Differential Revision: https://reviews.llvm.org/D102832
-
Matthias Springer authored
Also add a minimal test case for vector.print. Differential Revision: https://reviews.llvm.org/D102826
-
Heejin Ahn authored
We have been handling filters and landingpads incorrectly all along. We pass clauses' (catches') types to `__cxa_find_matching_catch` in JS glue code, which returns the thrown pointer and sets the selector using `setTempRet0()`. We apparently have been doing the same for filters' (exception specs') types; we pass them to `__cxa_find_matching_catch` just the same way as clauses. And `__cxa_find_matching_catch` treats all given types as clauses. So it is a little surprising; maybe we intended to do something from the JS side and didn't end up doing? So anyway, I don't think supporting exception specs in Emscripten EH is a priority, but this can actually cause incorrect results for normal catches when functions are inlined and the inlined spec type has a parent-child relationship with the catch's type. --- The below is an example of a bug that can happen when inlining and class hierarchy is mixed. If you are busy you can skip this part: ``` struct A {}; struct B : A {}; void bar() throw (B) { throw B(); } void foo() { try { bar(); } catch (A &) { fputs ("Expected result\n", stdout); } } ``` In the unoptimized code, `bar`'s landingpad will have a filter for `B` and `foo`'s landingpad will have a clause for `A`. But when `bar` is inlined into `foo`, `foo`'s landingpad has both a filter for `B` and a clause for `A`, and it passes the both types to `__cxa_find_matching_catch`: ``` __cxa_find_matching_catch(typeinfo for B, typeinfo for A) ``` `__cxa_find_matching_catch` thinks both are clauses, and looks at the first type `B`, which belongs to a filter. And the thrown type is `B`, so it thinks the first type `B` is caught. But this makes it return an incorrect selector, because it is supposed to catch the exception using the second type `A`, which is a parent of `B`. As a result, the `foo` in the example program above does not print "Expected result" but just throws the exception to the caller. (This wouldn't have happened if `A` and `B` are completely disjoint types, such as `float` and `int`) Fixes https://bugs.llvm.org/show_bug.cgi?id=50357. Reviewed By: dschuff, kripken Differential Revision: https://reviews.llvm.org/D102795 -
Caroline Concatto authored
Differential Revision: https://reviews.llvm.org/D102490
-
serge-sans-paille authored
llvm::Any::TypeId::Id relies on the uniqueness of the address of a static variable defined in a template function. hidden visibility implies vague linkage for that variable, which does not guarantee the uniqueness of the address across a binary and a shared library. This totally breaks the implementation of llvm::Any. Ideally, setting visibility to llvm::Any::TypeId::Id should be enough, unfortunately this doesn't work as expected and we lack time (before 12.0.1 release) to understand why setting the visibility to llvm::Any does work. See https://gcc.gnu.org/wiki/Visibility and https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html for more information on that topic. Differential Revision: https://reviews.llvm.org/D101972
-
Andrew Savonichev authored
bswap.v2i16 + sitofp in LLVM IR generate a sequence of: - REV32 + USHR for bswap.v2i16 - SHL + SSHR + SCVTF for sext to v2i32 and scvt The shift instructions are excessive as noted in PR24820, and they can be optimized to just SSHR. Differential Revision: https://reviews.llvm.org/D102333
-
Tobias Gysi authored
Stack allocate at most two ScalarAssign elements. Using the default number of inlined elements triggered a static assert in some setups (https://reviews.llvm.org/D102075). Differential Revision: https://reviews.llvm.org/D102827
-
Haojian Wu authored
getSourceText could return an empty string for error cases (e.g. invalid source locaiton), this patch makes the code more robust. The crash did happen in our internal codebase, but unfortunately I didn't manage to get a reproduce case. One thing I can confirm from the core dump is that the crash is caused by calling isRawStringLiteral on an empty Text. Differential Revision: https://reviews.llvm.org/D102770
-
Amara Emerson authored
-
Simon Giesecke authored
Differential Revision: https://reviews.llvm.org/D102224
-
Vitaly Buka authored
sleep(1) does not guaranty afterfork order. Also relative child/parent afterfork order is not important for this test so we can just avoid checking that. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D102810
-
Xiang1 Zhang authored
This reverts commit 81c18ce0.
-
Sergey Dmitriev authored
That fixes a problem of using bundler with file names starting with dash. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D102752
-
Xiang1 Zhang authored
In LAM model X86_64 will use bits 57-62 (of 0-63) as HWASAN tag. So here we make sure the tag shift position and tag mask is correct for x86-64. Differential Revision: https://reviews.llvm.org/D102472
-
Sergey Dmitriev authored
Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D102823
-
Johannes Doerfert authored
If a test does not contain an " simd" but -fopenmp-simd RUN lines we can just check that we do not create __kmpc|__tgt calls. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D101973
-
Zhiwei Chen authored
Currently 1 byte global object has a ridiculous 63 bytes redzone. This patch reduces the redzone size to be less than 32 if the size of global object is less than or equal to half of 32 (the minimal size of redzone). A 12 bytes object has a 20 bytes redzone, a 20 bytes object has a 44 bytes redzone. Reviewed By: MaskRay, #sanitizers, vitalybuka Differential Revision: https://reviews.llvm.org/D102469
-
Jon Roelofs authored
-
River Riddle authored
The current implementation has several key limitations and weirdness, e.g local reproducers don't support dynamic pass pipelines, error messages don't include the passes that failed, etc. This revision refactors the implementation to support more use cases, and also be much cleaner. The main change in this revision, aside from moving the implementation out of Pass.cpp and into its own file, is the addition of a crash recovery pass instrumentation. For local reproducers, this instrumentation handles setting up the recovery context before executing each pass. For global reproducers, the instrumentation is used to provide a more detailed error message, containing information about which passes are running and on which operations. Example of new message: ``` error: Failures have been detected while processing an MLIR pass pipeline note: Pipeline failed while executing [`TestCrashRecoveryPass` on 'module' operation: @foo]: reproducer generated at `crash-recovery.mlir.tmp` ``` Differential Revision: https://reviews.llvm.org/D101854
-
River Riddle authored
This flag will print the IR after a pass only in the case where the pass failed. This can be useful to more easily view the invalid IR, without needing to print after every pass in the pipeline. Differential Revision: https://reviews.llvm.org/D101853
-
Fangrui Song authored
-
Fangrui Song authored
`clang -fpic -fno-semantic-interposition` may set dso_local on variables for -fpic. GCC folks consider there are 'address interposition' and 'semantic interposition', and 'disabling semantic interposition' can optimize function calls but cannot change variable references to use local aliases (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100483). This patch removes dso_local for variables in `clang -fpic -fno-semantic-interposition` mode so that the built shared objects can work with copy relocations. Building llvm-project tiself with -fno-semantic-interposition (D102453) should now be safe with trunk Clang. Example: ``` // a.c int var; int *addr() { return var; } // old: cannot be interposed movslq .Lvar$local(%rip), %rax // new: can be interposed movq var@GOTPCREL(%rip), %rax movslq (%rax), %rax ``` The local alias lowering for `GlobalVariable`s is kept in case there is a future option allowing local aliases. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D102583
-
Richard Smith authored
satisfaction. Previously we used the rules for constant folding in a non-constant context, meaning that we'd incorrectly accept foldable non-constant expressions and that std::is_constant_evaluated() would evaluate to false.
-
LLVM GN Syncbot authored
-
Sam Clegg authored
Ensure that both SyntheticMergedChunk and all MergeInfoChunks that it comprises are assigned the correct output section. Without this we would crash when outputting relocations in --relocatable mode. Fixes: https://github.com/emscripten-core/emscripten/issues/14220 Differential Revision: https://reviews.llvm.org/D102806
-
Ahmed Bougacha authored
To track security issues, we're starting with the chromium bug tracker (using the llvm project there). We considered using Github Security Advisories. However, they are currently intended as a way for project owners to publicize their security advisories, and aren't well-suited to reporting issues. This also moves the issue-reporting paragraph to the beginning of the document, in part to make it more discoverable, in part to allow the anchor-linking to actually display the paragraph at the top of the page. Note that this doesn't update the concrete list of security-sensitive areas, which is still an open item. When we do, we may want to move the list of security-sensitive areas next to the issue-reporting paragraph as well, as it seems like relevant information needed in the reporting process. Finally, when describing the discission medium, this splits the topics discussed into two: the concrete security issues, discussed in the issu...
-
Jon Roelofs authored
Differential revision: https://reviews.llvm.org/D102452
-
Ryan Prichard authored
The ROR instruction can only handle immediates between 1 and 31. The would-be encoding for ROR #0 is actually the RRX instruction. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D102455
-
Petr Hosek authored
When using distributions, targets that aren't included in any distribution don't need to be as optimized as targets that are included since those targets are typically only used for tests. We might consider avoiding LTO for these targets altogether, see https://lists.llvm.org/pipermail/llvm-dev/2021-April/149843.html Differential Revision: https://reviews.llvm.org/D102732
-
hasheddan authored
Updates a minor typo in vector dialect documentation. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D101203
-
Martin Storsjö authored
This reverts commit 2919222d. That commit broke backwards compatibility. Additionally, the replacement, -Wa,-mimplicit-it, isn't yet supported by any stable release of Clang. See D102812 for a fix for the error cases when callers specify both -mimplicit-it and -Wa,-mimplicit-it.
-
Vitaly Buka authored
-
Aart Bik authored
Skip the sparsification pass for Linalg ops without annotated tensors (or cases that are not properly handled yet). Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D102787
-
River Riddle authored
We allow stealing up to 3 bits of pointers to BaseStorage, so we need to make sure that we align by at least 8.
-
Marius Brehler authored
Reviewed By: sjarus Differential Revision: https://reviews.llvm.org/D102802
-
Sean Silva authored
Also, fix a small typo where the "unsigned" splat variants were not being created with an unsigned type. Differential Revision: https://reviews.llvm.org/D102797
-
wlei authored
This change tries to fix a place missing `moveAndDanglePseudoProbes `. In FoldValueComparisonIntoPredecessors, it folds the BB into predecessors and then marked the BB unreachable. However, the original logic from the BB is still alive, deleting the probe will mislead the SampleLoader mark it as zero count sample. Reviewed By: hoy, wenlei Differential Revision: https://reviews.llvm.org/D102721
-