- Nov 21, 2023
-
-
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...
-
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...
-
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.
-
Joseph Huber authored
Summary: This patch provides the initial support to allow handling the new driver's offloading entries. Normally, the ELF target can emit varibles at C-identifier named sections and the linker will provide a pointer to the section. For COFF target, instead the linker merges sections containing a `$` in alphabetical order. We thus can emit these variables at sections and then emit two variables that are guaranteed to be sorted before and after the others to traverse it. Previous patches consolidated the handling of offloading entries so that this patch more easily can handle mapping them to the appropriate section. Ideally, the only remaining step to allow the new driver to run on Windows targets is to accurately map the following `ld.lld` arguments to their `llvm-link` equivalents. These are used inside the linker-wrapper, so we should simply need to remap the arguments to the same functionality if possible. ``` -o, -output -l, --library -L, --library-path -v, --version -rpath -whole-archive, -no-whole-archive ``` I have not tested this at runtime as I do not have access to a windows machine. This patch was adapted from some initial efforts in https://reviews.llvm.org/D137470.
-
Balázs Kéri authored
-
Ivan Butygin authored
-
Ivan Butygin authored
NoSignedWrap, NoUnsignedWrap, FPFastMathMode.
-
llongint authored
In GDB debugging, obtaining the assembly representation of MCInst is more intuitive.
-
Nikita Popov authored
I thought DT is required in BasicAA, but apparently it can be null in unit tests at least. This should fix the ubsan bot failures.
-
Nikita Popov authored
For Header we already have the DomTreeNode. For Backedge, fetch it only once.
-
ZhaoQi authored
Previously, bolt could not get FixupKind for BL correctly, because bolt cannot get target-flags for BL. Here just add support in MCCodeEmitter. Fixes https://github.com/llvm/llvm-project/pull/72826.
-
Florian Hahn authored
THe freezes are introduced to avoid branch on undef/poison, if any of the pointers may be poison. The same can be achieved by just freezing the compare, which reduces the number of freezes needed. See https://alive2.llvm.org/ce/z/NHa_ud Note that the individual compares need to be frozen and it is not sufficient to only freeze the resulting OR: Result OR frozen only (UNSOUND): https://alive2.llvm.org/ce/z/YzFHQY Individual conds frozen (SOUND): https://alive2.llvm.org/ce/z/5L6Z3f
-
Martin Storsjö authored
The commit 3ab6209a had the undesired effect of retaining every `__imp_` symbol, even if it isn't referenced in any way. Add a testcase to observe this behaviour, to serve as a reference point if this behaviour were to be improved later. Port the testcase from b963c0b6 from the llvm/LTO testsuite into LLD as a preparation for changing that fix; the moved testcase has a comment for one case which doesn't work currently. The testcase is ported mostly as is, but with symbol mangling simplified, rewriting function names from MSVC C++ mangling to plain C, and unnecessary debug info is removed. Add a case of a dllimported data symbol, in addition to the existing call of a dllimported function. Also extend the testcase to test combinations of both regular object files and LTO objects. Leave out one combination which currently fails, with a c...
-
Jeremy Morse authored
This pass steps through a block forwards and backwards, identifying those variable assignment records that are redundant, and erases them, saving us a decent wedge of compile-time. This patch re-implements it to use the replacement for DbgValueInsts, DPValues, in an almost identical way. Alas the test I've added the try-remove-dis flag to is the only one I've been able to find that manually runs this pass.
-
Momchil Velikov authored
[MachineSink][AArch64] Preserve debug location when rematerialising an instruction to replace a COPY (#72685) Fixes a regression in `tools/lldb-dap/optimized/TestDAP_optimized.py` caused by enabling "sink-and-fold" in MachineSink.
-
Florian Hahn authored
Use isKnownNonNegative for information transfer. This can improve results, in cases where ValueTracking can infer additional non-negative info, e.g. for phi nodes. This allows simplifying the check from https://github.com/llvm/llvm-project/issues/63126 by ConstraintElimination. It is also simplified by IndVarSimplify now; note the changes in llvm/test/Transforms/PhaseOrdering/loop-access-checks.ll, due to this now being simplified earlier.
-
CarolineConcatto authored
This patch implements the builtins in Clang and the LLVM-IR intrinsic for the following: EXTQ // Variants are also available for: // _s8, _s16, _u16, _s32, _u32, _s64, _u64 // _bf16, _f16, _f32, _f64 svuint8_t svextq_lane[_u8](svuint8_t zdn, svuint8_t zm, uint64_t imm); TBLQ and TBXQ // Variants are also available for: // _u8, _u16, _s16, _u32, _s32, _u64, _s64 // _bf16, _f16, _f32, _f64 svint8_t svtblq[_s8](svint8_t zn, svuint8_t zm); svint8_t svtbxq[_s8](svint8_t zn, svuint8_t zm); UZPQ1, UZPQ2, ZIPQ1 and ZIPQ2 // Variants are also available for: // _s8, _u16, _s16, _u32, _s32, _u64, _s64 // _bf16, _f16, _f32, _f64 svuint8_t svuzpq1[_u8](svuint8_t zn, svuint8_t zm); svuint8_t svuzpq2[_u8](svuint8_t zn, svuint8_t zm); svuint8_t svzipq1[_u8](svuint8_t zn, svuint8_t zm); svuint8_t svzipq2[_u8](svuint8_t zn, svuint8_t zm); PMOV // Variants are available for: // _s8, _u16, _s16, _s32, _u32, _s64, _u64 svbool_t svpmov_lane[_u8](svuint8_t zn, uint64_t imm); svbool_t svpmov[_u8](svuint8_t zn); // The immediate is zero svuint8_t svpmov_u8_z(svbool_t pn); // The immediate is zero // Variants are available for: // _s16, _s32, _u32, _s64, _u64 svuint16_t svpmov_lane[_u16]_m(svuint16_t zd, svbool_t pn, uint64_t imm); According to the PR#257[1] [1]ARM-software/acle#257 Co-authored-by:Hassnaa Hamdi <hassnaa.hamdi@arm.com>
-
Youngsuk Kim authored
Specialize `NoCFIValue::getType()` to give a more detailed type hint to clients. --------- Co-authored-by:Nikita Popov <github@npopov.com>
-
Aiden Grossman authored
This pass isn't used/tested anywhere in upstream LLVM, so remove it.
-
Aiden Grossman authored
This pass isn't used anywhere or tested anywhere upstream (it doesn't even have a create function), so remove it.
-
Aiden Grossman authored
This pass isn't used/tested upstream anywhere, so remove it.
-
Aiden Grossman authored
This pass isn't used/tested anywhere upstream, so remove it.
-
Aiden Grossman authored
This pass isn't used/tested upstream at all, so remove it.
-
Aiden Grossman authored
This pass isn't used/tested anywhere upstream, so remove it.
-
Aiden Grossman authored
This pass isn't used anywhere in upstream and thus doesn't have any test coverage. For these reasons, remove it.
-
Aiden Grossman authored
This pass isn't used anywhere in upstream and thus has no test coverage. For these reasons, remove it.
-
Nikita Popov authored
For calls, we are only interested in captures before the call, not captures by the call itself -- arguments that get passed to the call are checked explicitly. In particular, the current implementation is not optimal if the pointer is captured via a readonly argument -- in that case, we know that even if the argument is captured, the call will not modify the argument (at least not via that argument). Make this more precise by renaming to isCapturedBefore() and adding an OrAt argument that allows us to toggle whether to consider captures in the instruction itself or not.
-
Matthias Springer authored
This commit fixes a crash of the canonicalizer when there are slice ops with offset/size SSA values that have a negative constant value. Such ops are invalid if they are reachable and their offsets/sizes should not be folded to static integer values. (But such ops may appear in non-reachable block.) This commit fixes #71150.
-
Jessica Del authored
Add more test cases for `s_bitreplicate` constant folding.
-
Muhammad Omair Javaid authored
This patch disables parts of clang/test/Sema/code_align.c that need __int128_t to be defined. This will fix failures on Arm v7 buildbots due to #70762 Following bots are failing: https://lab.llvm.org/buildbot/#/builders/245 https://lab.llvm.org/buildbot/#/builders/178 https://lab.llvm.org/buildbot/#/builders/182 https://lab.llvm.org/buildbot/#/builders/186 https://lab.llvm.org/buildbot/#/builders/187
-