- Dec 03, 2021
-
-
Stephen Tozer authored
Prior to this patch, tail duplication handled debug info poorly - specifically, debug instructions would be dropped instead of being set undef, potentially extending the lifetimes of prior debug values that should be killed. The pass was also very aggressive with dropping debug info, dropping debug info even when the SSA value it referred to was still present. This patch attempts to handle debug info more carefully, checking to see whether each affected debug value can still be live, setting it undef if not. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D106875
-
David Green authored
This adjusts all the MVE and CDE intrinsics now that v2i1 is a legal type, to use a <2 x i1> as opposed to emulating the predicate with a <4 x i1>. The v4i1 workarounds have been removed leaving the natural v2i1 types, notably in vctp64 which now generates a v2i1 type. AutoUpgrade code has been added to upgrade old IR, which needs to convert the old v4i1 to a v2i1 be converting it back and forth to an integer with arm.mve.v2i and arm.mve.i2v intrinsics. These should be optimized away in the final assembly. Differential Revision: https://reviews.llvm.org/D114455
-
Tue Ly authored
Fix a bug with negative and mixed normal/denormal inputs in hypot implementation. Differential Revision: https://reviews.llvm.org/D114726
-
Nemanja Ivanovic authored
The Power ISA defined l[bhwdq]arx as both base and extended mnemonics. The base mnemonic takes the EH bit as an operand and the extended mnemonic omits it, making it implicitly zero. The existing implementation only handles the base mnemonic when EH is 1 and internally produces a different instruction. There are historical reasons for this. This patch simply removes the limitation introduced by this implementation that disallows the base mnemonic with EH = 0 in the ASM parser. This resolves an issue that prevented some files in the Linux kernel from being built with -fintegrated-as. Also fix a crash if the value is not an integer immediate.
-
Anna Thomas authored
The earlier usage of wouldInstructionBeTriviallyDead is based on the assumption that the use_count of that instruction being checked will be zero. This patch separates the API into two different ones: 1. The strictly conservative one where the instruction is trivially dead iff the uses are dead. 2. The slightly relaxed form, where an instruction is dead along paths where it is not used. The second form can be used in identifying instructions that are valid to sink down to uses (D109917). Reviewed-By: reames Differential Revision: https://reviews.llvm.org/D114647
-
Andy Yankovsky authored
The adapter does support `Modules` request, implemented in 39239f9b. Reviewed By: wallace Differential Revision: https://reviews.llvm.org/D115033
-
Alexey Bataev authored
Need to do the analysis of the captured expressions in the clauses. Previously the compiler ignored them and it may lead to a compiler crash trying to get the address of the mapped variables. Differential Revision: https://reviews.llvm.org/D114546
-
Mehrnoosh Heidarpour authored
-
Matthias Springer authored
BufferizationState had map/lookup overloads for non-tensor values. This was necessary for IREE. There is now a better way to do this, so these overloads can be removed. Differential Revision: https://reviews.llvm.org/D114929
-
David Green authored
MVE can treat v16i1, v8i1, v4i1 and v2i1 as different views onto the same 16bit VPR.P0 register, with v2i1 holding two 8 bit values for the two halves. This was never treated as a legal type in llvm in the past as there are not many 64bit instructions and no 64bit compares. There are a few instructions that could use it though, notably a VSELECT (as it can handle any size using the underlying v16i8 VPSEL), AND/OR/XOR for similar reasons, some gathers/scatter and long multiplies and VCTP64 instructions. This patch goes through and makes v2i1 a legal type, handling all the cases that fall out of that. It also makes VSELECT legal for v2i64 as a side benefit. A lot of the codegen changes as a result - usually in way that is a little better or a little worse, but still expensive. Costs can change a little too in the process, again in a way that expensive things remain expensive. A lot of the tests that changed are mainly to ensure correctness - the code can hopefully be im...
-
Jay Foad authored
-
Valentin Clement authored
This patch adds the FIR builder to generate the numeric intrinsic runtime call. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: rovka Differential Revision: https://reviews.llvm.org/D114900 Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
mleair <leairmark@gmail.com>
-
Valentin Clement authored
This patch adds the builder to generate derived type runtime API calls. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: rovka Differential Revision: https://reviews.llvm.org/D114472 Co-authored-by:
Peter Klausler <pklausler@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Jay Foad authored
-
Matthias Springer authored
This simplifies op interface implementations. Differential Revision: https://reviews.llvm.org/D115025
-
Jay Foad authored
-
Florian Hahn authored
-
Guillaume Chatelet authored
-
Adrian Kuegel authored
-
Simon Pilgrim authored
As discussed on D114589 as the constant case gets affected by SimplifyDemandedBits a lot - the non-constant case currently falls back to copysignl libcalls
-
Petar Avramovic authored
Add clamp combine. Source is fminnum(fmaxnum(Val, 0.0), 1.0) or fmaxnum(fminnum(Val, 1.0), 0.0) or fmed3 intrinsic with 0.0 and 1.0 as two out of three operands. Differential Revision: https://reviews.llvm.org/D90052
-
Petar Avramovic authored
Add floating point version of med3 combine. Source is fminnum(fmaxnum(Val, K0), K1) or fmaxnum(fminnum(Val, K1), K0) where K0 and K1 are constants and K0 <= K1. Differential Revision: https://reviews.llvm.org/D90051
-
Petar Avramovic authored
Recognize constant splat padded with undef in isCanonicalized. Fcanonicalize will be removed by RemoveFcanonicalize in post-legalizer combiner. We will treat undef as value that will result in a splat in clamp combine after regbankselect. Differential Revision: https://reviews.llvm.org/D104408
-
Alex Zinenko authored
A previous commit added support for converting elemental types contained in LLVM dialect types in case they were not compatible with the LLVM dialect. It was missing support for named structs as they could be recursive, which was not supported by the conversion infra. Now that it is, add support for converting such named structs. Depends On D113579 Reviewed By: wsmoses Differential Revision: https://reviews.llvm.org/D113580
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D114670
-
Matthias Springer authored
Allow ops that are not bufferizable in the input IR. (Deactivated by default.) bufferization::ToMemrefOp and bufferization::ToTensorOp are generated at the bufferization boundaries. Differential Revision: https://reviews.llvm.org/D114669
-
Victor Perez authored
Lower vp.select instrinsic to VSELECT_VL. Reviewed By: rogfer01 Differential Revision: https://reviews.llvm.org/D114629
-
Diana Picus authored
-
Diana Picus authored
Rewrite AddrOfOp if taking the address of a function. Differential Revision: https://reviews.llvm.org/D114925 Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com>
-
Matthias Springer authored
Also store a reference to BufferizationOptions in BufferizationState. This is in preparation of adding support for partial bufferization. Differential Revision: https://reviews.llvm.org/D114661
-
Valentin Clement authored
Convert a fircg.ext_embox operation to LLVM IR dialect. A fircg.ext_embox is converted to a sequence of operation that create, allocate if needed, and populate a descriptor. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D114148 Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Kristina Bessonova authored
Reviewed By: dblaikie, jhenderson Differential Revision: https://reviews.llvm.org/D114892
-
Qiu Chaofan authored
This does similar thing to 6b1341eb, but fixes single element 128-bit float type: `struct { long double x; }`. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D114937
-
Qiu Chaofan authored
Glibc 2.32 and newer uses these symbol names to support IEEE-754 128-bit float. GCC transforms name of these builtins to align with Glibc header behavior. Since Clang doesn't have all GCC-compatible builtins implemented, this patch only mutates the implemented part. Note nexttoward is a special case (no nexttowardf128) so it's also handled here. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D112401
-
Guillaume Chatelet authored
-
Florian Hahn authored
DSE has some extra logic to determine the write location of library calls like str*cpy and str*cat. This patch moves the logic to a new MemoryLocation:getForDest variant, which takes a call and TLI. This patch should be NFC, because no other places take advantage of the new helper yet. Suggested by @reames post-commit 7eec832d. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D114872
-
Nikita Popov authored
Fixes verification failure reported at: https://reviews.llvm.org/rGc9f9be0381d1 The issue is that getSCEVAtScope() might compute a result without inserting it in the ValuesAtScopes map in degenerate cases, specifically if the ValuesAtScopes entry is invalidated during the calculation. Arguably we should still insert the result if no existing placeholder is found, but for now just tweak the logic to only update ValuesAtScopesUsers if ValuesAtScopes is updated.
-
Michal Terepeta authored
The implementation only allows to bit-cast between two 0-D vectors. We could probably support casting from/to vectors like `vector<1xf32>`, but I wasn't convinced that this would be important and it would require breaking the invariant that `BitCastOp` works only on vectors with equal rank. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D114854
-
Michal Terepeta authored
Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D114853
-
Florian Hahn authored
strcpy/strcat/strncat access memory starting from the passed in pointers. Construct memory locations for their args using getAfter. Discussed in D114872. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D114969
-