- Jun 23, 2020
-
-
Simon Pilgrim authored
-
cgyurgyik authored
Summary: Adds a fuzz test for string comparison. This takes in two strings with associated lengths. Verifies each string contains at least one character, and that the last character is the null terminator. Then, finds the first instance where one of the following does not hold: 1. i < min(size1, size2) 2. s1[i] == s2[i] 3. s1[i] != '\0' The result of strcmp is then compared to the value of the difference between s1[i] and s2[i]. For thoroughness, the operands are reversed and also checked. Reviewers: sivachandra, PaulkaToast Reviewed By: sivachandra, PaulkaToast Subscribers: mgorny, tschuett, ecnelises, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D82247
-
cgyurgyik authored
Reviewed-by: todo Differential Revision: https://reviews.llvm.org/D82247
-
Aaron Ballman authored
Currently, using the nullPointerConstant AST matcher can lead to assertions in situations where a node to be matched does not have a valid type associated with it, such as a ParenListExpr. This patch addresses that by saying such nodes cannot be a null pointer constant. This addresses PR46353.
-
Sander de Smalen authored
This patch contains: - Support in LLVM CodeGen for bfloat16 types for ld2/3/4 and st2/3/4. - New bfloat16 ACLE builtins for svld(2|3|4)[_vnum] and svst(2|3|4)[_vnum] Reviewers: stuij, efriedma, c-rhodes, fpetrogalli Reviewed By: fpetrogalli Tags: #clang, #lldb, #llvm Differential Revision: https://reviews.llvm.org/D82187
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Was relying on other headers to define vfs::getRealFileSystem() for use in inline functions
-
Simon Pilgrim authored
Was relying on other headers to define sys::fs::real_path for use in CachedPathResolver::resolve inlines
-
Kerry McLaughlin authored
Summary: Changes SplitVecOp_VSETCC to use getVectorElementCount() Reviewers: sdesmalen, efriedma, dancgr Reviewed By: efriedma Subscribers: david-arm, tschuett, hiraditya, rkruppe, psnobl, huihuiz, cfe-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79167
-
Roman Lebedev authored
Summary: As [[ https://bugs.llvm.org/show_bug.cgi?id=45360 | PR45360 ]] reports, with new cost-model we can sometimes end up being able to expand `udiv`/`urem` instructions. And that exposes at least one instance of when we do that regardless of whether or not it is safe to do. In this particular case, it's `SimplifyIndvar::replaceIVUserWithLoopInvariant()`. It seems to me, we simply need to check with `isSafeToExpandAt()` first. The test isn't great. I'm not sure how to make it only run `-indvars`. Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=45360 | PR45360 ]]. Reviewers: mkazantsev, reames, helloqirun Reviewed By: mkazantsev Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82108
-
David Zarzycki authored
As of 516803dc, clang is now more strictly enforcing the coroutine specification. See: https://reviews.llvm.org/D82029
-
Chen Zheng authored
This patch adds a function to do following transformation: %0:g8rc_and_g8rc_nox0 = ADDI8 %5:g8rc_and_g8rc_nox0, 144 STD killed %7:g8rc, 16, %0:g8rc_and_g8rc_nox0 :: (store 8 into %ir.8) ------> STD killed %7:g8rc, 160, %5:g8rc_and_g8rc_nox0 :: (store 8 into %ir.8) Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D81723
-
Cullen Rhodes authored
Summary: svbfloat16_t should only be defined if the __ARM_FEATURE_SVE_BF16 feature macro is enabled, similar to the scalar bfloat16_t type. Also, arm_bf16.h should be included in arm_sve.h when __ARM_FEATURE_BF16_SCALAR_ARITHMETIC is defined. Patch also contains a fix for ld1ro intrinsic which should be guarded on __ARM_FEATURE_SVE_BF16 rather than __ARM_FEATURE_BF16_SCALAR_ARITHMETIC, and a fix for bfmmla test which was missing __ARM_FEATURE_BF16_SCALAR_ARITHMETIC and -target-feature +bf16 in the RUN line. Reviewed By: fpetrogalli Differential Revision: https://reviews.llvm.org/D82178
-
Dylan McKay authored
This reverts commit ede6005e. Ayke suggests this value varies chip-by-chip, and thus it is not safe to hardcode to 0x800100. Proper logic for this linker parameter will have to be wired up in a follow up patch.
-
Sebastian Neubauer authored
Print an error instead of crashing in two places. Differential Revision: https://reviews.llvm.org/D81074
-
Pavel Labath authored
Move the part of the code which is responsible for finding a complete definition of the type into a separate function (FindCompleteType). This is split off from D81561, as it's a generally useful cleanup. No functional change.
-
Simon Pilgrim authored
We perform PACKSS/PACKUS on AVX512 targets if the calling function wants to.
-
Simon Pilgrim authored
We had a EVT type variable called EVT, which isn't a good idea....
-
Paul Walker authored
Summary: This patch adds base support for code generating fixed length vector operations targeting a known SVE vector length. To achieve this we lower fixed length vector operations to equivalent scalable vector operations, whereby SVE predication is used to limit the elements processed to those present within the fixed length vector. Specifically this patch implements load and store operations, which get lowered to their masked counterparts thusly: V = load(Addr) => V = extract_fixed_vector(masked_load(make_pred(V.NumElts), Addr)) store(V, (Addr)) => masked_store(insert_fixed_vector(V), make_pred(V.NumElts), Addr)) Reviewers: rengolin, efriedma Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80385 -
Dylan McKay authored
Summary: The previous version relied on the standard calling convention using std::reverse() to try to force the AVR ABI. But this only works for simple cases, it fails for example with aggregate types. This patch rewrites the calling convention with custom C++ code, that implements the ABI defined in https://gcc.gnu.org/wiki/avr-gcc. To do that it adds a few 16-bit pseudo registers for unaligned argument passing, such as R24R23. For example this function: define void @fun({ i8, i16 } %a) will pass %a.0 in R22 and %a.1 in R24R23. There are no instructions that can use these pseudo registers, so a new register class, DREGSMOVW, is defined to make them apart. Also the ArgCC_AVR_BUILTIN_DIV is no longer necessary, as it is identical to the C++ behavior (actually the clobber list is more strict for __div* functions, but that is currently unimplemented). Reviewers: dylanmckay Subscribers: Gaelan, Sh4rK, indirect, jwagen, efriedma, dsprenkels, hiraditya, Jim, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68524 Patch by Rodrigo Rivas Costa.
-
Mikael Holmen authored
-
Kai Luo authored
-
James Henderson authored
Previously, if there was an error whilst parsing the operands of an extended opcode, the operands would be treated as zero and printed. This could potentially be slightly confusing. This patch changes the behaviour to print the raw bytes instead. Reviewed by: ikudrin Differential Revision: https://reviews.llvm.org/D81570
-
Simon Pilgrim authored
ProfileSummary was depending on other headers (notably WithColor.h) to define format().
-
Simon Pilgrim authored
StatepointLowering defines a cl::opt but don't include CommandLine.h.
-
Simon Pilgrim authored
LowLevelType was depending on other headers (notably WithColor.h) to define dbgs().
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D82265
-
Florian Hahn authored
This updates the MemorySSA backed implementation to treat arguments passed by value similar to allocas: in they are assumed to be invisible in the caller. This is similar to how they are treated in legacy DSE. Reviewers: efriedma, asbirlea, george.burgess.iv Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D82222
-
Richard Smith authored
Also, do not dump the desugared type for a TemplateSpecializationType twice.
-
Alex Lorenz authored
macOS goes to 11! This commit adds support for the new version number by ensuring that existing version comparison routines, and the 'darwin' OS identifier understands the new numbering scheme. It also adds a new utility method 'getCanonicalVersionForOS', which lets users translate some uses of macOS 10.16 into macOS 11. This utility method will be used in upcoming clang and swift commits. Differential Revision: https://reviews.llvm.org/D82337
-
Siva Chandra Reddy authored
Reviewers: asteinhauser Differential Revision: https://reviews.llvm.org/D82330
-
Michael Liao authored
Summary: - When promoting a pointer from memory to register, SROA skips pointers from different address spaces. However, as `ptrtoint` and `inttoptr` are defined as no-op casts if that integer type has the same as the pointer value, generate the pair of `ptrtoint`/`inttoptr` (no-op cast) sequence to convert pointers from different address spaces if they have the same size. Reviewers: arsenm, chandlerc, lebedev.ri Subscribers: Differential Revision: https://reviews.llvm.org/D81943
-
Max Kazantsev authored
We can sometimes replace a select with a Phi node if all of its values are available on respective incoming edges. Differential Revision: https://reviews.llvm.org/D82005 Reviewed By: nikic
-
Michael Liao authored
Summary: - AssertAlign node records the guaranteed alignment on its source node, where these alignments are retrieved from alignment attributes in LLVM IR. These tracked alignments could help DAG combining and lowering generating efficient code. - In this patch, the basic support of AssertAlign node is added. So far, we only generate AssertAlign nodes on return values from intrinsic calls. - Addressing selection in AMDGPU is revised accordingly to capture the new (base + offset) patterns. Reviewers: arsenm, bogner Subscribers: jvesely, wdng, nhaehnle, tpr, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81711
-
Richard Smith authored
templated class. When a defaulted operator<=> results in the injection of a defaulted operator==, that operator== can be named by unqualified name within the same class, even if the class is templated. To make this work, perform the transform from defaulted operator<=> to defaulted operator== in the template definition context instead of the template instantiation context. This results in our substituting into a declaration from a context where we don't have a full list of template arguments (or indeed any), for which we are now more careful to not spuriously instantiate declarations that are not dependent on the arguments we're substituting.
-
Wen-Heng (Jack) Chung authored
Differential Revision: https://reviews.llvm.org/D82304
-
Wen-Heng (Jack) Chung authored
Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes Tags: #mlir Differential Revision: https://reviews.llvm.org/D82333
-
Richard Smith authored
specializations and those that are done as part of rewrites. Do not create Subst* nodes in the latter. We previously had a hybrid of these two behaviors where we would only create some Subst* nodes but not others during deduction guide rewrites. No functional change intended, but the resulting ASTs are more principled.
-
Amy Kwan authored
This patch implements builtins for the following prototypes for the VSX Permute Control Vector Generate with Mask Instructions: vector unsigned char vec_genpcvm (vector unsigned char, const int); vector unsigned short vec_genpcvm (vector unsigned short, const int); vector unsigned int vec_genpcvm (vector unsigned int, const int); vector unsigned long long vec_genpcvm (vector unsigned long long, const int); Differential Revision: https://reviews.llvm.org/D81774
-
Sanjay Patel authored
This is the integer sibling to D81491. (a[0] + a[1] + a[2] + a[3]) - (b[0] + b[1] + b[2] +b[3]) --> (a[0] - b[0]) + (a[1] - b[1]) + (a[2] - b[2]) + (a[3] - b[3]) Removing the "experimental" from these intrinsics is likely not too far away.
-