- Jun 29, 2020
-
-
Dmitri Gribenko authored
Summary: This file was exceeding a limit in MSVC: fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj Reviewers: erichkeane Reviewed By: erichkeane Subscribers: jmorse, gribozavr2, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82766
-
David Green authored
MVE has native reductions for integer add and min/max. The others need to be expanded to a series of extract's and scalar operators to reduce the vector into a single scalar. The default codegen for that expands the reduction into a series of in-order operations. This modifies that to something more suitable for MVE. The basic idea is to use vector operations until there are 4 remaining items then switch to pairwise operations. For example a v8f16 fadd reduction would become: Y = VREV X Z = ADD(X, Y) z0 = Z[0] + Z[1] z1 = Z[2] + Z[3] return z0 + z1 The awkwardness (there is always some) comes in from something like a v4f16, which is first legalized by adding identity values to the extra lanes of the reduction, and which can then not be optimized away through the vrev; fadd combo, the inserts remain. I've made sure they custom lower so that we can produce the pairwise additions before the extra values are added. Differential Revision: https://reviews.llvm.org/D81397
-
Simon Pilgrim authored
-
Dmitri Gribenko authored
This reverts commit e22cae32. It broke the build: FalsePositiveRefutationBRVisitorTest.cpp:112:3: error: use of undeclared identifier 'LLVM_WITH_Z3'
-
Bjorn Pettersson authored
Fixup of commit b925ca37 to allow building with -Werror -Wunused-function.
-
Balazs Benics authored
Adds the test infrastructure for testing the FalsePositiveRefutationBRVisitor. It will be extended in the D78457 patch, which demonstrates and fixes a bug in the visitor. Differential Revision: https://reviews.llvm.org/D78704
-
Simon Pilgrim authored
This patch extends MatchVectorAllZeroTest to handle OR vector reduction patterns where the result is compared against zero. Reapplied with a fix for a chromium regression due to a missing isNullConstant() check in combineSetCC: https://bugs.chromium.org/p/chromium/issues/detail?id=1097758 Fixes PR45378 Differential Revision: https://reviews.llvm.org/D81547
-
Nemanja Ivanovic authored
Most of the patterns for PPCISD::SCALAR_TO_VECTOR_PERMUTED require VSX. So don't emit them if the subtarget doesn't have VSX. This resolves the issue reported on https://reviews.llvm.org/rG1fed131660b2c5d3ea7007e273a7a5da80699445
-
Jonas Devlieghere authored
It's failing on the sanitized bot on GreenDragon.
-
Matt Arsenault authored
No tests were stressing the behavior for hasPassPointeeByValueAttr.
-
Sanjay Patel authored
binop i1 (cmp Pred (ext X, Index0), C0), (cmp Pred (ext X, Index1), C1) --> vcmp = cmp Pred X, VecC ext (binop vNi1 vcmp, (shuffle vcmp, Index1)), Index0 This is a larger pattern than the existing extractelement folds because we can't reasonably vectorize the sub-patterns with constants based on cost model calcs (it doesn't usually make sense to replace a single extracted scalar op with constant operand with a vector op). I salvaged as much of the existing logic as I could, but there might be better ways to share and reduce code. The motivating case from PR43745: https://bugs.llvm.org/show_bug.cgi?id=43745 ...is the special case of a 2-way reduction. We tried to get SLP to handle that particular pattern in D59710, but that caused crashing and regressions. This patch is more general, but hopefully safer. The v2f64 test with SSE2 surprised me - the cost model accounting looks like this: OldCost = 0 (free extract of f64 at index 0) + 1 (extract of f64 at index 1) + 2 (scalar fcmps) + 1 (and of bools) = 4 NewCost = 2 (vector fcmp) + 1 (shuffle) + 1 (vector 'and') + 1 (extract of bool) = 5 Differential Revision: https://reviews.llvm.org/D82474
-
Stephan Herhut authored
Differential Revision: https://reviews.llvm.org/D82750
-
Nathan James authored
Currently this alias instantiates the readability-identifier-naming check, just swap it out to use the readability-named-paramater check. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D82711
-
Bevin Hansson authored
Summary: Using the result semantic is wrong in some cases, such as unsigned fixed-point + signed integer. In this case, the result semantic is unsigned and the common semantic is signed. Reviewers: leonardchan Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82662
-
Matt Arsenault authored
Also fix an SSA violation in a test the MIRParser/verifier fails to catch. It's illegal to define a subregister in SSA. For the purpose of the test, it just needs to define the super-register to use the subregister in the use operand.
-
Jake Merdich authored
Summary: https://bugs.llvm.org/show_bug.cgi?id=46383 When the c preprocessor stringizes tokens, the generated string literals are affected by the whitespace. This means clang-format can affect codegen silently, adding spaces and newlines to strings. Practically speaking, the vast majority of cases will be harmless, only affecting single identifiers or debug macros. In the interest of doing no harm in other cases though, this introduces a blacklist option 'WhitespaceSensitiveMacros', which contains a list of names of function-like macros whose contents should not be touched by clang-format, period. Clang-format can't automatically detect these without a real compile context, so users will have to specify it explicitly (it still beats clang-format off'ing at every invocation). Defaults include "STRINGIZE", "PP_STRINGIZE", and "BOOST_PP_STRINGIZE". Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82620
-
Sanjay Patel authored
Preliminary for D82474
-
LLVM GN Syncbot authored
-
Luís Marques authored
Extracts the atomic pseudo-instructions' splitting from `riscv-expand-pseudo` / `RISCVExpandPseudo` into its own pass, `riscv-expand-atomic-pseudo` / `RISCVExpandAtomicPseudo`. This allows for the expansion of atomic operations to continue to happen late (the new pass is added in `addPreEmitPass2`, so those expansions continue to happen in the same place), while the remaining pseudo-instructions can now be expanded earlier and benefit from more optimization passes. The nonatomics pass is now added in `addPreSched2`. Differential Revision: https://reviews.llvm.org/D79635
-
Balázs Kéri authored
Summary: I do not like the BuiltinBug class. And it takes no SuppressOnSink parameter that may be needed in the future. Reviewers: Szelethus, baloghadamsoftware, gamesh411 Reviewed By: Szelethus Subscribers: rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82741
-
Pavel Labath authored
These functions all follow the same pattern. Use template functions to deduplicate.
-
Sven van Haastregt authored
OpenCL 2.0 does not allow block arguments, primarily because it is difficult to support function pointers on the various architectures that OpenCL targets. Clang was still accepting them. Rename and reuse the `err_opencl_half_param` diagnostic. Fixes PR46324. Differential Revision: https://reviews.llvm.org/D82313
-
Guillaume Chatelet authored
-
LLVM GN Syncbot authored
-
Guillaume Chatelet authored
Context: -------- There are places in LLVM where we need to pack typed fields into opaque values. For instance, the `XXXInst` classes in `llvm/include/llvm/IR/Instructions.h` that extract informations from `Value::SubclassData` via `getSubclassDataFromInstruction()`. The bit twiddling is done manually: this impairs readability and prevent consistent handling of out of range values (e.g. https://github.com/llvm/llvm-project/blob/435b458ad0a4630e6126246a6865748104ccad06/llvm/include/llvm/IR/Instructions.h#L564) More importantly, the bit pattern is scattered throughout the implementation making it hard to pack additionnal fields or check for overlapping bits. Design decisions: ----------------- The Bitfield structs are to be declared together so it is clear which bits are used or not. The code is designed with simplicity in mind, hence a few limitations: - Storage is limited to a single integer, - Enum values have to be `unsigned`, - Storage type has to be `unsigned`, - There are no automatic detection of overlapping fields (packed bitfield declaration should help though), - The interface is C like so `storage` needs to be passed in everytime (code is simpler and lifetime considerations more obvious) RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-June/142196.html Differential Revision: https://reviews.llvm.org/D81580
-
Sebastian Neubauer authored
It simplifies getting generic argument types from intrinsics. Differential Revision: https://reviews.llvm.org/D81084
-
Sander de Smalen authored
This patch proposes a naming convention for operations that take a general predicate (and are thus predicated) that specifies what happens to the false lanes. Currently the _PRED suffix is used, which doesn't really say much other than that it takes a predicate. In some instances this means it has merging predication and in other cases it means zeroing-predication. This patch also changes the order of operands to AArch64ISD::DUP_MERGE_PASSTHRU, to pass the predicate as the first operand, which is in line with all other predicates nodes. It takes the passthru value as an explicit passthru value, which is always passed as the last operand. Reviewers: paulwalker-arm, cameron.mcinally, eli.friedman, dancgr, efriedma Reviewed By: paulwalker-arm Tags: #llvm Differential Revision: https://reviews.llvm.org/D81850
-
Guillaume Chatelet authored
This patch makes access to `this` as a `T` uniform accross the file. Differential Revision: https://reviews.llvm.org/D82648
-
John Brawn authored
Commit a945037e moved the printing of the "PLEASE submit a bug report" message to the crash handler, but that means we don't print it when forcing a crash using FORCE_CLANG_DIAGNOSTICS_CRASH. Fix this by adding a function to get the bug report message and printing it when forcing a crash. Differential Revision: https://reviews.llvm.org/D81672
-
Guillaume Chatelet authored
This patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Differential Revision: https://reviews.llvm.org/D82743
-
Guillaume Chatelet authored
This patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Differential Revision: https://reviews.llvm.org/D82752
-
Simon Pilgrim authored
If a constant is only allsignbits in the demanded/active bits, then sign extend it to an allsignbits bool pattern for OR/XOR ops. This also requires SimplifyDemandedBits XOR handling to be modified to call ShrinkDemandedConstant on any (non-NOT) XOR pattern to account for non-splat cases. Next step towards fixing PR45808 - with this patch we now get a <-1,-1,0,0> v4i64 constant instead of <1,1,0,0>. Differential Revision: https://reviews.llvm.org/D82257
-
AndreyChurbanov authored
Differential Revision: https://reviews.llvm.org/D82301
-
Cullen Rhodes authored
Reviewers: sdesmalen, kmclaughlin, efriedma, david-arm, fpetrogalli Reviewed By: sdesmalen, fpetrogalli Differential Revision: https://reviews.llvm.org/D82391
-
Kerry McLaughlin authored
Summary: performPostLD1Combine will introduce either a LD1LANEpost or LD1DUPpost node, which will cause selection failure if the return type is a scalable vector. Reviewers: sdesmalen, c-rhodes, efriedma Reviewed By: efriedma Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82670
-
LLVM GN Syncbot authored
-
Dmitri Gribenko authored
Summary: Previously, AST Matchers tests were using a custom way to run a test with a specific C++ standard version. I'm migrating them to a shared infrastructure to specify a Clang target from libClangTesting. I'm also changing tests for AST Matchers to run in multiple language standards versions, and under multiple triples that have different behavior with regards to templates. To keep the size of the patch manageable, in this patch I'm only migrating one file to get the process started and get feedback on this approach. One caveat is that increasing the number of test configuration does significantly increase the runtime of AST Matchers tests. On my machine, the test runtime increases from 2.0 to 6.0s. I think it is worth the improved test coverage. Reviewers: jdoerfert, ymandel Reviewed By: ymandel Subscribers: gribozavr2, jfb, sstefan1, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82179
-
Simon Pilgrim authored
Pre-commit for D82257, this adds a DemandedElts arg to ShrinkDemandedConstant/targetShrinkDemandedConstant which will allow future patches to (optionally) add vector support.
-
Joachim Protze authored
Reviewed by: runlieb Differential Revision: https://reviews.llvm.org/D82452
-
Dmitri Gribenko authored
Summary: These tests show a bug: post-order traversal introduces an extra call to WalkUp*, that is not present in pre-order traversal. I'm fixing this bug in a follow-up commit. Reviewers: ymandel, eduucaldas Reviewed By: ymandel, eduucaldas Subscribers: gribozavr2, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82485
-