- Apr 17, 2024
-
-
Stephen Tozer authored
As we've added new IR elements for the RemoveDIs project, we need the update_test_checks script to understand them. For the records themselves this is already done automatically, but their metadata arguments are not recognized as such due to lacking the `metadata` prefix, which means they won't be checked by the script. This patch fixes this by adding a check for all `![0-9]+` patterns as long as they are not at the start of a line (which avoids matching global values).
-
Luke Lau authored
In vxrm.mir we were running RISCVInsertVSETVLI on pseudos that already had vsetvlis inserted and their AVLs set to $noreg. (This happened to work since doLocalPostpass got rid of the extra vsetvli) This removes the vsetvlis from the test and enforces that the only valid AVLs we work with are either X0 or virtual registers (or $noreg before emitVSETVLIs), since we don't handle physical registers properly in doLocalPostpass.
-
Sergio Afonso authored
This patch removes the LoopControl parsing/printing functions that are no longer used after transitioning `omp.simdloop` and `omp.taskloop` into loop wrapper operations.
-
Sergio Afonso authored
This patch updates the definition of `omp.simdloop` to enforce the restrictions of a wrapper operation. It has been renamed to `omp.simd`, to better reflect the naming used in the spec. All uses of "simdloop" in function names have been updated accordingly. Some changes to Flang lowering and OpenMP to LLVM IR translation are introduced to prevent the introduction of compilation/test failures. The eventual long term solution might be different.
-
Nicolai Hähnle authored
Collect the original check lines in a manner that is independent of where the check lines appear in the file. This is so that we keep FileCheck variable names stable even when --include-generated-funcs is used. Reported-by:Ruiling Song <ruiling.song@amd.com>
-
Florian Hahn authored
This patch introduces a new VPWidenMemoryRecipe base class and distinct sub-classes to model loads and stores. This is a first step in an effort to simplify and modularize code generation for widened loads and stores and enable adding further more specialized memory recipes. PR: https://github.com/llvm/llvm-project/pull/87411
-
Mel Chen authored
-
harishch4 authored
When a local variable inside a BLOCK construct is used as threadprivate variable, llvm-flang throws below error: > error: The THREADPRIVATE directive and the common block or variable in it must appear in the same declaration section of a scoping unit
-
Vyacheslav Levytskyy authored
This PR addresses an issue that may arise when an integer argument size differs from a machine word size for the target in a call to llvm intrinsic. The following example demonstrates the issue: ``` @__const.test.arr = private unnamed_addr addrspace(2) constant [3 x i32] [i32 1, i32 2, i32 3] define spir_func void @test() { entry: %arr = alloca [3 x i32], align 4 %dest = bitcast ptr %arr to ptr call void @llvm.memcpy.p0.p2.i32(ptr align 4 %dest, ptr addrspace(2) align 4 @__const.test.arr, i32 1024, i1 false) ret void } declare void @llvm.memcpy.p0.p2.i32(ptr nocapture writeonly, ptr addrspace(2) nocapture readonly, i32, i1) ``` Depending on the target this code may work or may fail without this PR due to the fact that IR Translation step introduces additional `zext` when type of the 3rd argument of `@llvm.memcpy.p0.p2.i32` differs from machine word. This PR addresses the issue by adding type deduction for a newly inserted G_ZEXT generic opcode. -
Vyacheslav Levytskyy authored
[SPIR-V] Improve Tablegen instruction selection and account for a pointer size of the target (#88725) This PR resolves the issue that SPIR-V Backend uses the notion of a pointer size of the target, most notably, in legalizer code, but Tablegen instruction selection in SPIR-V Backend doesn't account for a pointer size of the target. See https://github.com/llvm/llvm-project/issues/88723 for a detailed description. There are 3 test cases attached to the PR that reproduced the issue, when dealing with spirv32-spirv64 differences, and are working correctly now with this PR.
-
jeanPerier authored
Currently, it is not possible to find back which fun.func is the host procedure of some internal procedure because the mangling of the internal procedure does not contain info about the BIND(C) name of the host. This info may be useful to ensure dwarf DW_TAG_subprogram of internal procedures are nested under DW_TAG_subprogram of host procedures for instance.
-
Nikita Popov authored
Change all the cstval_pred_ty based PatternMatch helpers (things like m_AllOnes and m_Zero) to only allow poison elements inside vector splats, not undef elements. Historically, we used to represent non-demanded elements in vectors using undef. Nowadays, we use poison instead. As such, I believe that support for undef in vector splats is no longer useful. At the same time, while poison splat elements are pretty much always safe to ignore, this is not generally the case for undef elements. We have existing miscompiles in our tests due to this (see the masked-merge-*.ll tests changed here) and it's easy to miss such cases in the future, now that we write tests using poison instead of undef elements. I think overall, keeping support for undef elements no longer makes sense, and we should drop it. Once this is done consistently, I think we may also consider allowing poison in m_APInt by default, as doing that change is much less risky than doing the same with undef. This change involves a substantial amount of test changes. For most tests, I've just replaced undef with poison, as I don't think there is value in retaining both. For some tests (where the distinction between undef and poison is important), I've duplicated tests.
-
David Spickett authored
I was debugging space separation issues when passing user arguments and noticed this error is really hard to read in that scenario. Put "" around the invalid compiler name so you can tell whether you have spaces around it that's causing the problem.
-
shamithoke authored
For lowering bitreverse using GFNI, the check is put under SSSE3. This can be pulled out of SSSE3. Co-authored-by:shami <shami_thoke@yahoo.com>
-
Phoebe Wang authored
-
Guillaume Chatelet authored
[libc][msan] Fix "non-constexpr function '__msan_unpoison' cannot be used in a constant expression" (#88719) Prior to this patch, calling `cpp::bit_cast<T>` in `constexpr` expressions under `-fsanitize=memory` would fail with the following message "non-constexpr function '__msan_unpoison' cannot be used in a constant expression". This patch makes sure that the `__msan_unpoison` expression is guarded by `!__builtin_is_constant_evaluated()`.
-
Matthias Springer authored
This commit fixes the following error when stopping the sparse compiler pipeline after bufferization (e.g., with `test-analysis-only`): ``` LLVM ERROR: Building op `vector.print` but it isn't known in this MLIRContext: the dialect may not be loaded or this operation hasn't been added by the dialect. See also https://mlir.llvm.org/getting_started/Faq/#registered-loaded-dependent-whats-up-with-dialects-management ```
-
Jan Patrick Lehr authored
Reverts llvm/llvm-project#88928 This broke the AMDGPU buildbots: https://lab.llvm.org/buildbot/#/builders/193/builds/50201 https://lab.llvm.org/staging/#/builders/185/builds/5565 https://lab.llvm.org/buildbot/#/builders/259/builds/2955
-
Vlad Serebrennikov authored
Convert it to scoped enum, and move it to namespace scope to enable forward declarations.
-
Matt Arsenault authored
We were running this immediately on the incoming IR, which is still littered with temporary allocas obscuring trivial values. This needs to run after initial SROA to handle sincos insertion.
-
Mikhail Goncharov authored
This reverts commit c309dc6d. Breaks builds, see discussion in https://github.com/llvm/llvm-project/pull/83124
-
Mikhail Goncharov authored
This reverts commit 5c6af605. Breaks builds, see discussion in https://github.com/llvm/llvm-project/pull/83124
-
Mikhail Goncharov authored
This reverts commit 0a789ea8. Breaks builds, see discussion in https://github.com/llvm/llvm-project/pull/83124
-
Jesse Huang authored
This patch adds the support for Zama16b version 1.0, which has been added to RVA23U64 optional extensions recently
-
YunQiang Su authored
If LLVM is configured with -DLLVM_DEFAULT_TARGET_TRIPLE, or compiler_rt is configured with -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE, while the argument is not normalized, such as Debian-style vendor-less triple, clang will try to find libclang_rt in lib/<normalized_triple>, while libclang_rt is placed into lib/<triple_arg>. Let's also place libclang_rt into lib/<normalized_triple>.
-
Vlad Serebrennikov authored
This makes it forward-declarable, and needed from splitting `Sema` up.
-
martinboehme authored
This patch includes a test that assert-fails without the fix.
-
Hideto Ueno authored
This commit adds `walk` method to PyOperationBase that uses a python object as a callback, e.g. `op.walk(callback)`. Currently callback must return a walk result explicitly. We(SiFive) have implemented walk method with python in our internal python tool for a while. However the overhead of python is expensive and it didn't scale well for large MLIR files. Just replacing walk with this version reduced the entire execution time of the tool by 30~40% and there are a few configs that the tool takes several hours to finish so this commit significantly improves tool performance.
-
martinboehme authored
This patch adds a test that assert-fails without the fix.
-
Balazs Benics authored
Relates to #88181
-
Balazs Benics authored
Fixes #88181
-
Mark de Wever authored
Per [tab:time.format.spec] %z The offset from UTC as specified in ISO 8601-1:2019, subclause 5.3.4.1. For example -0430 refers to 4 hours 30 minutes behind UTC. If the offset is zero, +0000 is used. The modified commands %Ez and %Oz insert a : between the hours and minutes: -04:30. If the offset information is not available, an exception of type format_error is thrown. Typically the modified versions Oz or Ez would have wording like The modified command %OS produces the locale's alternative representation. In this case the modified version does not depend on the locale. This change is a preparation for formatting sys_info which has time zone information. The function time_put<_CharT>::put() does not have proper time zone support, therefore it's a manual implementation. Fixes https://github.com/llvm/llvm-project/issues/78184 -
Craig Topper authored
Instead of searching all encodings, we can convert the encoding back to a register and use getMatchingSuperReg.
-
Kazu Hirata authored
llvm::SmallVector::operator== exactly meets our needs.
-
Jan Svoboda authored
This makes it possible to pass "-o /dev/null" to `clang-scan-deps` and skip some potentially expensive work, making timings less noisy. Also removes the need for stream redirection.
-
Jan Svoboda authored
The `clang-scan-deps` tool can be used for fast scanning of batches of compilation commands passed in via the `-compilation-database` option. This gets awkward in our tests where we have to resort to using `.in`/`.template` JSON files and running them through `sed` in order to embed LIT's `%t` variable into them. However, most of our tests only need to pass single compilation command, so this dance is entirely unnecessary. This patch makes sure the existing "per-file" mode (where the compilation command is passed in-line after the `--` argument) works for all output formats, not only `P1689`.
-
Brandon Wu authored
Currently the CFI offset for RVV registers are not handled entirely, this patch add those information for either stack unwinding or debugger to work correctly on RVV callee-saved stack object. Depends On D154576 Differential Revision: https://reviews.llvm.org/D156846
-
Luke Lau authored
The VTYPE operands of a vsetvli pseudo are always immediates
-
Congcong Cai authored
Reapply for #88765. Partially fixes: #60895.
-