aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-19[TableGen] MacroFusionPredicatorEmitter - pass constant std::vector ↵Simon Pilgrim1-8/+9
arguments by ArrayRef instead Silence pass by value warnings Fixes #89210
2024-04-19[Clang] Fix the mangling of lambdas (#89204)cor3ntin5-9/+66
Lambdas used in the initializer of a local class were not mangling the name of the member. Fixes #88906
2024-04-19[MLIR][OpenMP] Verify loop wrapper properties of omp.parallel (#88722)Sergio Afonso3-1/+87
This patch extends verification of the `omp.parallel` operation to check it is correctly defined when taking a loop wrapper role. In OpenMP, a PARALLEL construct can be either a (potenially combined) block construct or a loop construct, when appearing as part of a composite construct. This is currently the case for the DISTRIBUTE PARALLEL DO/FOR and DISTRIBUTE PARALLEL DO/FOR SIMD exclusively. When used to represent the PARALLEL leaf of a composite construct, it must follow the rules of a wrapper loop operation in MLIR, and this is what this patch ensures. No additional restrictions are introduced for PARALLEL block constructs.
2024-04-19[Flang][OpenMP] NFC: Simplify handling of insertion points (#89221)Sergio Afonso3-12/+6
This patch replaces some `saveInsertionPoint`, `restoreInsertionPoint` call pairs for an `InsertionGuard` instance where it makes sense within Flang OpenMP lowering to make further modifications less error-prone.
2024-04-19[MLIR][LLVM] Add vector exception to composite type element ignore mode (#89385)Christian Ulmann2-2/+27
This commit fixes a bug in the DICompositeType element ignore mode. It seems that vectors require the presence of elements, as they otherwise do not pass the verifier.
2024-04-19[InstCombine] Regard zext nneg as sext when folding add(zext neg(add)) (#88887)ZelinMa5572-3/+40
fixes #88348 proof: https://alive2.llvm.org/ce/z/fJnM7t test will be added later --------- Signed-off-by: ZelinMa557 <3388706467@qq.com>
2024-04-19Reapply "[Clang][AArch64] Warn when calling non/streaming about vector size ↵Dinar Temirbulatov6-5/+184
difference (#79842)" This reverts commit 950bb097e11d6ee26533c00519c62df994322228
2024-04-19[mlir][ArmNeon] Update `LowerContractionToSMMLAPattern` to support proper ↵Kojo Acquah2-23/+118
unrolling for k dimension (#88591) Fixes correctness issue with current smmla unrolling patterns whereby unrolling K dimension would only include the result from the last tile along K. Updates patterns to feed previous smmla output of the previous tile into the next one along K.
2024-04-19[mlir][xegpu] XeGPU alias ops folder pass (#88886)Adam Siemieniuk11-0/+217
Adds a pass that folds aliasing ops into XeGPU ops.
2024-04-19[ClangOffloadBundler] Add file size to header (#88827)Yaxun (Sam) Liu4-31/+64
__hipRegisterFatBinary only accepts one pointer argument. It is expected to get the fat binary size from the header. This patch adds a file size field to the header of the compressed bundle.
2024-04-19[NFC][X86][Headers] Fix missing blank linePaul Robinson1-0/+1
It caused the \headerfile directive to be considered as part of the brief description in some of our tooling.
2024-04-19[flang][cuda] Allow if stmt in device subroutine (#89347)Valentin Clement (バレンタイン クレメン)2-0/+14
2024-04-19[analyzer] Fix stores through label locations (#89265)Balazs Benics3-3/+20
Interestingly, this case crashed from the very beginning of the project, at least starting by clang-3. As a "fix" I just do the same thing as we do for concrete integers. It might not be the best we could do, but arguably, it's still better than crashing. Fixes #89185
2024-04-19Add IIT_V10 to support 10-element vectors in intrinsics (#89383)Jay Foad2-0/+5
Needed for a future patch.
2024-04-19[Sema] Check if types are resolved before querying function description.Dinar Temirbulatov2-5/+32
2024-04-19Switch member calls to `isa/dyn_cast/cast/...` to free function calls. (#89356)Christian Sigg80-265/+241
This change cleans up call sites. Next step is to mark the member functions deprecated. See https://mlir.llvm.org/deprecation and https://discourse.llvm.org/t/preferred-casting-style-going-forward.
2024-04-19[clangd] Fix shared-lib builds after 2cdbc9cff3b7ef262Kadir Cetinkaya1-0/+1
2024-04-19AMDGPU: Use common check prefix in atomic expand testMatt Arsenault1-2403/+393
2024-04-19AMDGPU: Refactor unsafe atomicrmw remark emission (#89379)Matt Arsenault1-15/+18
Defers some of the setup work until the remark is actually emitted. Move big lambda into a helper function, and only use value capture of a pointer. Prepare to have different messages.
2024-04-19[OpenMP] Use half of available logical processors for collapse tests (#88319)Xing Xue1-6/+16
The new collapse test cases define `MAX_THREADS` to be 256 and use all available threads/logical processors on the system. This triples the testing time on an AIX machine that has 128 logical processors. This patch changes to use half of available logical processors to avoid over subscribing because there are other libomp tests running at the same time, including 2 other such collapse tests.
2024-04-19[AIX][Debug]correct the cases on AIX bot, NFCChen Zheng3-10/+16
Related to commit b2323f43e3cdb52b4e15a7d4f434cd5c64740dd4
2024-04-19[DAG] visitADDLike - update "(x - y) + -1 -> add (xor y, -1), x" fold to ↵Simon Pilgrim3-15/+13
accept UNDEF in a splat vector of -1 Make sure we use getNOT instead of reusing the allones (with undefs) vector
2024-04-19[AArch64][X86] xor.ll - fix vec_add_of_not_with_undef_decrement copy+pasta typoSimon Pilgrim2-15/+13
This was copied from vec_add_of_not_with_undef instead of vec_add_of_not_decrement - replacing the second sub with an add
2024-04-19[SystemZ] Add TPEI instruction and Associated Facility (#89372)Dominik Steenken8-4/+31
This PR adds the TPEI (Test Pending External Interruption) instruction, along with the facility that contains it. This is a millicoded system instruction that is not used for code generation, so it will be used exclusively by the Assembler and Disassembler. Accordingly, this commit also adds tests for both.
2024-04-19[KnownBits] Simplify optimality checking in unit tests. NFC. (#89368)Jay Foad1-43/+29
Use bool instead of function_ref.
2024-04-19[analyzer] Use explicit call description mode (easy cases) (#88879)NagyDonat7-24/+28
This commit explicitly specifies the matching mode (C library function, any non-method function, or C++ method) for the `CallDescription`s constructed in various checkers where this transition was easy and straightforward. This change won't cause major functional changes, but isn't NFC because it ensures that e.g. call descriptions for a non-method function won't accidentally match a method that has the same name. Separate commits will perform (or have already performed) this change in other checkers. My goal is to ensure that the call description mode is always explicitly specified and eliminate (or strongly restrict) the vague "may be either a method or a simple function" mode that's the current default.
2024-04-19[SystemZ] Fix Operand Retrieval for Vector Reduction Intrinsic in ↵Dominik Steenken1-14/+11
`shouldExpandReduction` (#88874) In the existing version, SystemZTTIImpl::shouldExpandReduction will create a `cast` error when handling vector reduction intrinsics that do not have the vector to reduce as their first operand, such as `llvm.vector.reduce.fadd` and `llvm.vector.reduce.fmul`. This commit fixes that problem by moving the cast into the case statement that handles the specific intrinsic, where the vector operand position is well-known.
2024-04-19[lldb] Make SBType::FindDirectNestedType work with expression ASTs (#89183)Pavel Labath7-31/+74
The types we get out of expressions will not have an associated symbol file, so the current method of looking up the type will fail. Instead, I plumb the query through the TypeSystem class. This correctly finds the type in both cases (importing it into the expression AST if needed). I haven't measured, but it should also be more efficient than doing a type lookup (at least, after the type has already been found once).
2024-04-19[SystemZ][z/OS] Implement llvm.frameaddr for XPLINK (#89284)Kai Nacke4-14/+105
The implementation follows the ELF implementation.
2024-04-19[MLIR][LLVM] Add flag to skip import of DICompositeType's elems (#89355)Christian Ulmann7-18/+65
This commit introduces a flag to allow skipping the potentially recursive import of DICompositeType elements. This patch is essentially a bandaid for the still broken recursive debug type import. Some of our downstream inputs are produced by excessive usage of template meta programming, and thus contain tens of thousands of types that all participate in such recursions. Unfortunately, the series of patches that introduces type support is not easily revertible due to being around for a while now and Modular depending on it. We can consider to revert this change once the type importer has show to be very performant, but for now we are talking second vs hours to import specific files.
2024-04-19[Flang][OpenMP] Issue error if reduction clause has proc-pointer (#88999)Kiran Chandramohan2-0/+27
OpenMP 5.2: Section 5.5.5: A procedure pointer must not appear in a reduction clause. Fixes #87915
2024-04-19[MLIR][DataLayout] Add support for scalable vectors (#89349)Christian Ulmann3-8/+36
This commit extends the data layout to support scalable vectors. For scalable vectors, the `TypeSize`'s scalable field is set accordingly, and the alignment information remains the same as for normal vectors. This behavior is in sync with what LLVM's data layout queries are producing. Before this change, scalable vectors incorrectly returned the same size as "normal" vectors.
2024-04-19[SLP]Fix final analysis for unsigned nodes.Alexey Bataev2-10/+20
Need to check that at least single bit is cleared for unsigned nodes before reducing their size. Otherwise they might be treated as signed in signed nodes.
2024-04-19[AArch64][SVE2] Generate SVE2 BSL instruction in LLVM for add/sub. (#88413)Dinar Temirbulatov2-2/+17
Allow to fold or/and-and to BSL instuction for scalable vectors.
2024-04-19Revert "[SLP]Fix final analysis for unsigned nodes."Mikhail Goncharov2-18/+9
This reverts commit 74e07ab523122d6a8347b25770062ab331b6bb84. It might be that Mask.getBitWidth() == Mask.countl_zero() (32 in my case) and zero bitwidth2 causes the crash.
2024-04-19[IR] Add support for trunc's nuw/nsw flags in `copyIRFlags` (#89353)Yingwei Zheng2-4/+25
This patch fixes https://github.com/llvm/llvm-project/pull/85592#issuecomment-2065865020. I found this while fixing flag propagation in my ["vectorizer"](https://github.com/dtcxzyw/llvm-codegen-benchmark/blob/main/vectorize.cpp).
2024-04-19MachineInstrBundle: modernize a couple of loops (NFC) (#89229)Ramkumar Ramachandra1-5/+2
2024-04-19[AMDGPU] Allow any linkage for dynlds (#84742)Pierre van Houtryve2-7/+40
Solves SWDEV-449592
2024-04-19[mlir][emitc] Restrict types in EmitC (#88391)Tina Jung5-26/+118
Restrict the types which are valid for EmitC operations. Use what is currently supported by the emitter as restriction. Define a utility functions for valid types, such that they can be used to restrict the operations in table gen as well as being available for reuse in dialect conversions.
2024-04-19[VPlan] Introduce recipes for VP loads and stores. (#87816)Florian Hahn8-181/+283
Introduce new subclasses of VPWidenMemoryRecipe for VP (vector-predicated) loads and stores to address multiple TODOs from https://github.com/llvm/llvm-project/pull/76172 Note that the introduction of the new recipes also improves code-gen for VP gather/scatters by removing the redundant header mask. With the new approach, it is not sufficient to look at users of the widened canonical IV to find all uses of the header mask. In some cases, a widened IV is used instead of separately widening the canonical IV. To handle that, first collect all VPValues representing header masks (by looking at users of both the canonical IV and widened inductions that are canonical) and then checking all users (recursively) of those header masks. Depends on https://github.com/llvm/llvm-project/pull/87411. PR: https://github.com/llvm/llvm-project/pull/87816
2024-04-19[AArch64] Remove invalid uabdl patterns. (#89272)David Green2-10/+48
These were added in https://reviews.llvm.org/D14208, which look like they attempt to detect abs from xor+add+ashr. They do not appear to be detecting the correct value for the src input though, which I think is intended to be the sub(zext, zext) part of the pattern. We have pattens from abs now, so the old invalid patterns can be removed. Fixes #88784
2024-04-19[NFC] [Serialization] Use semantical type 'DeclID' for 'CreateDeserialized'Chuanqi Xu15-173/+177
Previously we use 'unsigned' as the type of ID in 'CreateDeserialized'. And the type of `DeclID` in serialization is 'uint32_t', so there is minor inconsistency. Also more importantly, if we want to extend the type of DeclID from uint32_t to uint64_t, we may be in trouble due to we forgot updating the a lot of 'CreateDeserialized'. So this patch tries to use semantical type 'DeclID' for '*Decl::CreateDeserialized' to make sure it is tightly consistent.
2024-04-19[clang][dataflow][NFC] Fix code formatting in DataflowEnvironment.cpp (#89352)martinboehme1-8/+6
For some reason, when I merged #89235, two lines were mis-formatted. This patch corrects this; while I'm here, I'm also correcting other existing formatting errors.
2024-04-19[SPIR-V] SPIR-V Backend must generate a valid OCL version if working in ↵Vyacheslav Levytskyy2-10/+27
OpenCL environment (#89199) If there is no information about OpenCL version we are forced to generate OpenCL 1.0 by default for the OpenCL environment to avoid puzzling run-times with Unknown/0.0 version output. For a reference, LLVM-SPIRV Translator avoids potential issues with run-times in a similar manner.
2024-04-19[clang][nullability] Remove `RecordValue`. (#89052)martinboehme13-396/+130
This class no longer serves any purpose; see also the discussion here: https://reviews.llvm.org/D155204#inline-1503204 A lot of existing tests in TransferTest.cpp check for the existence of `RecordValue`s. Some of these checks are now simply redundant and have been removed. In other cases, tests were checking for the existence of a `RecordValue` as a way of testing whether a record has been initialized. I have typically changed these test to instead check whether a field of the record has a value.
2024-04-19[AIX][Debug] generate an error instead of crash in backend for -gdwarf-5Chen Zheng2-3/+10
Before this change -gdwarf-5 on AIX will cause backend crash, because some DWARF5 sections are not defined in XCOFF. Explicitly statement -gdwarf-5 as unsupported in frontend on AIX.
2024-04-19[clang][dataflow] Support `CXXParenListInitExpr` in ↵martinboehme4-29/+131
`PropagateResultObject()`. (#89235)
2024-04-19[test][AArch64][CodeGen] Delete redundant check lines in tiny-model-pic.ll ↵Daniil Kovalev1-162/+0
(#89243) Similarly to #87965, delete check lines which do not have corresponding FileCheck run lines in tiny-model-pic.ll (while having them tested in tiny-model-static.ll).
2024-04-19specify openmp lib in aix-toolchain-include.cpp testMikhail Goncharov1-14/+14
when unset -fopenmp tries to find the library itself and in some configurations this test fails fix for #88545 8f07a67f9731dfcd490f8aaefac34d95f207b39c
2024-04-19[clang][CodeGen] Fix shift-exponent ubsan check for signed _BitInt (#88004)Björn Pettersson2-10/+54
Commit 5f87957fefb21d454f2f (pull-requst #80515) corrected some codegen problems related to _BitInt types being used as shift exponents. But it did not fix it properly for the special case when the shift count operand is a signed _BitInt. The basic problem is the same as the one solved for unsigned _BitInt. As we use an unsigned comparison to see if the shift exponent is out-of-bounds, then we need to find an unsigned maximum allowed shift amount to use in the check. Normally the shift amount is limited by bitwidth of the LHS of the shift. However, when the RHS type is small in relation to the LHS then we need to use a value that fits inside the bitwidth of the RHS instead. The earlier fix simply used the unsigned maximum when deterining the max shift amount based on the RHS type. It did however not take into consideration that the RHS type could have a signed representation. In such situations we need to use the signed maximum instead. Otherwise we do not recognize a negative shift exponent as UB.