- Nov 22, 2023
-
-
Arthur Eubanks authored
Since goma is going away soon, we need to experiment with other wrappers. We can clean up the goma stuff once it's fully non-functional.
-
Valentin Clement authored
-
Peiming Liu authored
-
Valentin Clement (バレンタイン クレメン) authored
HLFIR lowering as been set by default now and FIR lowering support will be removed in the near future. This patch removes the specific FIR check lines on declare tests.
-
Jeremy Morse authored
DPValues are the non-intrinsic replacements for dbg.values, and when an IR function is converted by SelectionDAG we need to convert the variable location information in the same way. Happily all the information is in the same format, it's just stored in a slightly different object, therefore this patch refactors a few things to store the set of {Variable,Expr,DILocation,Location} instead of just a pointer to a DbgValueInst. This also adds a hook in llc that's much like the one I've added to opt in PR #71937, allowing tests to optionally ask for the use RemoveDIs mode if support for it is built into the compiler. I've added that flag to a variety of SelectionDAG debug-info tests to ensure that we get some coverage on the RemoveDIs / debug-info-iterator buildbot. -
Nick Desaulniers authored
This reverts commit 42204c94. It was accidentally backed out. #20571 #70743
-
Momchil Velikov authored
This patch adds the quadword gather load intrinsics of the form sv<type>_t svld1q_gather_u64index_<typ>(svbool_t, const <type>_t *, svuint64_t); sv<type>_t svld1q_gather_u64base_index_<typ>(svbool_t, svuint64_t, int64_t); and the quadword scatter store intrinsics of the form void svst1q_scatter_u64index_<typ>(svbool_t, <type>_t *, svuint64_t, sv<type>_t); void svst1q_scatter_u64base_index_<typ>(svbool, svuint64_t, int64_t, sv<type>_t); ACLE spec: https://github.com/ARM-software/acle/pull/257
-
- Nov 21, 2023
-
-
Youngsuk Kim authored
Opaque ptr cleanup effort.
-
Erich Keane authored
These two constructs, 'enter data' and 'exit data', are novel compared to what is currently in the parser, as this is the first set implemented where the first token is itself not a valid construct. Because of this, it requires some additional work to do the first keyword parsing.
-
Fangrui Song authored
For a label difference like `.uleb128 A-B`, MC generates a pair of R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 if A-B cannot be folded as a constant. GNU assembler generates a pair of relocations in more cases (when A or B is in a code section with linker relaxation). `.uleb128 A-B` is primarily used by DWARF v5 .debug_loclists/.debug_rnglists (DW_LLE_offset_pair/DW_RLE_offset_pair entry kinds) implemented in Clang and GCC. `.uleb128 A-B` can be used in SHF_ALLOC sections as well (e.g. `.gcc_except_table`). This patch does not handle SHF_ALLOC. `-z dead-reloc-in-nonalloc=` can be used to change the relocated value, if the R_RISCV_SET_ULEB128 symbol is in a discarded section. We don't check the R_RISCV_SUB_ULEB128 symbol since for the expected cases A and B should be defined in the same input section.
-
Ivan Butygin authored
tan atan atanh sinh cosh asin asinh acos acosh atan2
-
Jessica Del authored
Fold any constant input to the `s_wqm` intrinsic.
-
Momchil Velikov authored
This patch adds a set of SVE2.1 quadword load/store intrisics: * Contiguous zero-extending load to quadword (single vector) sv<type>_t svld1uwq[_<typ>](svbool_t, const <type>_t *ptr); sv<type>_t svld1uwq_vnum[_<typ>](svbool_t, const <type> *ptr, int64_t vnum); sv<type>_t svld1udq[_<typ>](svbool_t, const <type>_t *ptr); sv<type>_t svld1udq_vnum[_<typ>](svbool_t, const <type>_t *ptr, int64_t vnum); * Contiguous truncating store of single vector operand void svst1uwq[_<typ>](svbool_t, const <type>_t *ptr, sv<type>_t data); void svst1uwq_vnum[_<typ>](svbool_t, const <type>_t *ptr, int64_t vnum, sv<type>_t data); void svst1udq[_<typ>](svbool_t, const <type>_t *ptr, sv<type>_t data); void svst1udq_vnum[_<typ>](svbool_t, const <type>_t *ptr, int64_t vnum, sv<type>_t data); * Gather load quadword sv<type>_t svld1q_gather[_u64base]_<typ>(svbool_t pg, svuint64_t zn); sv<type>_t svld1q_gather[_u64base]_offset_<typ>(svbool_t pg, svuint64_t zn, int64_t offset); * Scatter store quadword void svst1q_scatter[_u64base][_<typ>](svbool_t pg, svuint64_t zn, sv<type>_t data); void svst1q_scatter[_u64base]_offset[_<typ>](svbool_t pg, svuint64_t zn, int64_t offset, sv<type>_t data); * Contiguous load two, three or four quadword structures. sv<type>x2_t svld2q[_<typ>](svbool_t pg, const <type>_t *rn); sv<type>x2_t svld2q_vnum[_<typ>](svbool_t pg, const <type>_t *rn, uint64_t vnum); sv<type>x3_t svld3q[_<typ>](svbool_t pg, const <type>_t *rn); sv<type>x3_t svld3q_vnum[_<typ>](svbool_t pg, const <type>_t *rn, uint64_t vnum); sv<type>x4_t svld4q[_<typ>](svbool_t pg, const <type>_t *rn); sv<type>x4_t svld4q_vnum[_<typ>](svbool_t pg, const <type>_t *rn, uint64_t vnum); * Contiguous store two, three or four quadword structures. void svst2q[_<typ>](svbool_t pg, <type>_t *rn, sv<type>x2_t zt); void svst2q_vnum[_<typ>](svbool_t pg, <type>_t *rn, int64_t vnum, sv<type>x2_t zt); void svst3q[_<typ>](svbool_t pg, <type>_t *rn, sv<type>x3_t zt); void svst3q_vnum[_<typ>](svbool_t pg, <type>_t *rn, int64_t vnum, sv<type>x3_t zt); void svst4q[_<typ>](svbool_t pg, <type>_t *rn, sv<type>x4_t zt); void svst4q_vnum[_<typ>](svbool_t pg, <type>_t *rn, int64_t vnum, sv<type>x4_t zt); ACLE spec: https://github.com/ARM-software/acle/pull/257 Co-authored-by:Caroline Concatto <caroline.concatto@arm.com> Co-authored-by:
Hassnaa Hamdi <hassnaa.hamdi@arm.com>
-
Nikita Popov authored
In most cases we do not actually have to perform an index size adjustment. Don't perform any APInt operations in that case.
-
Brandon Wu authored
-
Oleksandr "Alex" Zinenko authored
Data layout queries may be issued for types whose size exceeds the range of 32-bit integer as well as for types that don't have a size known at compile time, such as scalable vectors. Use best practices from LLVM IR and adopt `llvm::TypeSize` for size-related queries and `uint64_t` for alignment-related queries. See #72678.
-
martinboehme authored
-
Boian Petkantchin authored
Add all-gather, all-reduce, all-to-all and reduce-scatter. These operations have device mesh semantics.
-
Nikita Popov authored
Whether this is valid depends on the bit widths of the involved integers. Fixes https://github.com/llvm/llvm-project/issues/72927.
-
Nikita Popov authored
The second test is a miscompile.
-
Florian Hahn authored
Add a test case where the AddRec for the pointers in the inner loop have the AddRec of the outer loop as start value. It is sufficient to subtract the start values (%dst, %src) of the outer AddRecs. This simplification will be done in a follow-up commit.
-
https://github.com/llvm/llvm-project/pull/70762smanna12 authored
Lit test generates different outputs for usage of __int128_t in clang-armv8-quick environment. This patch adds triple to fix the lit failure. ``` Step 5 (ninja check 1) failure: 1 unexpected failures 38623 expected passes 71 expected failures 36752 unsupported tests (failure) ******************** TEST 'Clang :: Sema/code_align.c' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/18/include -nostdsysteminc -fsyntax-only -verify=expected,c-local -x c /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c + /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 + -internal-isystem + /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/18/inclu + de -nostdsysteminc -fsyntax-only -verify=expected,c-local -x c + /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code + _align.c error: 'c-local-error' diagnostics expected but not seen: File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 79 (directive at /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c:78): 'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was (__int128_t)1311768467294899680ULL << 64 File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 89 (directive at /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c:88): 'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was -(__int128_t)1311768467294899680ULL << 64 error: 'c-local-error' diagnostics seen but not expected: File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 79: use of undeclared identifier '__int128_t' File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 89: use of undeclared identifier '__int128_t' 4 errors generated. ```
-
agozillon authored
This block of code was here to create pseudo handling of implicit captures in target regions to prevent gfortran test regressions and allow certain pieces of code to function, however, with the introduction of the IFA patch which adds proper handling of implicits by adding them to the map operands list alongside explicit mappings at the initial Fortran -> MLIR generation phase this should no longer be required and may cause some adverse affects at worse in the future.
-
Nico Weber authored
-
Florian Hahn authored
The current code incorrectly assumed that the absolute variable index needs to be at least 1, if the variable is != 0. This is incorrect, in case multiplying with Scale wraps. The code below already checks for wrapping properly, so just remove the incorrect assignment. Fixes https://github.com/llvm/llvm-project/issues/72831.
-
MaheshRavishankar authored
-
MaheshRavishankar authored
This reverts commit 95acb33b.
-
Nishant Mittal authored
Implements the `nexttoward`, `nexttowardf` and `nexttowardl` functions. Also, raise excepts required by the standard in `nextafter` functions. cc: @lntue
-
CarolineConcatto authored
This patch implements the builtins in Clang and the LLVM-IR intrinsic for the following: For BFADD , BFSUB, BFMAX, BFMIN, BFMAXNM and BFMINNM, for instance: svbfloat16_t svadd[_bf16]_m (svbool_t pg, svbfloat16_t zdn, svbfloat16_t zm); svbfloat16_t svadd[_bf16]_x (svbool_t pg, svbfloat16_t zdn, svbfloat16_t zm); svbfloat16_t svadd[_bf16]_z (svbool_t pg, svbfloat16_t zdn, svbfloat16_t zm); svbfloat16_t svadd[_n_bf16]_m (svbool_t pg, svbfloat16_t zdn, bfloat16_t zm); svbfloat16_t svadd[_n_bf16]_x (svbool_t pg, svbfloat16_t zdn, bfloat16_t zm); svbfloat16_t svadd[_n_bf16]_z (svbool_t pg, svbfloat16_t zdn, bfloat16_t zm); the add, could be replaced by sub, max, min, maxnm and minnm. For BFMUL: svbfloat16_t svmul[_bf16]_m(svbool_t pg, svbfloat16_t zdn, svbfloat16_t zm); svbfloat16_t svmul[_bf16]_x(svbool_t pg, svbfloat16_t zdn, svbfloat16_t zm); svbfloat16_t svmul[_bf16]_z(svbool_t pg, svbfloat16_t zdn, svbfloat16_t zm); svbfloat16_t svmul[_n_bf16]_m(svbool_t pg, svbfloat16_t zdn, bfloat16_t zm); svbfloat16_t svmul[_n_bf16]_x(svbool_t pg, svbfloat16_t zdn, bfloat16_t zm); svbfloat16_t svmul[_n_bf16]_z(svbool_t pg, svbfloat16_t zdn, bfloat16_t zm); svbfloat16_t svmul_lane[_bf16](svbfloat16_t zn, svbfloat16_t zm, uint64_t imm_idx); For BFCLAMP: svbfloat16_t svclamp[_bf16](svbfloat16_t op, svbfloat16_t min, svbfloat16_t max); For BFMLA and BFMLS svbfloat16_t svmla[_bf16]_m(svbool_t pg, svbfloat16_t zda, svbfloat16_t zn, svbfloat16_t zm); svbfloat16_t svmla[_bf16]_z(svbool_t pg, svbfloat16_t zda, svbfloat16_t zn, svbfloat16_t zm); svbfloat16_t svmla[_bf16]_x(svbool_t pg, svbfloat16_t zda, svbfloat16_t zn, svbfloat16_t zm); svbfloat16_t svmla[_n_bf16]_m(svbool_t pg, svbfloat16_t zda, svbfloat16_t zn, bfloat16_t zm); svbfloat16_t svmla[_n_bf16]_z(svbool_t pg, svbfloat16_t zda, svbfloat16_t zn, bfloat16_t zm); svbfloat16_t svmla[_n_bf16]_x(svbool_t pg, svbfloat16_t zda, svbfloat16_t zn, bfloat16_t zm); svbfloat16_t svmla_lane[_bf16](svbfloat16_t zda, svbfloat16_t zn, svbfloat16_t zm, uint64_t According to the PR#257[1] [1]ARM-software/acle#257 Co-authored-by:Matthew Devereau <matthew.devereau@arm.com>
-
Florian Hahn authored
Add test with GEP where the index may wrap.
-
Egor Zhdan authored
This upstreams more of the Clang API Notes functionality that is currently implemented in the Apple fork: https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes This adds the initial Clang APINotes infrastructure to Clang Sema and Clang Frontend. There will shortly be a follow-up patch with the actual usages of this API. I'm splitting these changes into separate PRs to keep the diffs easier to review.
-
Nikita Popov authored
We are already iterating over all assumes in AC, so handle operand bundle based assumes in the same loop, instead of querying them separately. To keep the debug counter working, make it work per-bundle rather than per-value.
-
LLVM GN Syncbot authored
-
Joseph Huber authored
Summary: This patch includes the necessary changes to make the `libc` tests running on AMD GPUs run using the newer code object version. The 'code object version' is AMD's internal ABI for making kernel calls. The move from 4 to 5 changed how we handle arguments for builtins such as obtaining the grid size or setting up the size of the private stack. Fixes: https://github.com/llvm/llvm-project/issues/72517
-
Martin Storsjö authored
Commit b963c0b6 fixed LTO compilation of cases where one translation unit is calling a function with the dllimport attribute, and another translation unit provides this function locally within the same linked module (i.e. not actually dllimported); see https://github.com/llvm/llvm-project/issues/37453 or https://bugs.llvm.org/show_bug.cgi?id=38105 for full context. This was fixed by aliasing their GlobalResolution structs, for the `__imp_` prefixed and non prefixed symbols. I believe this fix to be wrong. This patch reverts that fix, and fixes the same issue differently, within LLD instead. The fix assumed that one can treat the `__imp_` prefixed and unprefixed symbols as equal, referencing SVN r240620 (d7666535). However that referenced commit had mistaken how this logic works, which was corrected later in SVN r240622 (88e0f920); those symbols aren't direct aliases for each other - but if there's a need for the `__imp_` prefixed one and the other one exists, the `__imp_` prefixed one is created, as a pointer to the other one. However this fix only works if both translation units are compiled as LTO; if the caller is compiled as a regular object file and the callee is compiled as LTO, the fix fails, as the LTO compilation doesn't know that the unprefixed symbol is needed. The only level that knows of the potential relationship between the `__imp_` prefixed and unprefixed symbol, across regular and bitcode object files, is LLD itself. Therefore, revert the original fix from b963c0b6, and fix the issue differently - when concluding that we can fulfill an undefined symbol starting with `__imp_`, mark the corresponding non prefixed symbol as used in a regular object for the LTO compilation, to make sure that this non prefixed symbol exists after the LTO compilation, to let LLD do the fixup of the local import. Extend the testcase to test a regular object file calling an LTO object file, which previously failed. This change also fixes another issue; an object file can provide both unprefixed and prefixed versions of the same symbol, like this: void importedFunc(void) { } void (*__imp_importedFunc)(void) = importedFunc; That allows the function to be called both with and without dllimport markings. (The concept of automatically resolving a reference to `__imp_func` to a locally defined `func` only is done in MSVC style linkers, but not in GNU ld, therefore MinGW mode code often uses this construct.) Previously, the aliasing of global resolutions at the LTO level would trigger a failed assert with "Multiple prevailing defs are not allowed" for this case, as both `importedFunc` and `__imp_importedFunc` could be prevailing. Add a case to the existing LLD test case lto-imp-prefix.ll to test this as well. This change (together with previous change in 3ab6209a) completes LLD to work with mingw-w64-crt files (the base glue code for a mingw-w64 toolchain) built with LTO.
-
Gábor Spaits authored
As my BSc thesis I've implemented a checker for std::variant and std::any, and in the following weeks I'll upload a revised version of them here. # Prelude @Szelethus and I sent out an email with our initial plans here: https://discourse.llvm.org/t/analyzer-new-checker-for-std-any-as-a-bsc-thesis/65613/2 We also created a stub checker patch here: https://reviews.llvm.org/D142354. Upon the recommendation of @haoNoQ , we explored an option where instead of writing a checker, we tried to improve on how the analyzer natively inlined the methods of std::variant and std::any. Our attempt is in this patch https://reviews.llvm.org/D145069 , but in a nutshell, this is what happened: The analyzer was able to model much of what happened inside those classes, but our false positive suppression machinery erroneously suppressed it. After months of trying, we could not find a satisfying enhancement on the heuristic without introducing an allowlist/denylist of which functions to not suppress. As a result (and partly on the encouragement of @Xazax-hun) I wrote a dedicated checker! The advantage of the checker is that it is not dependent on the standard's implementation and won't put warnings in the standard library definitions. Also without the checker it would be difficult to create nice user-friendly warnings and NoteTags -- as per the standard's specification, the analysis is sinked by an exception, which we don't model well now. # Design ideas The working of the checker is straightforward: We find the creation of an std::variant instance, store the type of the variable we want to store in it, then save this type for the instance. When retrieving type from the instance we check what type we want to retrieve as, and compare it to the actual type. If the two don't march we emit an error. Distinguishing variants by instance (e.g. MemRegion *) is not the most optimal way. Other checkers, like MallocChecker uses a symbol-to-trait map instead of region-to-trait. The upside of using symbols (which would be the value of a variant, not the variant itself itself) is that the analyzer would take care of modeling copies, moves, invalidation, etc, out of the box. The problem is that for compound types, the analyzer doesn't create a symbol as a result of a constructor call that is fit for this job. MallocChecker in contrast manipulates simple pointers. My colleges and I considered the option of making adjustments directly to the memory model of the analyzer, but for the time being decided against it, and go with the bit more cumbersome, but immediately viable option of simply using MemRegions. # Current state and review plan This patch contains an already working checker that can find and report certain variant/any misuses, but still lands it in alpha. I plan to upload the rest of the checker in later patches. The full checker is also able to "follow" the symbolic value held by the std::variant and updates the program state whenever we assign the value stored in the variant. I have also built a library that is meant to model union-like types similar to variant, hence some functions being a bit more multipurpose then is immediately needed. I also intend to publish my std::any checker in a later commit. --------- Co-authored-by:
Gabor Spaits <gabor.spaits@ericsson.com> Co-authored-by:
Balazs Benics <benicsbalazs@gmail.com>
-
Simon Pilgrim authored
-
Simon Pilgrim authored
[CodeGen] getPointerMemTy - move FIXME to start of comment line so editors are more likely to detect it. NFC.
-
David Green authored
-
Abhina Sree authored
This revision fixes the following error on z/OS. `LLVM ERROR: IO failure on output stream: EDC5122I Input/output error.` I replace unconventional characters with characters that are within the ASCII range.
-