- Jan 18, 2024
-
-
Simon Pilgrim authored
This helps ensure the encoding details are next to the EVEX tag Noticed while preparing to add more constant commenting as part of #73783 and #71078
-
Jannik Silvanus authored
`ValueAsMetadata::handleRAUW` is a mechanism to replace all metadata referring to one value by a different value. Relax an assert that used to enforce the old and new value to have the same type. This seems to be a sanity plausibility assert only, as the implementation actually supports mismatching types. This is motivated by a downstream mechanism where we use poison ValueAsMetadata values to annotate pointee types of opaque pointer function arguments. When replacing one type with a different one to work around DXIL vs LLVM incompatibilities, we need to update type annotations, and handleRAUW is more efficient than creating new MD nodes.
-
stephenpeckham authored
-
Luke Lau authored
Everytime an extension is added, this test will need to have the negative extension appended to multiple CHECK lines where we're overriding the arch. This is quite time consuming since it needs to be in the right order, so this replaces the explicit list of negative extensions with a regexp instead.
-
Dominik Adamski authored
Typo in test: openmp/libomptarget/test/offloading/fortran/basic-target-parallel-do.f90
-
Quinn Dawkins authored
Similar to `transform.get_result`, except it returns a handle to the operand indicated by a positional specification, same as is defined for the linalg match ops. Additionally updates `get_result` to take the same positional specification. This makes the use case of wanting to get all of the results of an operation easier by no longer requiring the user to reconstruct the list of results one-by-one.
-
cor3ntin authored
To avoid any possible confusion with the notion of pure function and the gnu::pure attribute.
-
Dominik Adamski authored
Added test which proves that end-to-end compilation of `omp target parallel do` costruct is successful for Flang compiler.
-
Leandro Lupori authored
Check for DEFAULT_SYSROOT, because when it is set -isysroot has no effect.
-
Timm Baeder authored
In CheckConstant(), consider that in C++98 const variables may not be read at all, and diagnose that accordingly.
-
Piotr Sobczak authored
Support new amdgcn_global_load_tr instructions for load with transpose. * MC layer support for GLOBAL_LOAD_TR_B64/GLOBAL_LOAD_TR_B128 * Intrinsic int_amdgcn_global_load_tr * Clang builtins amdgcn_global_load_tr*
-
Vassil Vassilev authored
This patch brings back the basic support for C by inserting the required for value printing runtime only when we are in C++ mode. Additionally, it defines a new overload of operator placement new because we can't really forward declare it in a library-agnostic way. Fixes the issue described in llvm/llvm-project#69072.
-
Guillaume Chatelet authored
-
Sergio Afonso authored
Just a minimal readability improvement that we overlooked during refactoring.
-
Jay Foad authored
-
Krzysztof Parzyszek authored
This moves the lowering of the nested evaluations all the way to the bottom of the call stack. This PR does not attempt to change the leaf lowering functions beyond placing the call to `genEval` in there. Whether the nested evaluations should be lowered for any given op depends on the context in which that op is created, hence a `genNested` parameter was added. Contexts in which nested evaluations should not be lowered are during lowering of composite constructs, such as PARALLEL SECTIONS. This particular case is considered a block construct tied to the SECTIONS directive, and the lowering code will first create an empty parallel op, and then recursively lower the SECTIONS code. Similar situations occur when lowering most (if not all) compound/composite constructs. Recursive lowering [4/5]
-
Jay Foad authored
New pseudos were added for instructions that were natively VOP3 on GFX11: V_ADD_F64_pseudo, V_MUL_F64_pseudo, V_MIN_NUM_F64, V_MAX_NUM_F64, V_LSHLREV_B64_pseudo --------- Co-authored-by:Mirko Brkusanin <Mirko.Brkusanin@amd.com>
-
Vlad Serebrennikov authored
The test checks that objects in arrays are destructed in reverse order during stack unwinding. This patch is trying to establish a precedent how codegen tests for C++ defect report test suite should be written. Refer to PR for exact reasoning.
-
Mariusz Sikora authored
- image_atomic_pk_add_f16 - image_atomic_pk_add_bf16 - ds_pk_add_bf16 - ds_pk_add_f16 - ds_pk_add_rtn_bf16 - ds_pk_add_rtn_f16 - flat_atomic_pk_add_f16 - flat_atomic_pk_add_bf16 - global_atomic_pk_add_f16 - global_atomic_pk_add_bf16 - buffer_atomic_pk_add_f16 - buffer_atomic_pk_add_bf16
-
Mariusz Sikora authored
Endoding is VOP3P. Tagged as deep/machine learning instructions. i32 type (v4fp8 or v4bf8 packed in i32) is used for src0 and src1. src0 and src1 have no src_modifiers. src2 is f32 and has src_modifiers: f32 fneg(neg_lo[2]) and f32 fabs(neg_hi[2]). --------- Co-authored-by:Petar Avramovic <Petar.Avramovic@amd.com>
-
Timm Baeder authored
Add a new emitComplexReal() helper function and use that for the new casts as well as the old __real implementation.
-
Guillaume Chatelet authored
Another patch is needed to cover `DyadicFloat` and `NormalFloat` constructors.
-
Yingwei Zheng authored
InstCombine already handles the pattern `(shl ShVal, (X & (Width - 1))) | (lshr ShVal, ((-X) & (Width - 1)))`. Under certain circumstances, `X & (Width - 1)` will be simplified to `X`. Therefore, this patch adds support for the pattern `(shl ShVal, X) | (lshr ShVal, ((-X) & (Width - 1)))`. Alive2: https://alive2.llvm.org/ce/z/P7JQ2V
-
Congcong Cai authored
Fixes: https://github.com/llvm/llvm-project/issues/78076 Alive2 Proof: https://alive2.llvm.org/ce/z/XEDy0f
-
paperchalice authored
Reverts llvm/llvm-project#70912. This breaks some bazel tests.
-
Simon Pilgrim authored
We had the same helper function in shuffle decode / vector constant code - move this to X86InstrInfo to avoid duplication.
-
Alexey Lapshin authored
This patch is extracted from #74725. Both dwarflinkers contain similar classes for indexed values. Move the code into the DWARFLinkerBase.
-
Jie Fu authored
llvm-project/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1539:10: error: unused variable 'SWaitInst' [-Werror,-Wunused-variable] auto SWaitInst = ^ 1 error generated. -
Paul Osmialowski authored
The most recent changes to `omp_lib.h.var` have re-introduced some compatibility issues that had to be fixed due to the similar changes in the past. Namely: 1. D120707 has removed the "use omp_lib_kinds" statement and replaced it with import 2. D114537 added line continuation to the long lines This patch introduces the same kind of changes in order to restore compatibility with some more restrictive Fortran compilers so their users could still benefit from the LLVM's OpenMP Fortran library.
-
Utkarsh Saxena authored
### Problem ```cpp co_task<int> coro() { int a = 1; auto lamb = [a]() -> co_task<int> { co_return a; // 'a' in the lambda object dies after the iniital_suspend in the lambda coroutine. }(); co_return co_await lamb; } ``` [use-after-free](https://godbolt.org/z/GWPEovWWc) Lambda captures (even by value) are prone to use-after-free once the lambda object dies. In the above example, the lambda object appears only as a temporary in the call expression. It dies after the first suspension (`initial_suspend`) in the lambda. On resumption in `co_await lamb`, the lambda accesses `a` which is part of the already-dead lambda object. --- ### Solution This problem can be formulated by saying that the `this` parameter of the lambda call operator is a lifetimebound parameter. The lambda object argument should therefore live atleast as long as the return object. That said, this requirement does not hold if the lambda does not have a capture list. In principle, the coroutine frame still has a reference to a dead lambda object, but it is easy to see that the object would not be used in the lambda-coroutine body due to no capture list. It is safe to use this pattern inside a`co_await` expression due to the lifetime extension of temporaries. Example: ```cpp co_task<int> coro() { int a = 1; int res = co_await [a]() -> co_task<int> { co_return a; }(); co_return res; } ``` --- ### Background This came up in the discussion with seastar folks on [RFC](https://discourse.llvm.org/t/rfc-lifetime-bound-check-for-parameters-of-coroutines/74253/19?u=usx95). This is a fairly common pattern in continuation-style-passing (CSP) async programming involving futures and continuations. Document ["Lambda coroutine fiasco"](https://github.com/scylladb/seastar/blob/master/doc/lambda-coroutine-fiasco.md) by Seastar captures the problem. This pattern makes the migration from CSP-style async programming to coroutines very bugprone. Fixes https://github.com/llvm/llvm-project/issues/76995 --------- Co-authored-by:Chuanqi Xu <yedeng.yd@linux.alibaba.com>
-
Florian Hahn authored
Replacing a free extension with 2 or more extensions unnecessarily increases the number of IR instructions without providing any benefits. It also unnecessarily causes operations to be performed on wider types than necessary. In some cases, the extra extensions also pessimize codegen (see bfis-in-loop.ll). The changes in arm64-codegen-prepare-extload.ll also show that we avoid promotions that should only be performed in stress mode. PR: https://github.com/llvm/llvm-project/pull/77094
-
Jay Foad authored
Update SIMemoryLegalizer and SIInsertWaitcnts to use separate wait instructions per counter (e.g. S_WAIT_LOADCNT) and split VMCNT into separate LOADCNT, SAMPLECNT and BVHCNT counters.
-
Jay Foad authored
-
Jay Foad authored
-
Jay Foad authored
https://github.com/llvm/llvm-project/pull/70634 has disabled use of potentially negative scratch offsets, but we can use it on GFX12. --------- Co-authored-by:
Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
-
pvanhout authored
-
Alexey Lapshin authored
This patch renames values of dsymutil/llvm-dwarfutil options: --linker apple -> --linker classic --linker llvm -> --linker parallel The purpose to rename options is to avoid using vendor names and to match with library names. It should be safe to rename options at current stage as they are not seemed widely used(we may not preserve backward compatibility).
-
Kerry McLaughlin authored
-
Nikita Popov authored
Resolve the two FIXMEs: Perform the binop identitiy fold with AllowRHSConstant, and remove redundant folds later in the code.
-
Guillaume Chatelet authored
-