- Oct 27, 2023
-
-
Louis Dionne authored
This patch fixes an ASAN-found issue in std::basic_filebuf where we'd check the wrong size before proceeding to set our internal buffer to the externally-provided buffer, leading to the library trying to read from the incorrect buffer in underflow(). Thanks to Andrey Semin for the patch. Differential Revision: https://reviews.llvm.org/D154514
-
Louis Dionne authored
We did not mark std::begin/std::end as noexcept for C-style arrays, we did not have conditional noexcept on cbegin/cend, and we did not mark array cbegin/cend as constexpr in all Standard modes. Since this is a LWG issue, we should implement it as a DR in all Standard modes as usual. This patch fixes these issues and adds test coverage. Fixes #67471.
-
Igor Kirillov authored
Revert "[CodeGen] Improve ExpandMemCmp for more efficient non-register aligned sizes handling (#69942)" This reverts commit 9bcb30d3.
-
Richard Howell authored
When including builtin headers as part of a system module, ensure we use relative paths to those headers. Otherwise the module will fail to compile when specifying relative resource directories without extra search paths.
-
Andrzej Warzyński authored
Adds basic integration tests for `vector.contract` for the dot product and matvec operations. These tests exercise scalable vectors. Depends on https://github.com/llvm/llvm-project/pull/69845
-
LLVM GN Syncbot authored
-
Konstantin Varlamov authored
Avoid relying on sleep for synchronization.
-
Christudasan Devadasan authored
The insertion point determined by RA while attempting spills and liverange split at the beginning of a block goes wrong at times, and the newly inserted vector instructions are placed before the exec-mask restore instruction which is wrong. It occurs mainly due to the dependency on isBasicBlockPrologue that doesn't account early inserted instructions (spills and splits) during RA and causes the block prolog break. A better approach for deciding the insertion point should be worked out. For now, improving the helper function to consider all possible early insertions. This patch includes the spill instructions. The copies associated with liverange split should also be included in the block prolog.
-
Florian Hahn authored
This patch adds initial type inferrence for VPValues. It infers the scalar type of a VPValue, by bottom-up traversing through defining recipes until root nodes with known types are reached (e.g. live-ins or load recipes). The types are then propagated top down through operations. This is intended as building block for a VPlan-based cost model, which will need access to type information for VPValues/recipes. Initial testing is done by asserting the inferred type matches the type of the result value generated for a widen and replicate recipes.
-
Simon Pilgrim authored
-
Florian Hahn authored
Extra test for https://github.com/llvm/llvm-project/pull/69013
-
Pierre van Houtryve authored
Solves #70204
-
Kiran Chandramohan authored
Moving since this is almost an end to end test and covers multiple stages.
-
Florian Hahn authored
Fixes a crash after 0c8e5be6. Full type inference will be added in https://github.com/llvm/llvm-project/pull/69013
-
Andrzej Warzyński authored
Tests for conversions from `vector.contract` to `vector.outerproduct` for _matvec_ operations are updated with cases for scalable vectors. This patch updates one specific test file (there might be similar tests elsewhere): * vector-contract-to-outerproduct-transforms.mlir. Only the parallel dimension is made scalable. Making the reduction dimension scalable would lead to different patterns without `vector.outerproduct` (that would need to be added to some other file). One duplicate test for _matvec_ is removed.
-
Christudasan Devadasan authored
For a future patch, is it important to keep the lowered SGPR spills to be recognized as spill instructions during regalloc. Directly lowering them into V_WRITELANE/V_READLANE won't allow us to attach the SPILL flag to their instructions. This patch introduces the pseudo instructions with the SGPRSpill flag set in their Desc. They will get lowered to equivalent instructions later during post RA pseudo expansion.
-
Igor Kirillov authored
* Enhanced the logic of ExpandMemCmp pass to merge contiguous subsequences in LoadSequence, based on sizes allowed in `AllowedTailExpansions`. * This enhancement seeks to minimize the number of basic blocks and produce optimized code when using memcmp with non-register aligned sizes. * Enable this feature for AArch64 with memcmp sizes modulo 8 equal to 3, 5, and 6.
-
David Spickett authored
After https://github.com/llvm/llvm-project/pull/68052 this function changed from returning a nullptr with `return {};` to returning Expected and hitting `llvm_unreachable` before it could do so. I gather that we're never supposed to call this function, but on Windows we actually do call this function because `interpreter->CreateScriptedProcessInterface()` returns `ScriptedProcessInterface` not `ScriptedProcessPythonInterface`. Likely because `target_sp->GetDebugger().GetScriptInterpreter()` also does not return a Python related class. The previously XFAILed test crashed with: ``` # .---command stderr------------ # | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. # | Stack dump: # | 0. Program arguments: c:\\users\\tcwg\\david.spickett\\build-llvm\\bin\\lldb-test.exe ir-memory-map C:\\Users\\tcwg\\david.spickett\\build-llvm\\tools\\lldb\\test\\Shell\\Expr\\Output\\TestIRMemoryMapWindows.test.tmp C:\\Users\\tcwg\\david.spickett\\llvm-project\\lldb\\test\\Shell\\Expr/Inputs/ir-memory-map-basic # | 1. HandleCommand(command = "run") # | Exception Code: 0xC000001D # | #0 0x00007ff696b5f588 lldb_private::ScriptedProcessInterface::CreatePluginObject(class llvm::StringRef, class lldb_private::ExecutionContext &, class std::shared_ptr<class lldb_private::StructuredData::Dictionary>, class lldb_private::StructuredData::Generic *) C:\Users\tcwg\david.spickett\llvm-project\lldb\include\lldb\Interpreter\Interfaces\ScriptedProcessInterface.h:28:0 # | #1 0x00007ff696b1d808 llvm::Expected<std::shared_ptr<lldb_private::StructuredData::Generic> >::operator bool C:\Users\tcwg\david.spickett\llvm-project\llvm\include\llvm\Support\Error.h:567:0 # | #2 0x00007ff696b1d808 lldb_private::ScriptedProcess::ScriptedProcess(class std::shared_ptr<class lldb_private::Target>, class std::shared_ptr<class lldb_private::Listener>, class lldb_private::ScriptedMetadata const &, class lldb_private::Status &) C:\Users\tcwg\david.spickett\llvm-project\lldb\source\Plugins\Process\scripted\ScriptedProcess.cpp:115:0 # | #3 0x00007ff696b1d124 std::shared_ptr<lldb_private::ScriptedProcess>::shared_ptr C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1478:0 # | #4 0x00007ff696b1d124 lldb_private::ScriptedProcess::CreateInstance(class std::shared_ptr<class lldb_private::Target>, class std::shared_ptr<class lldb_private::Listener>, class lldb_private::FileSpec const *, bool) C:\Users\tcwg\david.spickett\llvm-project\lldb\source\Plugins\Process\scripted\ScriptedProcess.cpp:61:0 # | #5 0x00007ff69699c8f4 std::_Ptr_base<lldb_private::Process>::_Move_construct_from C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1237:0 # | #6 0x00007ff69699c8f4 std::shared_ptr<lldb_private::Process>::shared_ptr C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1534:0 # | #7 0x00007ff69699c8f4 std::shared_ptr<lldb_private::Process>::operator= C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1594:0 # | #8 0x00007ff69699c8f4 lldb_private::Process::FindPlugin(class std::shared_ptr<class lldb_private::Target>, class llvm::StringRef, class std::shared_ptr<class lldb_private::Listener>, class lldb_private::FileSpec const *, bool) C:\Users\tcwg\david.spickett\llvm-project\lldb\source\Target\Process.cpp:396:0 # | #9 0x00007ff6969bd708 std::_Ptr_base<lldb_private::Process>::_Move_construct_from C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1237:0 # | #10 0x00007ff6969bd708 std::shared_ptr<lldb_private::Process>::shared_ptr C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1534:0 # | #11 0x00007ff6969bd708 std::shared_ptr<lldb_private::Process>::operator= C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1594:0 # | #12 0x00007ff6969bd708 lldb_private::Target::CreateProcess(class std::shared_ptr<class lldb_private::Listener>, class llvm::StringRef, class lldb_private::FileSpec const *, bool) C:\Users\tcwg\david.spickett\llvm-project\lldb\source\Target\Target.cpp:215:0 # | #13 0x00007ff696b13af0 std::_Ptr_base<lldb_private::Process>::_Ptr_base C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1230:0 # | #14 0x00007ff696b13af0 std::shared_ptr<lldb_private::Process>::shared_ptr C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1524:0 # | #15 0x00007ff696b13af0 lldb_private::PlatformWindows::DebugProcess(class lldb_private::ProcessLaunchInfo &, class lldb_private::Debugger &, class lldb_private::Target &, class lldb_private::Status &) C:\Users\tcwg\david.spickett\llvm-project\lldb\source\Plugins\Platform\Windows\PlatformWindows.cpp:495:0 # | #16 0x00007ff6969cf590 std::_Ptr_base<lldb_private::Process>::_Move_construct_from C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1237:0 # | #17 0x00007ff6969cf590 std::shared_ptr<lldb_private::Process>::shared_ptr C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1534:0 # | #18 0x00007ff6969cf590 std::shared_ptr<lldb_private::Process>::operator= C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32124\include\memory:1594:0 # | #19 0x00007ff6969cf590 lldb_private::Target::Launch(class lldb_private::ProcessLaunchInfo &, class lldb_private::Stream *) C:\Users\tcwg\david.spickett\llvm-project\lldb\source\Target\Target.cpp:3274:0 # | #20 0x00007ff696fff82c CommandObjectProcessLaunch::DoExecute(class lldb_private::Args &, class lldb_private::CommandReturnObject &) C:\Users\tcwg\david.spickett\llvm-project\lldb\source\Commands\CommandObjectProcess.cpp:258:0 # | #21 0x00007ff696fab6c0 lldb_private::CommandObjectParsed::Execute(char const *, class lldb_private::CommandReturnObject &) C:\Users\tcwg\david.spickett\llvm-project\lldb\source\Interpreter\CommandObject.cpp:751:0 # `----------------------------- # error: command failed with exit status: 0xc000001d ``` That might be a bug on the Windows side, or an artifact of how our build is setup, but whatever it is, having `CreatePluginObject` return an error and the caller check it, fixes the failing test. The built lldb can run the script command to use Python, but I'm not sure if that means anything.
-
Luke Lau authored
For instructions like vmv.s.x and friends where we don't care about LMUL or the SEW/LMUL ratio, we can change the LMUL in its state so that it has the same SEW/LMUL ratio as the previous state. This allows us to avoid more VL toggles later down the line (i.e. use vsetvli zero, zero, which requires that the SEW/LMUL ratio must be the same) This is an alternative approach to the idea in #69259, but note that they don't catch exactly the same test cases.
-
hassnaaHamdi authored
…mbly. This patch adds the feature flag FAMINMAX and the assembly/disassembly for the following instructions of NEON, SVE2 and SME2: * NEON: - FAMIN - FAMAX * SVE2: - FAMIN_ZPmZ - FAMAX_ZPmZ * SME2: - FAMAX_2Z2Z - FAMIN_2Z2Z - FAMAX_4Z4Z - FAMIN_4Z4Z That is according to this documentation: https://developer.arm.com/documentation/ddi0602/2023-09 Co-authored-by:
Caroline Concatto <caroline.concatto@arm.com>
-
Brad Smith authored
-
Owen Pan authored
-
Ivan Kosarev authored
This resolves AsmParser ambiguity between them and similar instructions for other subtargets, e.g., V_PK_SUB_U16_vi being identical to V_PK_SUB_U16_gfx11 on GFX11. Part of <https://github.com/llvm/llvm-project/issues/69256>.
-
Andrzej Warzyński authored
Adds an end-to-end test for scalable vectorization of linalg.matmul.
-
Nikita Popov authored
With opaque pointers, zero-index GEPs will be eliminated in general.
-
tyb0807 authored
… emulation Currently the expected CHECK values are not correct for `fcst_maskedload` from mlir/test/Integration/Dialect/Vector/CPU/test-rewrite-narrow-types.mlir
-
Owen Pan authored
Also removed a duplicate test case.
-
Kunwar Grover authored
This patch relands the reverted commit https://github.com/llvm/llvm-project/commit/e6e9beb977555c84fb16ffdd8dca8649c7d3091d after fixing the sanitizer issue.
-
Rajveer Singh Bharadwaj authored
[libc++] Fix _CopySegment helper in ranges::copy(join_view, out) when called in a static assertion context (#69593) Resolves Issue #69083 The `_CopySegment` helper for `ranges::copy(join_view, out)` is not `constexpr` causing rejection in `libc++` in a static assertion context as in the issue snippet.
-
Chuanqi Xu authored
-fmodule-file=<module-name>= option Currently if we have multiple `-fmodule-file=<module-name>=<BMI-path>` flags for the same `<module-name>`, we will pick the BMI-path from the first flag. And this is inconsistent with what users generally expect. e.g, we might expect the latter flags can override the former ones. This patch changes the behavior to match user's expectation.
-
Ami-zhang authored
-
tyb0807 authored
-
Timm Bäder authored
-
Timm Bäder authored
-
Brad Smith authored
-
Matt Arsenault authored
This infinite looped after d8127b2b
-
Matthias Springer authored
If a dimension does not appear in the permutation map of a vector transfer op, the size of the accessed slice in that dimension is `1`. Before this fix, `getTransferChunkAccessed` used to return `0` for such dimensions, which would means that `0` elements in the underlying tensor/memref are accessed. Note: There is no test case that fails due to this bug and because this interface method is currently only used in one place, it is hard to write a regression test. This fix is in preparation of subset hoisting functionality that will be added in subsequent commits.
-
Andrzej Warzyński authored
Update the remaining tests for matrix multiplication (_matmul_) in: * vector-contract-to-outerproduct-transforms.mlir with cases for scalable vectors. Note that in order for the "vector.contract -> vector.outerproduct" patterns to work, only the non-reduction dimension can be scalable (*). For Matmul operations that is set to be the N dimension (i.e. rows of the output matrix), which matches how matrix multiplication are normally implemented for e.g. Arm's SVE. However, making the M dimension scalable (i.e. columns of the output matrix) should work as well. Making both parellel dimensions scalable is left as a TODO for when support for 2-D scalable vectors is more established (this is work-in-progress as part of the effort to support Arm's SME in MLIR). The change in: * `UnrolledOuterProductGenerator` is a "bug fix" to make sure that the conversion pattern correctly propagates scalability when creating `arith.extf` operations. (*) The conversion tested in this file unrolls along the reduction dimension, which is not supported for scalable vectors.
-
jeanPerier authored
Update evaluate::ActualArgument to propagate the %VAL and %REF markers until lowering. Semantic checks are added to %VAL to ensure the argument is a numerical or logical scalar. I did not push these markers into the characteristics because other compilers do not complain about inconsistent usages (e.g. using %VAL in a call on a procedure with an interface without VALUE dummies is not flagged by any compilers I tested, and it is not an issue for lowering, so I decided to stay simple here and minimize the footprint of these legacy features). Lowering retrieves these markers and does the right thing: pass %VAL in registers and pass %REF by address without adding any extra arguments for characters.
-
Nikita Popov authored
-