- Feb 06, 2024
-
-
David Green authored
If we have a `SETCC (SETCC), 0, NE` and ZeroOrOneBooleanContent, we can remove the outer setcc as it will produce the same value as the inner. This can be generalized to anything where the top bits are known to be 0, as the value will remain as 1 or 0.
-
Kareem Ergawy authored
This PR outlines the arguments of the open CodeGen functions into 2 separate structs. This was, in part, motivated by the delayed privatization WIP #79862 where we had to extend the signatures of both functions containing quite a bit of default values (`nullptr`, `false`). This PR does not add any new arguments yet though, just outlines the existing ones.
-
Simon Pilgrim authored
[DAG] visitCTPOP - if only the upper half of the ctpop operand is zero then see if its profitable to only count the lower half. (#80473)
-
Benjamin Kramer authored
-
Timm Bäder authored
-
Timm Bäder authored
Change the semantics of Pointer::isDummy() to check for a null Pointee and returnd false in that case. Then call CheckDummy() in ArrayElemPtr{,Pop} to protect those ops from operating on dummy pointers and enable a few tests in test/Sema/ that now work with the new constant interpreter. -
Francesco Petrogalli authored
The enums needed by the file MachineValueType.h are auto-generated since commit ddaf085e
-
Simon Camphausen authored
-
Rin Dobrescu authored
We can convert concat(v4i16 uhadd(a,b), v4i16 uhadd(c,d)) to v8i16 uhadd(concat(a,c), concat(b,d)), which can lead to further simplifications.
-
Orlando Cazalet-Hyams authored
Follow up to #79476 - that patch added a call to hoistLockstepIdenticalDPValues which hoists identical DPValues in lockstep, matching dbg intrinsic hoisting behaviour. The code deleted in this patch, which unconditionally hoists DPValues, should have been deleted in that patch. Update test with --try-experimental-debuginfo-iterators to check the behaviour. Follow up to #79476 - that change introduces a call to hoistLockstepIdenticalDPValues.
-
Sander de Smalen authored
The TargetGuard fields for 'svldr[_vnum]_za' and 'svstr[_vnum]_za' were incorrectly set to `+sve` instead of `+sme`. This means that compiling code that uses these intrinsics requires compiling for both `+sve` as well as `+sme`. This PR also fixes the target guards for the `svadd` and `svsub` builtins that are enabled under `+sme2,+sme-i16i64` and `+sme2,+sme-f64f64`, as it initially did the following: ``` let TargetGuard = "+sme2" in { let TargetGuard = "+sme-i16i64" in { // Builtins defined here will be predicated only by // '+sme-i16i64', and not '+sme2,+sme-i16i64'. } } ``` This PR also removes `-target-feature +sve` from all the SME tests, to ensure that the SME features are sufficient to build the tests. -
Timm Bäder authored
By checking using verify={ref,expected},both. -
Qiu Chaofan authored
In IR or C code, shift amount larger than value size is undefined behavior. But in practice, backend lowering for shift_parts produces add/sub of shift amounts, thus constant shift amounts might be negative or larger than value size, which depends on ISA definition. PowerPC ISA says, the lowest 7 bits (6 bits for 32-bit instruction) will be taken, and if the highest among them is 1, result will be zero, otherwise the low 6 bits (or 5 on 32-bit) are used as shift amount. This commit emulates the behavior and avoids array overflow in bit permutation's value bits calculator.
-
wangpc authored
-
Luke Lau authored
This shufflevector gets scalarized into a build_vector of extract_vector_elts because the output type doesn't match the input vector type. Normally this is combined back into a vector_shuffle in DAGCombine, but this one fails because we don't consider a extract_subvector to be cheap, specifically because it's at an index > 31. This should be canonicalized back into a vector_shuffle at some point so we can lower it as a vrgather.vv.
-
Cullen Rhodes authored
-
Sjoerd Meijer authored
Add opcodes for different store instructions to the target hook that can enable more STP pairs. This is split off from the patch that does the same for some load instructions (#79003). Patch co-authored by Cameron McInally.
-
AtariDreams authored
optimizeTan has been renamed to optimizeTrigInversionPairs as a result. Sadly, this is not mathematically true that all inverse pairs fold to x. For example, asin(sin(x)) does not fold to x if x is over 2pi.
-
paperchalice authored
A simple enough op pass so we can test standard instrumentations in future.
-
Nilanjana Basu authored
Removed target-triple in target-independent test case to fix failing test caused by https://github.com/llvm/llvm-project/pull/67725.
-
wangpc authored
-
michaelrj-google authored
Having libc_errno outside of the namespace causes versioning issues when trying to link the tests against LLVM-libc. Most of this patch is just moving libc_errno inside the namespace in tests. This isn't necessary in the function implementations since those are already inside the namespace.
-
Benjamin Maxwell authored
When unrolling the reduction dimension of something like a matmul for SME, you can end up with transposed reads of illegal types, like so: ```mlir %illegalRead = vector.transfer_read %memref[%a, %b] : memref<?x?xf32>, vector<[8]x4xf32> %legalType = vector.transpose %illegalRead, [1, 0] : vector<[8]x4xf32> to vector<4x[8]xf32> ``` Here the `vector<[8]x4xf32>` is an illegal type, there's no way to lower a scalable vector of fixed vectors. However, as the final type `vector<4x[8]xf32>` is legal, we can instead lift the transpose to memory (producing a strided memref), and eliminate all the illegal types. This is shown below. ```mlir %readSubview = memref.subview %memref[%a, %b] [%c8_vscale, %c4] [%c1, %c1] : memref<?x?xf32> to memref<?x?xf32> %transpose = memref.transpose %readSubview (d0, d1) -> (d1, d0) : memref<?x?xf32> to memref<?x?xf32> %legalType = vector.transfer_read %transpose[%c0, %c0] : memref<?x?xf32>, vector<4x[8]xf32> ``` -
Matt Arsenault authored
-
vigbalu authored
Adding extern "C" to all the entry point functions to make sure that these functions are not mangled.
-
j-jorge authored
Resolves #27008, #39735, #53013, #63619. Hello, this PR adds the MainIncludeChar option to clang-format, allowing to select which include syntax must be considered when searching for the main header: quotes (`#include "foo.hpp"`, the default), brackets (`#include <foo.hpp>`), or both. The lack of support for brackets has been reported many times, see the linked issues, so I am pretty sure there is a need for it :) A short note about why I did not implement a regex approach as discussed in #53013: while a regex would have allowed many extra ways to describe the main header, the bug descriptions listed above suggest a very simple need: support brackets for the main header. This PR answers this needs in a quite simple way, with a very simple style option. IMHO the feature space covered by the regex (again, for which there is no demand :)) can be implemented latter, in addition to the proposed option. The PR also includes tests for the option with and without grouped includes.
-
Anton Sidorenko authored
Under fast-math flags it's possible to convert `sqrt(exp(X)) `into `exp(X * 0.5)`. I suppose that this transformation is always profitable. This is similar to the optimization existing in GCC.
-
NAKAMURA Takumi authored
-
Aiden Grossman authored
This patch adds a script to automatically query the number of running jobs and print them to the terminal as this functionality isn't available through the Github UI (unless you are a Github administrator).
-
Marius Brehler authored
This adds the `emitc.declare_func` operation that allows to emit the declaration of an `emitc.func` at a specific location.
-
NAKAMURA Takumi authored
-
Joshua Cao authored
Following the discussion in https://discourse.llvm.org/t/symboltable-and-symbol-parent-child-relationship/75446 , we should enforce that a symbol's immediate parent is a symbol table. I changed some tests to pass the verification. In most cases, we can wrap the func with a module, change the func to another op with regions i.e. scf.if, or change the expected error message. --------- Co-authored-by:
Mehdi Amini <joker.eph@gmail.com>
-
Adrian Kuegel authored
-
Yeting Kuo authored
-
Enna1 authored
…DOW_SCALE As MEM_GRANULARITY represents the size of memory block mapped to a single shadow entry, and SHADOW_SCALE represents the scale of shadow mapping, so the single shadow entry size can be computed as (MEM_GRANULARITY >> SHADOW_SCALE). This patch replaces the hardcoded SHADOW_ENTRY_SIZE with (MEM_GRANULARITY >> SHADOW_SCALE).
-
Yuxuan Chen authored
-
Jason Eckhardt authored
This patch removes a couple of redundant buffer copies in emitTable for setting up calls to decodeULEB128. Instead, provide the Table.data buffer directly to the calls-- where decodeULEB128 does its own buffer overflow checking. Factor out 7 explicit loops to emit ULEB128 bytes into emitULEB128. Also factor out 4 copies of 24-bit numtoskip emission into emitNumToSkip. The functionality is already covered by existing unit tests and by virtue of most of the in-tree back-ends exercising the decoder emitter.
-
sstwcw authored
new ```C while (_Generic(x, // long: x)(x) > x) { } while (_Generic(x, // long: x)(x)) { } ``` old ```C while (_Generic(x, // long: x)(x) > x) { } while (_Generic(x, // long: x)(x)) { } ``` In the first case above, the second line previously aligned to the open parenthesis. The 4 spaces did not get added by the fallback line near the end of getNewLineColumn because there was already some indentaton. Now the spaces get added explicitly. In the second case above, without the fake parentheses, the second line did not respect the outer parentheses, because the LastSpace field did not get set without the fake parentheses. Now the indentation of the outer level is used instead. -
Arthur Eubanks authored
This matches the optimization pipeline's PassRegistry.def. I ran into a bug where CONSTRUCTOR wasn't always being used (in PassBuilder::registerMachineFunctionAnalyses()). Make DUMMY_* just accept a pass name, there's no point in having proper constructors if the generated dummy class has a templated constructor accepting arbitrary arguments. Remove unused getPassNameFromLegacyName() as it was using this but for no purpose. Remove DUMMY_MACHINE_FUNCTION_ANALYSIS, we can just add those as we port them. This for some reason exposed missing mock calls in existing unittests.
-
Han-Chung Wang authored
This is part of https://github.com/llvm/llvm-project/commit/66347e516e22f9159b86024071fb92f364ac4418 The regression in downstream projects is about transfer_read patterns, which needs more investigation. Add the support for transfer_write for now.
-