- May 07, 2019
-
-
Nikita Popov authored
Add support for srem() to ConstantRange so we can use it in LVI. For srem the sign of the result matches the sign of the LHS. For the RHS only the absolute value is important. Apart from that the logic is like urem. Just like for urem this is only an approximate implementation. The tests check a few specific cases and run an exhaustive test for conservative correctness (but not exactness). Differential Revision: https://reviews.llvm.org/D61207 llvm-svn: 360055
-
Nikita Popov authored
This addresses one half of https://bugs.llvm.org/show_bug.cgi?id=41635 by combining a VECREDUCE_AND/OR into VECREDUCE_UMIN/UMAX (if latter is legal but former is not) for zero-or-all-ones boolean reductions (which are detected based on sign bits). Differential Revision: https://reviews.llvm.org/D61398 llvm-svn: 360054
-
Cameron McInally authored
Differential Revision: https://reviews.llvm.org/D61573 llvm-svn: 360053
-
Sanjay Patel authored
llvm-svn: 360052
-
- May 06, 2019
-
-
Sanjay Patel authored
llvm-svn: 360051
-
Guillaume Chatelet authored
Summary: This is a prerequisite to RFC http://lists.llvm.org/pipermail/llvm-dev/2019-April/131973.html Reviewers: courbet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61593 Fix typo. Turn this patch into an NFC. Addressing comments llvm-svn: 360050
-
Nico Weber authored
llvm-svn: 360049
-
Ilya Biryukov authored
llvm-svn: 360048
-
Simon Pilgrim authored
Initialize all member variables in X86ATTInstPrinter and X86DAGToDAGISel constructors to fix cppcheck warning. llvm-svn: 360047
-
Fangrui Song authored
Differential Revision: https://reviews.llvm.org/D61594 llvm-svn: 360046
-
Alexandre Ganea authored
Patch by xoviat Differential Revision: https://reviews.llvm.org/D60658 llvm-svn: 360045
-
Alexandre Ganea authored
Differential Revision: https://reviews.llvm.org/D61046 llvm-svn: 360044
-
Nemanja Ivanovic authored
A condition for exiting the legalization of v4i32 conversion to v2f64 through extract/convert/build erroneously checks for the extract having type i32. This is not adequate as smaller extracts are actually legalized to i32 as well. Furthermore, an early exit is missing which means that we only check that both extracts are from the same vector if that check fails. As a result, both cases in the included test case fail - the first gets a select error and the second generates incorrect code. The culprit commit is r274535. llvm-svn: 360043
-
Ilya Biryukov authored
Summary: Where semicolon is required in any case. Here's a list of completions that now have a semicolon: - namespace <name> = <target>; - using namespace <name>; - using <qualifier>::<name>; - continue; - break; - goto <label>; - return; - return <expression>; Reviewers: gribozavr Reviewed By: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61589 llvm-svn: 360042
-
Michal Gorny authored
Replace the constants used for r8/mm/xmm/ymm/zmm tests with something more readable to ease debugging in case of failures (0x00 0x01 ...). While at it, put the constants in array and copy them from memory to simplify inline asm. The original constants grew out of necessity. The xmm constants were 'weird' because they were intended to be different from mm constants (as that was necessary to catch NetBSD implementation bug). The ymm constants were made even weirded to not even partially collide with other xmm registers (not saying it made sense, just how it was done). Then, zmm constants were once again designed to avoid accidental collisions with xmm and ymm constants, and at the same the 16 extra registers required even more shuffling. The new constants are meant to be more user-readable, so that a mistake could be easily spotted. All of xmm, ymm and zmm tests use a sequence of {0x00 0x01 0x02 ...}, shifted by 1 for every register. This should provide enough uniquity, and space for future increase in number of registers. Since mm and r8..r15 are printed as uint64_t rather than byte-by-byte, they use 0x000102... As a result, on x86 endianness takes care of making mm different than xmm. The use of arrays is something I had to learn for zmm write tests. It avoids having to specify all the input values separately, and makes GCC happy about zmm-read test (it was rejected previously because of hitting a limit of 30 constraints). llvm-svn: 360041 -
Alexander Kornienko authored
Thanks to George Rimar for the suggestion. llvm-svn: 360040
-
Sam McCall authored
Summary: Embedding clients want to experiment with showing such results in e.g. a different color. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61588 llvm-svn: 360039
-
Jan Kratochvil authored
These two methods are very similar and various refactorizations need to modify both similar ways. One could also just remove GetCompileUnitAtOffset and make GetCompileUnitContainingDIEOffset to also accept offset of the CU itself (currently it accepts only DIE offsets after the CU header). But that would be less safe regarding some internal sanity checking. Further code refactorization has been suggested by Pavel Labath. Differential Revision: https://reviews.llvm.org/D61498 llvm-svn: 360038
-
Simon Pilgrim authored
findBroadcastedOp should always initialize the value if it returns true but static-analyzer isn't great at recognising this. llvm-svn: 360037
-
Fangrui Song authored
llvm-svn: 360036
-
Fangrui Song authored
llvm-svn: 360035
-
Anders Waldenborg authored
The purpose of this file is to make sure that all includes in llvm-c works when included from a C source file (i.e no C++isms sneaked in). To do this it must actually include all the include files. Reviewed By: whitequark Differential Revision: https://reviews.llvm.org/D61567 llvm-svn: 360033
-
Adam Balogh authored
Some programmers tend to forget that subtracting two pointers results in the difference between them in number of elements of the pointee type instead of bytes. This leads to codes such as `size_t size = (p - q) / sizeof(int)` where `p` and `q` are of type `int*`. Or similarily, `if (p - q < buffer_size * sizeof(int)) { ... }`. This patch extends `bugprone-sizeof-expression` to detect such cases. Differential Revision: https://reviews.llvm.org/D61422 llvm-svn: 360032 -
Simon Pilgrim authored
Properly initialize store type to null then ensure we find a real store type in the chain. Fixes scan-build null dereference warning and makes the code clearer. llvm-svn: 360031
-
Sam McCall authored
Summary: The hope is this will catch a few patterns with repetition: SomeClass* S = ^SomeClass::Create() int getFrobnicator() { return ^frobnicator_; } // discard the factory, it's no longer valid. ^MyFactory.reset(); Without triggering antipatterns too often: return Point(x.first, x.^second); I'm going to gather some data on whether this turns out to be a win overall. Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61537 llvm-svn: 360030 -
Fangrui Song authored
llvm-svn: 360029
-
Simon Pilgrim authored
scan-build was reporting that CommutableOpIdx1 never used its original initialized value - move it down to where its first used to make the real initialization more obvious (and matches the comment that's there). llvm-svn: 360028
-
Simon Pilgrim authored
Fixes cppcheck local shadow warning as well. llvm-svn: 360027
-
Ilya Biryukov authored
Add an initial '::' qualifier to all usages of 'testing' namespace that did not have one. The goal is to make our code style in tests more consistent. llvm-svn: 360026
-
Simon Pilgrim authored
scan-build was reporting that we were referencing a moved variable - in fact we were moving it twice..... llvm-svn: 360025
-
Hans Wennborg authored
This caused Clang to start erroring on the following: struct S { template <typename = int> explicit S(); }; struct T : S {}; struct U : T { U(); }; U::U() {} $ clang -c /tmp/x.cc /tmp/x.cc:10:4: error: call to implicitly-deleted default constructor of 'T' U::U() {} ^ /tmp/x.cc:5:12: note: default constructor of 'T' is implicitly deleted because base class 'S' has no default constructor struct T : S {}; ^ 1 error generated. See discussion on the cfe-commits email thread. This also reverts the follow-ups r359966 and r359968. > this patch adds support for the explicit bool specifier. > > Changes: > - The parsing for the explicit(bool) specifier was added in ParseDecl.cpp. > - The storage of the explicit specifier was changed. the explicit specifier was stored as a boolean value in the FunctionDeclBitfields and in the DeclSpec class. now it is stored as a PointerIntPair<Expr*, 2> with a flag and a potential expression in CXXConstructorDecl, CXXDeductionGuideDecl, CXXConversionDecl and in the DeclSpec class. > - Following the AST change, Serialization, ASTMatchers, ASTComparator and ASTPrinter were adapted. > - Template instantiation was adapted to instantiate the potential expressions of the explicit(bool) specifier When instantiating their associated declaration. > - The Add*Candidate functions were adapted, they now take a Boolean indicating if the context allowing explicit constructor or conversion function and this boolean is used to remove invalid overloads that required template instantiation to be detected. > - Test for Semantic and Serialization were added. > > This patch is not yet complete. I still need to check that interaction with CTAD and deduction guides is correct. and add more tests for AST operations. But I wanted first feedback. > Perhaps this patch should be spited in smaller patches, but making each patch testable as a standalone may be tricky. > > Patch by Tyker > > Differential Revision: https://reviews.llvm.org/D60934 llvm-svn: 360024 -
Guillaume Chatelet authored
Summary: Runs utils/update_llc_test_checks.py on a few memcpy files Reviewers: courbet Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61507 Remove cfi noise by adding nounwind llvm-svn: 360023
-
Fangrui Song authored
llvm-svn: 360022
-
Clement Courbet authored
Summary: Fixes PR40699. Reviewers: gchatelet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61585 llvm-svn: 360021
-
Sam McCall authored
This means "format" will no longer return an error if the -fallback-style flag is invalid, it will log and use LLVM style. This doesn't really matter. Also document the dependence on global variables. (This patch is a compromise - it's probably not worth actually avoiding the globals). llvm-svn: 360020
-
Pengfei Wang authored
Summary: Signed-off-by: Pengfei Wang <pengfei.wang@intel.com> Reviewers: LuoYuanke Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61580 llvm-svn: 360019
-
Luo, Yuanke authored
Summary: 1. Enable infrastructure of AVX512_BF16, which is supported for BFLOAT16 in Cooper Lake; 2. Enable intrinsics for VCVTNE2PS2BF16, VCVTNEPS2BF16 and DPBF16PS instructions, which are Vector Neural Network Instructions supporting BFLOAT16 inputs and conversion instructions from IEEE single precision. For more details about BF16 intrinsic, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference Patch by LiuTianle Reviewers: craig.topper, smaslov, LuoYuanke, wxiao3, annita.zhang, spatel, RKSimon Reviewed By: craig.topper Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60552 llvm-svn: 360018
-
Luo, Yuanke authored
Summary: 1. Enable infrastructure of AVX512_BF16, which is supported for BFLOAT16 in Cooper Lake; 2. Enable VCVTNE2PS2BF16, VCVTNEPS2BF16 and DPBF16PS instructions, which are Vector Neural Network Instructions supporting BFLOAT16 inputs and conversion instructions from IEEE single precision. VCVTNE2PS2BF16: Convert Two Packed Single Data to One Packed BF16 Data. VCVTNEPS2BF16: Convert Packed Single Data to Packed BF16 Data. VDPBF16PS: Dot Product of BF16 Pairs Accumulated into Packed Single Precision. For more details about BF16 isa, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference Author: LiuTianle Reviewers: craig.topper, smaslov, LuoYuanke, wxiao3, annita.zhang, RKSimon, spatel Reviewed By: craig.topper Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60550 llvm-svn: 360017
-
Sam McCall authored
Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61519 llvm-svn: 360016
-