- Jan 13, 2022
-
-
Denys Shabalin authored
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D117222
-
David Spickett authored
This was left over from when I had used some pointer authentication instructions to sign the pointer. Then I realised that simply setting the top byte is enough to prove the ABI plugin is being called. Top byte ignore is a feature of the armv8-a architecure and doesn't need any extra compiler flags.
-
Eugene Zhulenev authored
Reviewed By: cota Differential Revision: https://reviews.llvm.org/D117162
-
Sam McCall authored
The AST doesn't track their locations, and the default behavior of attributing them to the lexically-enclosing node is sloppy and often inaccurate. Also add a couple of passing test cases for declarators that weren't obvious. Differential Revision: https://reviews.llvm.org/D117185
-
Jon Chesterfield authored
D97446 changed the behaviour of 'used'. Compensate. Reviewed By: ronlieb Differential Revision: https://reviews.llvm.org/D117211
-
Nikita Popov authored
This case is automatically handled if ConstantFoldLoadFromConstPtr() is used. Make sure that ConstantFoldLoadFromConst() also handles it.
-
Petar Avramovic authored
-
Petar Avramovic authored
-
Sander de Smalen authored
Map Main ID part number 0xd40 to neoverse-v1, as described in the Neoverse-V1 Technical Reference Manual: https://developer.arm.com/documentation/101427/0101/Register-descriptions/AArch64-system-registers/MIDR-EL1--Main-ID-Register--EL1 Differential Revision: https://reviews.llvm.org/D117207
-
Sam McCall authored
When searching for AST nodes that may overlap the selection, mayHit() was only attempting to prune nodes whose begin/end are both in the main file. While failing to prune never gives wrong results, it hurts performance. In GTest unit-tests, `TEST()` macros at the top level declare classes. These were never pruned and we traversed *every* such class for any selection. We fix this by reasoning about what tokens such a node might claim. They must lie within its ultimate macro expansion range, so if this doesn't overlap with the selection, we can prune the node. Differential Revision: https://reviews.llvm.org/D116978
-
Kirill Bobyrev authored
The api for loadIndex changed but was not updated everywhere due to differences in the build configuration.
-
Simon Pilgrim authored
Partial element rotate patterns (e.g. for element insertion on Issue #53124) were being split if every lane wasn't crossing, but really there's a good repeated mask hiding in there.
-
Evgeny Mandrikov authored
Without this patch when using CMAKE_CXX_STANDARD=20 and MSVC 19.30.30705.0 compilation fails with clang\lib\Tooling\Syntax\Tree.cpp(347): error C2666: 'clang::syntax::Tree::ChildIteratorBase<clang::syntax::Tree::ChildIterator,clang::syntax::Node>::operator ==': 4 overloads have similar conversions clang\lib\Tooling\Syntax\Tree.cpp(392): error C2666: 'clang::syntax::Tree::ChildIteratorBase<clang::syntax::Tree::ChildIterator,clang::syntax::Node>::operator ==': 4 overloads have similar conversions Note that removed comment that "iterator_facade_base requires == to be a member" was made obsolete by change https://reviews.llvm.org/D78938 Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D116904
-
David Green authored
A lot of neon intrinsics work lane-wise, meaning that non-demanded elements in and not demanded out. This teaches that to AArch64TTIImpl::simplifyDemandedVectorEltsIntrinsic for some simple single-input truncate intrinsics, which can help remove unnecessary instructions. Differential Revision: https://reviews.llvm.org/D117097
-
Simon Pilgrim authored
Blend Insertion + Element Rotation pattern similar to Issue #53124
-
Javier Setoain authored
LLVM Dialect Constant Op translations assume that if the attribute is a vector, it's a fixed length one, generating an invalid translation for constant scalable vector initializations. Differential Revision: https://reviews.llvm.org/D117125
-
Alex Bradbury authored
This test case captures the current state of support for printing branch targets. Differential Revision: https://reviews.llvm.org/D116676
-
Florian Hahn authored
This makes the def-use relationship between VPCanonicalIVPHIRecipe and VPWidenCanonicalIVRecipe explicit. Needed for D117140.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
[MIPS] Mips16DAGToDAGISel::selectAddr - Use cast<> instead of dyn_cast<> to avoid dereference of nullptr The pointer is always dereferenced immediately below, so assert the cast is correct instead of returning nullptr
-
Hans Wennborg authored
Since 26c6a3e7, LLVM's inliner will "upgrade" the caller's stack protector attribute based on the callee. This lead to surprising results with Clang's no_stack_protector attribute added in 4fbf84c1 (D46300). Consider the following code compiled with clang -fstack-protector-strong -Os (https://godbolt.org/z/7s3rW7a1q). extern void h(int* p); inline __attribute__((always_inline)) int g() { return 0; } int __attribute__((__no_stack_protector__)) f() { int a[1]; h(a); return g(); } LLVM will inline g() into f(), and f() would get a stack protector, against the users explicit wishes, potentially breaking the program e.g. if h() changes the value of the stack cookie. That's a miscompile. More recently, bc044a88 (D91816) addressed this problem by preventing inlining when the stack protector is disabled in the caller and enabled in the callee or vice versa. However, the problem remained if the callee is marked always_inline as in the example above. This affected users, see e.g. http://crbug.com/1274129 and http://llvm.org/pr52886. One way to fix this would be to prevent inlining also in the always_inline case. Despite the name, always_inline does not guarantee inlining, so this would be legal but potentially surprising to users. However, I think the better fix is to not enable the stack protector in a caller based on the callee. The motivation for the old behaviour is unclear, it seems counter-intuitive, and causes real problems as we've seen. This commit implements that fix, which means in the example above, g() gets inlined into f() (also without always_inline), and f() is emitted without stack protector. I think that matches most developers' expectations, and that's also what GCC does. Another effect of this change is that a no_stack_protector function can now be inlined into a stack protected function, e.g. (https://godbolt.org/z/hafP6W856): extern void h(int* p); inline int __attribute__((__no_stack_protector__)) __attribute__((always_inline)) g() { return 0; } int f() { int a[1]; h(a); return g(); } I think that's fine. Such code would be unusual since no_stack_protector is normally applied to a program entry point which sets up the stack canary. And even if such code exists, inlining doesn't change the semantics: there is still no stack cookie setup/check around entry/exit of the g() code region, but there may be in the surrounding context, as there was before inlining. This also matches GCC. See also the discussion at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94722 Differential revision: https://reviews.llvm.org/D116589
-
Sebastian Neubauer authored
IR: - globals (and functions, ifuncs, aliases) can have a partition - catchret has a `to` before the label - the sint/int types do not exist - signext comes after the type - a variable was missing its type TableGen: - The second value after a `#` concatenation is optional See e.g. llvm/lib/Target/X86/X86InstrAVX512.td:L3351 - IncludeDirective and PreprocessorDirective were never referenced in the grammar - Add some missing ; - Parent classes of multiclasses can have generic arguments. Reuse the `ParentClassList` that is already used in other places. MIR: - liveins only allows physical registers, which start with a $ Differential Revision: https://reviews.llvm.org/D116674
-
Ivan Butygin authored
* This is useful when you need to build mixed array from external static/dynamic arrays (e.g. from adaptor during dialect conversion) * Also, to reduce C++ code in td and generated files Differential Revision: https://reviews.llvm.org/D117106
-
David Green authored
-
Ties Stuij authored
If you want to check for all uses of PAC, the SpillsLR argument to shouldSignReturnAddress should be true instead of false, as that value will be returned from the function if the other checks fall through. Reviewed By: miyuki Differential Revision: https://reviews.llvm.org/D116213
-
Hans Wennborg authored
The nounwind and uwtable attributes were just cluttering up the test. Using regexes to give symbolic names to the attribute lists make the test more readable. This is pre-committing parts of D116589.
-
Andrzej Warzynski authored
With https://reviews.llvm.org/D116731 merged, installing Clang, MLIR or LLVM is no longer required for standalone builds. For consistency sake, remove "installation" from the build instrucitons. Differential Revision: https://reviews.llvm.org/D117100
-
Michał Górny authored
Implement the qXfer:siginfo:read that is used to read the siginfo_t (extended signal information) for the current thread. This is currently implemented on FreeBSD and Linux. Differential Revision: https://reviews.llvm.org/D117113
-
Nikita Popov authored
We need to check that the load/store type is also the same, as this is no longer implicitly checked through the pointer type.
-
Paulo Matos authored
Implement support for matching an index from a WebAssembly CALL instruction. Add test. Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D115327
-
Jay Foad authored
Change FileCheck to accept patterns like "[[[var...]]" and treat the excess open brackets at the start as literals. This makes the patterns for matching assembler output with literal brackets much cleaner. For example an AMDGPU pattern that used to be written like: buffer_store_dwordx2 v{{\[}}[[LO]]:[[HI]]{{\]}} can now be: buffer_store_dwordx2 v[[[LO]]:[[HI]]] (Even before this patch the final close bracket did not need to be wrapped in {{}}, but people tended to do it anyway for symmetry.) This does not introduce any ambiguity since "[[" was always followed by an identifier or '@' or '#', so "[[[" was always an error. I've included a few test updates in this patch just for illustration and testing. There are a couple of hundred tests that could be updated as a follow up, mostly in test/CodeGen/. Differential Revision: https://reviews.llvm.org/D117117 Change-Id: Ia6bc6f65cb69734821c911f54a43fe1c673bcca7 -
David Sherwood authored
When we know the value we're extending is a negative constant then it makes sense to use SIGN_EXTEND because this may improve code quality in some cases, particularly when doing a constant splat of an unpacked vector type. For example, for SVE when splatting the value -1 into all elements of a vector of type <vscale x 2 x i32> the element type will get promoted from i32 -> i64. In this case we want the splat value to sign-extend from (i32 -1) -> (i64 -1), whereas currently it zero-extends from (i32 -1) -> (i64 0xFFFFFFFF). Sign-extending the constant means we can use a single mov immediate instruction. New tests added here: CodeGen/AArch64/sve-vector-splat.ll I believe we see some code quality improvements in these existing tests too: CodeGen/AArch64/dag-numsignbits.ll CodeGen/AArch64/reduce-and.ll CodeGen/AArch64/unfold-masked-merge-vector-variablemask.ll The apparent regressions in CodeGen/AArch64/fast-isel-cmp-vec.ll only occur because the test disables codegen prepare and branch folding. Differential Revision: https://reviews.llvm.org/D114357
-
Florian Hahn authored
This is a NFC change split off from D116123, as suggested there. D116123 will remove the last user of CreateSplatIV.
-
Kévin Petit authored
Add a variant of the clspv target that is built using spir64. This is a pre-requisite to supporting spir64 in clspv which is required to take advantage of SPV_KHR_physical_storage_buffer which in turn enables more OpenCL C programs to be compiled with clspv. https://reviews.llvm.org/D116668
-
David Sherwood authored
If we are inserting into or extracting from a scalable vector we do not know the number of elements at runtime, so we can only let the index wrap for fixed-length vectors. Tests added here: Analysis/CostModel/AArch64/sve-insert-extract.ll Differential Revision: https://reviews.llvm.org/D117099
-
Sam McCall authored
Differential Revision: https://reviews.llvm.org/D117036
-
Vladislav Khmelevsky authored
Do nothing on R_AARCH64_NONE relocation. The relocation is used by BOLT when re-linking the final binary. It is used as a dummy relocation hack in order to stop the RuntimeDyld to skip the allocation of the section. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D117066
-
David Sherwood authored
In practice we don't expect to see the get.active.lane.mask intrinsic being used for fixed-width vectors, but we should at least be able to generate code for it. This patch simply adds some fixed-width tests to an existing file: CodeGen/AArch64/active_lane_mask.ll Differential Revision: https://reviews.llvm.org/D116644
-
Adrian Kuegel authored
-