- Jun 22, 2023
-
-
Nikita Popov authored
-
Nikita Popov authored
-
Peter Klausler authored
Expression folding currently unconditionally rewrites "1*j" to "j", which is wrong when "j" is a variable, as it transforms an expression into a variable and can lead to incorrect associations in contexts like an actual argument or an ASSOCIATE selector. Transform "1*j" to a parenthesized "(j)" when "j" is a variable. Fixes LLVM bug https://github.com/llvm/llvm-project/issues/63259. Differential Revision: https://reviews.llvm.org/D153457
-
Peter Klausler authored
When a LEN type parameter of one PDT is being used as the value of a LEN type parameter in another PDT, expression rewriting can loop infinitely due to an incorrect assumption that the same PDT's parameters are being referenced. Fixes LLVM bug https://github.com/llvm/llvm-project/issues/63198 Differential Revision: https://reviews.llvm.org/D153465
-
Nikita Popov authored
Instruction after a non-terminator unreachable are ... unreachable, so remove them. Reuse the same logic we use for removing instructions from dead blocks.
-
Nikita Popov authored
-
Nikita Popov authored
Even if the value happens to be undef, we should preserve these so they get turned into an unreachable terminator later.
-
Peter Klausler authored
When a specific MIN/MAX intrinsic function (e.g. MAX1) reference has an actual argument error, ensure that a later attempt to fold the call into a constant doesn't crash due to a missing argument. Fixes https://github.com/llvm/llvm-project/issues/63140 Differential Revision: https://reviews.llvm.org/D153470
-
Nikita Popov authored
-
Peter Klausler authored
The current code has redundancy with the infrastructure for declaration checking that can be replaced by better usage of the parse tree walking framework. This also fixes LLVM flang bug #58971. Differential Revision: https://reviews.llvm.org/D153385
-
Peter Klausler authored
-
Paul Robinson authored
Differential Revision: https://reviews.llvm.org/D153462
-
Haojian Wu authored
cleanups
-
Mitch Phillips authored
This reverts commit 9246df70. Reason: This patch broke the UBSan buildbots. See more information in the original phabricator review: https://reviews.llvm.org/D139092
-
Jay Foad authored
-
David Green authored
I believe that for fp reductions we can use the imported tablegen patterns for selection, as opposed to going via selectReduction. Integer reductions are more difficult, as the return types in selection DAG will be promoted to i32. Differential Revision: https://reviews.llvm.org/D153244
-
Pravin Jagtap authored
Atomic optimizer is turned on by default through D152649. This patch removes the usage of old command line option amdgpu-atomic-optimizations and transfer the responsibility to `amdgpu-atomic-optimizer-strategy`. We can safely remove old option when LLPC remove its all usage. Reviewed By: foad, arsenm, #amdgpu, cdevadas Differential Revision: https://reviews.llvm.org/D153007
-
Nikita Popov authored
-
Nikita Popov authored
Create the standard non-terminator unreachable, rather than a slight variation on it.
-
Jolanta Jensen authored
Remove IR combines that no longer apply after the SVE merging intrinsics taking an all active predicate, have been canonicalised to their equivalent undef (_u) variants. Differential Revision: https://reviews.llvm.org/D153415
-
Matt Arsenault authored
Try to use a compare with 0 if DAZ is assumed. FPClassTest really needs to be marked as a bimask enum, but the API for that is currently broken.
-
Matt Arsenault authored
Split out from D143180
-
Simon Pilgrim authored
Fixes #63439
-
Ivan Kosarev authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D152907
-
Ivan Kosarev authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D152906
-
Matthias Springer authored
There is another transform that lowers tensor.pad to tensor.empty + linalg.fill + tensor.insert_slice: `transform.structured.rewrite_in_destination_passing_style`. Delete the other transform. Differential Revision: https://reviews.llvm.org/D153429
-
Piotr Zegar authored
D148697 post commit review change.
-
Matthias Springer authored
-
Matthias Springer authored
* Remove duplicate functions. `tensor::getMixedSize` and `tensor::getMixedSizes` should be used. * Use `tensor::getMixedSize` instead of `createOrFold<tensor::DimOp>`. This is more efficient. `createOrFold` will create an op an immediately try to fold it. In case of a static dimension size, an attribute can be used directly. Differential Revision: https://reviews.llvm.org/D153332
-
David Green authored
This adds some simple lowering of vecreduce_fminimum and vecreduce_fmaximum to fminv/fmaxv instructions, in the same way that vecreduce_fmax / vecreduce_fmin is lowered to fminnmv / fmaxnmv. Differential Revision: https://reviews.llvm.org/D153246
-
Dmitry Makogon authored
When multiplying several AddRecs, we do the following simplification: {A1,+,A2,+,...,+,An}<L> * {B1,+,B2,+,...,+,Bn}<L> = {x=1 in [ sum y=x..2x [ sum z=max(y-x, y-n)..min(x,n) [ choose(x, 2x)*choose(2x-y, x-z)*A_{y-z}*B_z]] ],+,...up to x=2n} This is done iteratively, pair by pair. So if we try to multiply three AddRecs A1, A2, A3, then we'd try to simplify A1 * A2 to A1' and then try to simplify A1' * A3 if A1' is also an AddRec. The transform is only legal if the loops of the two AddRecs are the same. It is checked in the code, but the loop of one of the AddRecs is stored in a local variable and doesn't get updated when we simplify a pair to a new AddRec. In the motivating test the new AddRec A1' was created for a different loop and, as the loop variable didn't get updated, the check for different loops passed and the transform worked for two AddRecs from different loops. So it created a wrong SCEV. And it caused LSR to replace an instruction with another one that had the same SCEV as the incorrectly computed one. Differential Revision: https://reviews.llvm.org/D153254 -
Matthias Springer authored
The old code used to materialize constants as ops, immediately folded them into the resulting affine map and then deleted the constant ops again. Instead, directly fold the attributes into the affine map. Furthermore, all helpers accept `OpFoldResult` instead of `Value` now. This makes the code at call sites more efficient, because it is no longer necessary to materialize a `Value`, just to be able to use these helper functions. Note: The API has changed (accepts OpFoldResult instead of Value), otherwise this change is NFC. Differential Revision: https://reviews.llvm.org/D153324
-
Diana Picus authored
We only check a subset of the constraints in the verifier: * that we only call the intrinsic from functions with a restricted set of calling conventions * that the 'flags' argument is an immediate Other checks are (probably) more appropriate for codegen. Differential Revision: https://reviews.llvm.org/D151995
-
Diana Picus authored
Add the amdgpu_cs_chain and amdgpu_cs_chain_preserve keywords to LLVM IR and make sure we can parse and print them. Also make sure we perform some basic checks in the IR verifier - similar to what we check for many of the other AMDGPU calling conventions, plus the additional restriction that we can't have direct calls to functions with these calling conventions. Differential Revision: https://reviews.llvm.org/D151994
-
Job Noorman authored
Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D153346
-
Job Noorman authored
Currently, all relocations that point inside a function are registered as external references. If these relocations cannot be resolved as jump tables or computed gotos, the containing function gets marked as not-simple and excluded from optimizations. RISC-V uses relocations for branches and jumps (to support linker relaxation) and as such, almost no functions get marked as simple. This patch fixes this by only registering relocations that originate outside of the referenced function as external references. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D153345
-
Job Noorman authored
Thispatch implements the R_RISCV_ADD32 and R_RISCV_SUB32 relocations for RISC-V. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D146554
-
Itay Bookstein authored
Signed-off-by:Itay Bookstein <itay.bookstein@nextsilicon.com>
-
Michael Platings authored
Previously if no matching multilib was found then the user would typically see an error like "fatal error: 'stdio.h' file not found" which gives no indication as to the underlying problem. With this change the user will instead see an error like clang: error: no multilib found matching flags: --target=thumbv7em-none-unknown-eabi -march=... clang: note: available multilibs are: --target=armv4t-none-unknown-eabi --target=thumbv6m-none-unknown-eabi -mfpu=none ... Differential Revision: https://reviews.llvm.org/D153292
-
Tobias Gysi authored
This revision ensures SwitchOps with case and condition bitwidths other than 32-bit are imported properly. It adds an APInt based builder to the SwitchOp and implements a verifier that checks that the condition and the case value types match. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D153438
-