- May 13, 2022
-
-
Sanjay Patel authored
I fixed some poison-safety violations on related patterns in InstCombine and noticed that we missed adding nsw/nuw on them, so this adds clauses to the underlying analysis for that. We need the undef input restriction to make this safe according to Alive2: https://alive2.llvm.org/ce/z/48g9K8 Differential Revision: https://reviews.llvm.org/D125500
-
Sanjay Patel authored
-
Nico Weber authored
This reverts commit ad47114a. See discussion on https://reviews.llvm.org/D124613.
-
Stephen Long authored
MSVC pragma function tells the compiler to generate calls to functions in the pragma function list, instead of using the builtin. Needs https://reviews.llvm.org/D124701 https://docs.microsoft.com/en-us/cpp/preprocessor/function-c-cpp?view=msvc-170 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D124702
-
Jonas Paulsson authored
* Set MaxStoresPerMemcpy and MaxStoresPerMemset to 2. * Optimize stores of replicated values in SystemZ::combineSTORE(). This handles the now expanded memory operations and as well some other pre-existing cases. * Reject a big displacement in isLegalAddressingMode() for a vector type. * Return true from shouldConsiderGEPOffsetSplit(). Reviewed By: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D122105
-
Nikita Popov authored
-
Ken Matsui authored
When a preprocessor directive is unknown outside of a skipped conditional block, we give an error diagnostic because we don't know how to proceed with preprocessing. But when the directive is in a skipped conditional block, we would not diagnose it on the theory that the directive may be known to an implementation other than Clang. Now, for unknown directives inside a skipped conditional block, we diagnose the unknown directive as a warning if it is sufficiently similar to a directive specific to preprocessor conditional blocks. For example, we'll warn about `#esle` and suggest `#else` but we won't warn about `#progma` because it's not a directive specific to preprocessor conditional blocks. Fixes #51598 Differential Revision: https://reviews.llvm.org/D124726
-
David Sherwood authored
In InnerLoopVectorizer::getOrCreateVectorTripCount there is an assert that the known minimum value for the VF is a power of 2 when tail-folding is enabled. However, for scalable vectors the value of vscale may not be a power of 2, which means we have to worry about the possibility of overflow. I have solved this problem by adding preheader checks that prevent us from entering the vector body if the canonical IV would overflow, i.e. if ((IntMax - TripCount) < (VF * UF)) ... skip vector loop ... Differential Revision: https://reviews.llvm.org/D125235
-
Nikita Popov authored
This adds two conjugated folds: * A | B -> B if A implies B (https://alive2.llvm.org/ce/z/R6GU4j) * A & B -> A if A implies B (https://alive2.llvm.org/ce/z/EGMqyy) If A and B are icmps themselves, we will usually fold this through other logic already (though the tests show a couple additional cases we previously missed). However, isImpliedCond() also supports A being of the form X & Y, which allows us to handle cases like (X & Y) | B where X implies B. This addresses the regression from D125398. Something that notably doesn't work yet is the (X | Y) & B case. This is due to an asymmetry in the isImpliedCondition() implementation that will have to be addressed separately. Differential Revision: https://reviews.llvm.org/D125530
-
Simon Pilgrim authored
-
Nico Weber authored
-
Louis Dionne authored
This patch overhauls how we pick up the ABI library. Instead of setting ad-hoc flags, it creates interface targets that can be linked against by the rest of the build, which is easier to follow and extend to support new ABI libraries. This is intended to be a NFC change, however there are some additional simplifications and improvements we can make in the future that would require a slight behavior change. Differential Revision: https://reviews.llvm.org/D120727
-
Aaron Ballman authored
Before issuing the warning about use of a strict prototype, check if the declarator is required to have a prototype through some other means determined at parse time. This silences false positives in OpenCL code (where the functions are forced to have a prototype) and block literal expressions.
-
Nikita Popov authored
We commonly want to create either an inbounds or non-inbounds GEP based on a boolean value, e.g. when preserving inbounds from existing GEPs. Directly accept such a boolean in the API, rather than requiring a ternary between CreateGEP and CreateInBoundsGEP. This change is not entirely NFC, because we now preserve an inbounds flag in a constant expression edge-case in InstCombine.
-
Florian Hahn authored
A first patch to use the reasoning in ConstraintElimination to simplify sub with overflow to a regular sub, if the operation is guaranteed to not overflow. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D125264
-
Aaron Puchert authored
That is more accurate, and using a separate class in TableGen seems appropriate since these are not parts of the text but properties of the declaration itself. Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D125473
-
Aaron Puchert authored
That's required to support `\n`, but can also be used for other commands. We already had the infrastructure in place to parse a varying number of arguments, we simply needed to generalize it so that it would work not only for block commands. This should fix #55319. Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D125429
-
Aaron Puchert authored
The command traits have a member NumArgs for which all the parsing infrastructure is in place, but no command was setting it to a value other than 0. By doing so we get warnings when passing an empty paragraph to \retval (the first argument is the return value, then comes the description). We also take \xrefitem along for the ride, although as the documentation states it's unlikely to be used directly. Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D125422
-
Nathan Sidwell authored
We need to expand special substitutions in four different ways. This refactors to only have one conversion from enum to string, and derive the other 3 needs off that. The SpecialSubstitution node is derived from the ExpandedSpecialSubstitution. While this may seem unintuitive, it works out quite well, as SpecialSubstitution can then use the former's getBaseName and remove an unneeded 'basic_' prefix, for those substitutions that are instantiations (to known typedef). Similarly all those instantiations use the same set of template arguments (with 'basic_string', getting an additional 'allocator' arg). Expansion tests were added in D123134, and remain unchanged. Reviewed By: MaskRay, dblaikie Differential Revision: https://reviews.llvm.org/D125257
-
Denys Shabalin authored
In d4555698, the name of nano precision timer function has changed from `nano_time` to `nanoTime`, but benchmarks were not updated to reflect that. This change addresses the discrepancy. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D125217
-
Simon Pilgrim authored
As noted on D103874, the 'no-op' vector widening intrinsics currently depend on undef shuffle mask indices, moving to poison we need to adjust this to reference a 'undefined' second vector operand, which will be a freeze(undef).
-
Whisperity authored
Fixes the `FIXME:` related to adding `forEachTemplateArgument` to the core AST Matchers library. Reviewed By: aaron.ballman Differential Revision: http://reviews.llvm.org/D125383
-
Groverkss authored
This patch fixes a bug in areIdsUnique where it ignores the [start, end] range. No test case is added since there are no use cases through IR from where it can be tested, and it is hard to create a unittest since we do not currently have Values in unittests. Reviewed By: arjunp Differential Revision: https://reviews.llvm.org/D124735
-
Nikita Popov authored
-
Nikita Popov authored
ArrayRef<Value *> also accepts a single Value *, there's no need to create separate overloads for this.
-
Tres Popp authored
-
Pavel Samolysov authored
If a load with the same offset has already been seen but the load had a lower alignment, the pass has to check whether the pointer is dereferenceable and is sufficiently aligned (so, the new alignment must be taken into account).
-
Tres Popp authored
This pass is to handle computationally complex operations like tensor.pad which are not simply lowered to the exact same operation in the memref dialect. Differential Revision: https://reviews.llvm.org/D125384
-
Nikita Popov authored
-
LLVM GN Syncbot authored
-
Archibald Elliott authored
This adds a late Machine Pass to work around a Cortex CPU Erratum affecting Cortex-A57 and Cortex-A72: - Cortex-A57 Erratum 1742098 - Cortex-A72 Erratum 1655431 The pass inserts instructions to make the inputs to the fused AES instruction pairs no longer trigger the erratum. Here the pass errs on the side of caution, inserting the instructions wherever we cannot prove that the inputs came from a safe instruction. The pass is used: - for Cortex-A57 and Cortex-A72, - for "generic" cores (which are used when using `-march=`), - when the user specifies `-mfix-cortex-a57-aes-1742098` or `mfix-cortex-a72-aes-1655431` in the command-line arguments to clang. Reviewed By: dmgreen, simon_tatham Differential Revision: https://reviews.llvm.org/D119720
-
Alex Zinenko authored
Due to an apparent bug in the Doxygen version <1.8.16 used to generate documentation for MLIR, parts of the navigation (specifically, the lists of inherited methods for classes) are unusable due to dynsections.js missing from the output generated by Doxygen. Setting this flag makes Doxygen always produce the file.
-
Archibald Elliott authored
These are the tests for the pass added in https://reviews.llvm.org/D119720 Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D122747
-
Matthias Springer authored
Most functions do not need a PatternRewriter or ConversionPatternRewriter. Differential Revision: https://reviews.llvm.org/D125466
-
Matthias Springer authored
No need to expose this as public API anymore. Differential Revision: https://reviews.llvm.org/D125361
-
Zakk Chen authored
The goal is support tail and mask policy in RVV builtins. We focus on IR part first. If the passthru operand is undef, we use tail agnostic, otherwise use tail undisturbed. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D125323
-
Sam Parker authored
Recommit. Check for legal zext 'sinks' before inserting a trunc. Differential Revision: https://reviews.llvm.org/D115451
-
Jay Foad authored
Previously it built MIR for the results and returned a Register. This avoids building constants for earlier elements of the vector if later elements will fail to fold, and allows CSEMIRBuilder::buildInstr to avoid unconditionally building a copy from the result. Use a new helper function MachineIRBuilder::buildBuildVectorConstant to build a G_BUILD_VECTOR of G_CONSTANTs. Differential Revision: https://reviews.llvm.org/D117758
-
Sam Parker authored
Simplify existing test and also add it as a codegen test for aarch64.
-
Daniel Kiss authored
Program may set the RA_SIGN_STATE pseudo register by expressions. Libunwind expected only the DW_CFA_AARCH64_negate_ra_state could change the value of the register which leads to runtime errors on PAC enabled systems. In the recent version of the aadwarf64[1] a limitation is added[2] to forbid the mixing the DW_CFA_AARCH64_negate_ra_state with other DWARF Register Rule Instructions. [1] https://github.com/ARM-software/abi-aa/releases/tag/2022Q1 [2] https://github.com/ARM-software/abi-aa/pull/129 Reviewed By: #libunwind, MaskRay Differential Revision: https://reviews.llvm.org/D123692
-