- Mar 28, 2021
-
-
Craig Topper authored
I'm prepping another patch to the same tests and this just adds noise to my diff.
-
Fangrui Song authored
This is incorrect (adding a path with unrelated libraries) but benign in practice because previous paths take precedence.
-
Fangrui Song authored
Neither vanilla nor Debian GCC has the patch, which usually duplicates $sysroot/usr/lib.
-
Craig Topper authored
[RISCV] Add a pattern for (sext_inreg (mul (and X, 0xffffffff), (and Y, 0xffffffff)), i32) to suppress MULW formation We have a special pattern for (mul (and X, 0xffffffff), (and Y, 0xffffffff)), to optimize the ANDs to shift. But if a sext_inreg coms first, we'll form a MULW and limit the effectiveness of the special match. So this patch adds a larger pattern to suppress the MULW formation by emitting a sext.w and then the same output we use for the (mul (and X, 0xffffffff), (and Y, 0xffffffff)). This should all get CSEd. This is the issue I was trying to fix with D99029, but that affected many more tests.
-
Nikita Popov authored
The current linear expression decomposition handles zext/sext by decomposing the casted operand, and then checking NUW/NSW flags to determine whether the extension can be distributed. This has some disadvantages: First, it is not possible to perform a partial decomposition. If we have zext((x + C1) +<nuw> C2) then we will fail to decompose the expression entirely, even though it would be safe and profitable to decompose it to zext(x + C1) +<nuw> zext(C2) Second, we may end up performing unnecessary decompositions, which will later be discarded because they lack nowrap flags necessary for extensions. Third, correctness of the code is not entirely obvious: At a high level, we encounter zext(x -<nuw> C) in the form of a zext on the linear expression x + (-C) with nuw flag set. Notably, this case must be treated as zext(x) + -zext(C) rather than zext(x) + zext(-C). The code handles this correctly by speculatively zexting constants to the final bitwidth, and performing additional fixup if the actual extension turns out to be an sext. This was not immediately obvious to me. This patch inverts the approach: An ExtendedValue represents a zext(sext(V)), and linear expression decomposition will try to decompose V further, either by absorbing another sext/zext into the ExtendedValue, or by distributing zext(sext(x op C)) over a binary operator with appropriate nsw/nuw flags. At each step we can determine whether distribution is legal and abort with a partial decomposition if not. We also know which extensions we need to apply to constants, and don't need to speculate or fixup.
-
Christopher Di Bella authored
moves tests into directories matching their stable names so that the tests can reflect the concept name Differential Revision: https://reviews.llvm.org/D99104
-
Aaron Puchert authored
Currently we want to allow calling non-const methods even when only a shared lock is held, because -Wthread-safety-reference is already quite sensitive and not all code is const-correct. Even if it is, this might require users to add std::as_const around the implicit object argument. See D52395 for a discussion. Fixes PR46963.
-
Florian Hahn authored
-
Florian Hahn authored
Mark a few methods as const, as they do not modify any state.
-
Alex Reinking authored
Use the CMake 3.13 features of CMakeConfigPackageHelpers to generate LLVMConfigVersion.cmake with proper architecture detection, major+minor version matching, etc. Differential Revision: https://reviews.llvm.org/D99451
-
Fangrui Song authored
-
KareemErgawy-TomTom authored
This patch folds the following pattern: ``` %arg0 = ... %0 = zexti %arg0 : i1 to i8 %1 = trunci %0 : i8 to i1 ``` into just `%arg0`. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D99453
-
Nico Weber authored
-
Jan Svoboda authored
This patch enables cc1 argument round-trip for assert builds. It can be disabled by building clang with `-DCLANG_ROUND_TRIP_CC1_ARGS=OFF`. This will be committed only if we reach consensus in https://lists.llvm.org/pipermail/cfe-dev/2021-February/067714.html. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D97462
-
- Mar 27, 2021
-
-
Simon Pilgrim authored
Remove VBROADCAST/MOVDDUP/splat-shuffle handling from foldShuffleOfHorizOp This can all be handled by canonicalizeShuffleMaskWithHorizOp along as we check that the HADD/SUB are only used once (to prevent infinite loops on slow-horizop targets which will try to reuse the nodes again followed by a post-hop shuffle).
-
Joel E. Denny authored
For example, <https://lab.llvm.org/buildbot/#/builders/132/builds/3929> has this diagnostic: ``` /opt/gcc/9.3.0/snos/include/g++/bits/stl_tree.h:780:8: error: static assertion failed: comparison object must be invocable as const 780 | is_invocable_v<const _Compare&, const _Key&, const _Key&>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
-
Joel E. Denny authored
In input dump annotations, `check:2'1` indicates diagnostic 1 for the `CHECK` directive on check file line 2. Without this patch, `-dump-input` computes the diagnostic index with the assumption that FileCheck *consecutively* produces all diagnostics for the same pattern. Already, that can be a false assumption, as in the examples below. Moreover, it seems like a brittle assumption as FileCheck evolves. Finally, it actually complicates the implementation even if it makes it slightly more efficient. This patch avoids that assumption. Examples below show results after applying this patch. Before applying this patch, `'N` is omitted throughout these examples because the implementation doesn't notice there's more than one diagnostic per pattern. First, `CHECK-LABEL` violates the assumption because `CHECK-LABEL` tries to match twice, and other directives can match in between: ``` $ cat check CHECK: foobar CHECK-LABEL: foobar $ FileCheck -vv check < input |& tail -8 <<<<<< 1: text 2: foobar label:2'0 ^~~~~~ check:1 ^~~~~~ label:2'1 X error: no match found 3: text >>>>>> ``` Second, `--implicit-check-not` is obviously processed many times among other directives: ``` $ cat check CHECK: foo CHECK: foo $ FileCheck -vv -dump-input=always -implicit-check-not=foo \ check < input |& tail -16 <<<<<< 1: text not:imp1'0 X~~~~ 2: foo check:1 ^~~ not:imp1'1 X 3: text not:imp1'1 ~~~~~ 4: foo check:2 ^~~ not:imp1'2 X 5: text not:imp1'2 ~~~~~ 6: eof:2 ^ >>>>>> ``` Reviewed By: thopre, jhenderson Differential Revision: https://reviews.llvm.org/D97813 -
Nikita Popov authored
While explicit sext instructions were handled correctly, the implicit sext that occurs if the offset is smaller than the pointer size blindly assumed that sext(X * Scale + Offset) is the same as sext(X) * Scale + Offset, which is obviously not correct. Fix this by extracting the code that handles linear expression extension and reusing it for the implicit sext as well.
-
Nikita Popov authored
A number of variables need to be correctly initialized on entry to GetLinearExpression() for the implementation to behave reasonably. The fact that SExtBits can currenlty be non-zero on entry is a bug, as demonstrated by the added test: For implicit sexts by the GEP, we do currently skip legality checks.
-
Nikita Popov authored
Currently, we'd produce an incorrect decomposition, because we already recursively called GetLinearExpression(), so the Scale=1, Offset=0 will not necessarily be relative to the shl itself. Now, this doesn't actually matter for functional correctness, because such a shift is poison anyway, so its okay to return an incorrect decomposition. It's still unnecessarily confusing though, and we can easily avoid this by checking the bitwidth earlier.
-
Nikita Popov authored
Nowrap flags between mul and shl differ in that mul nsw allows multiplication of 1 * INT_MIN, while shl nsw does not. This means that it is always fine to transfer shl nowrap flags to muls, but not necessarily the other way around. In this case the NUW/NSW results refer to mul/add operations, so it's fine to retain the flags from the shl.
-
Simon Pilgrim authored
See if the combined shuffle mask is equivalent to an identity shuffle, typically this is due to repeated LHS/RHS ops in horiz-ops, but isTargetShuffleEquivalent might see other patterns as well. This is another small step towards getting rid of foldShuffleOfHorizOp and relying on canonicalizeShuffleMaskWithHorizOp and generic shuffle combining.
-
Juneyoung Lee authored
This is a small patch to make FoldBranchToCommonDest poison-safe by default. After fc3f0c9c, only two syntactic changes are needed to fix unit tests. This does not cause any assembly difference in testsuite as well (-O3, X86-64 Manjaro). Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D99452
-
Sanjay Patel authored
This could crash in 2 ways: either one or both of the input vectors could be a different size than the math ops. https://llvm.org/PR49716
-
Alex Zinenko authored
Provide a registration mechanism for Linalg dialect-specific passes in C API and Python bindings. These are being built into the dialect library but exposed in separate headers (C) or modules (Python). Differential Revision: https://reviews.llvm.org/D99431
-
Juneyoung Lee authored
This is a minor fix to use m_LogicalAnd. This allows IRCE to recognize select form of and conditions as well.
-
Fangrui Song authored
sanitizer-ppc64le-linux is good while clang-ppc64le-linux has test failures due to GetStaticTlsRange(addr, size) set *addr is 0.
-
Jonas Devlieghere authored
Older watchOS SDKs *only* support i386 so we can't use x86_64/arm64 unconditionally.
-
George Burgess IV authored
This adds me as a Google representative for the LLVM security group. This was proposed, discussed, and voted on in the differential revision linked below; please see it for more information. Differential Revision: https://reviews.llvm.org/D99232
-
Jonas Devlieghere authored
This keeps breaking on my machine. It's time to move on.
-
Craig Topper authored
It's unlikely that FMADD and FMSUB would have different scheduling information so merge them. Reviewed By: HsiangKai Differential Revision: https://reviews.llvm.org/D99140
-
Hongtao Yu authored
During context promotion, intermediate nodes that are on a call path but do not come with a profile can be promoted together with their parent nodes. Do not print sample context string for such nodes since they do not have profile. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D99441
-
Joseph Huber authored
Summary: If the call to `synchronize` fails, it will currently block the stream indefinitely if execution is continued from this point. Additionally, if the program exits it will trigger an assertion on the non-null value of the async queue and prevent the runtime from printing debugging information. Reviewers: jdoerfert Differential Revision: https://reviews.llvm.org/D99443
-
Jacques Pienaar authored
Now that NoTerminator is possible this op can be removed/it was only needed structurally before. NFC.
-
Jonas Devlieghere authored
Remove UpdateISAToDescriptorMapFromMemory because it's dead code.
-
Chris Lattner authored
-
Jonas Devlieghere authored
This adds the consistency I promised in D99315 between how we read the class info from the Objective-C runtime and the shared cache. (NFC) Differential revision: https://reviews.llvm.org/D99446
-
Jez Ng authored
The test is similar to the one used for LLD-ELF. Differential Revision: https://reviews.llvm.org/D99318
-
Jez Ng authored
Summary: We needed to use `Joined` instead of `Flag`. This wasn't caught because the relevant test that was copied from LLD-ELF was still invoking LLD-ELF instead of LLD-MachO... Differential Revision: https://reviews.llvm.org/D99313
-
Jez Ng authored
Pretty simple code-wise. Also threw in some refactoring: * Put the functionStartSection under Writer instead of InStruct, since it doesn't need to be accessed outside of Writer * Adjusted the test to put all files under the temp dir instead of at the top-level * Added some CHECK-LABELs to make it clearer where the function starts data is Differential Revision: https://reviews.llvm.org/D99112
-