summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ARM] Lower unsigned saturation to USAT Florian Hahn2017-12-205-7/+249
| | | | | | | | | | | | | | | | | Summary: Implement lower of unsigned saturation on an interval [0, k] where k + 1 is a power of two using USAT instruction in a similar way to how [~k, k] is lowered using SSAT on ARM models that supports it. Patch by Marten Svanfeldt Reviewers: t.p.northover, pbarrio, eastig, SjoerdMeijer, javed.absar, fhahn Reviewed By: fhahn Subscribers: fhahn, aemerson, javed.absar, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D41348 llvm-svn: 321164
* [AArch64][SVE] Re-submit patch series for ZIP1/ZIP2Sander de Smalen2017-12-2043-242/+804
| | | | | | | | | | | This patch resubmits the SVE ZIP1/ZIP2 patch series consisting of of r320992, r320986, r320973, and r320970 by reverting https://reviews.llvm.org/rL321024. The issue that caused r321024 has been addressed in https://reviews.llvm.org/rL321158, so this patch-series should be safe to resubmit. llvm-svn: 321163
* AArch64: fix one more place movi.2d could be created.Tim Northover2017-12-202-0/+23
| | | | | | Somehow got missed out of r320965. llvm-svn: 321162
* [clangd] Add debug printers for basic protocol types. NFCSam McCall2017-12-203-4/+23
| | | | llvm-svn: 321161
* Give up on array allocas in getPointerDereferenceableBytesBjorn Steinbrink2017-12-202-16/+2
| | | | | | | | | | | | | | | Summary: As suggested by Eli Friedman, don't try to handle array allocas here, because of possible overflows, instead rely on instcombine converting them to allocations of array types. Reviewers: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41398 llvm-svn: 321159
* [AArch64] Asm: Fix parsing of register aliases that have a name starting ↵Sander de Smalen2017-12-203-19/+22
| | | | | | | | | | | | | | | | with 'z' Summary: This fixes an issue as identified by @rnk in https://reviews.llvm.org/rL321029. Reviewers: rnk, fhahn, rengolin, efriedma, echristo, olista01 Reviewed By: rnk, fhahn Subscribers: aemerson, javed.absar, kristof.beyls, llvm-commits, rnk Differential Revision: https://reviews.llvm.org/D41382 llvm-svn: 321158
* [clangd] Igore cases in index fuzzy find.Eric Liu2017-12-202-1/+11
| | | | llvm-svn: 321157
* [clangd] Add "../" to Logger.h included from parent directory.Martin Bohme2017-12-201-1/+1
| | | | llvm-svn: 321156
* [AArch64] CCSIDR2 system registerSam Parker2017-12-204-0/+13
| | | | | | | | | | Implement the 'Current Cache Size' register that has been introduced as part of the Armv8.3 architecture. I originally missed this, and (hopefully) should be the final patch for assembler support. Differential Revision: https://reviews.llvm.org/D41396 llvm-svn: 321155
* [ELF] Fix an assignment command at the end of an .ARM.exidx section.Igor Kudrin2017-12-205-51/+100
| | | | | | | | The value of the symbol in the assignment should include the sentinel entry. Differential Revision: https://reviews.llvm.org/D41234 llvm-svn: 321154
* [X86][CLFLUSH]: Adding full coverage of MC encoding for the CLFLUSH isa ↵Gadi Haber2017-12-204-0/+104
| | | | | | | | | | | | | | sets.<NFC> NFC. Adding MC regressions tests to cover the CLFLSH and CLFLUSHOPT isa sets. This patch is part of a larger task to cover MC encoding of all X86 isa sets started in revision: https://reviews.llvm.org/D39952 Reviewers: zvi, RKSimon, craig.topper, m_zuckerman Differential Revision: https://reviews.llvm.org/D41331 Change-Id: Ifa643dd52f1b7184c52bc1806038dc74b234fc65 llvm-svn: 321153
* [X86] Optimize sign extends on index operand to gather/scatter to not sign ↵Craig Topper2017-12-202-72/+48
| | | | | | | | | | extend past i32. The gather instruction will implicitly sign extend to the pointer width, we don't need to further extend it. This can prevent unnecessary splitting in some cases. There's still an issue that lowering on non-VLX can introduce another sign extend that doesn't get combined with shifts from a lowered sign_extend_inreg. llvm-svn: 321152
* [builtins] Implement __chkstk for arm64 windowsMartin Storsjo2017-12-202-0/+40
| | | | | | Differential Revision: https://reviews.llvm.org/D41134 llvm-svn: 321151
* [AArch64] Implement stack probing for windowsMartin Storsjo2017-12-203-9/+130
| | | | | | Differential Revision: https://reviews.llvm.org/D41131 llvm-svn: 321150
* [COFF] Don't set the thumb bit in address table entries for data symbolsMartin Storsjo2017-12-202-9/+32
| | | | | | | | The thumb bit should only be set for executable code. Differential Revision: https://reviews.llvm.org/D41379 llvm-svn: 321149
* [X86] Add a missing return to combineGatherScatter after sucessful combine.Craig Topper2017-12-201-0/+1
| | | | | | Not sure how to test this cause I think the worst that happens is that we don't revisit the node a second time to look for additional combines. We used UpdateNodeOperands so the updating the DAG work was already done. llvm-svn: 321148
* [PowerPC] fix a bug in redundant compare eliminationHiroshi Inoue2017-12-202-6/+44
| | | | | | | | | | This patch fixes a bug in the redundant compare elimination reported in https://reviews.llvm.org/rL320786 and re-enables the optimization. The redundant compare elimination assumes that we can replace signed comparison with unsigned comparison for the equality check. But due to the difference in the sign extension behavior we cannot change the opcode if the comparison is against an immediate and the most significant bit of the immediate is one. Differential Revision: https://reviews.llvm.org/D41385 llvm-svn: 321147
* [WebAssembly] Improve toString(OutputSection). NFC.Sam Clegg2017-12-203-22/+17
| | | | llvm-svn: 321146
* [darwin][driver] Warn about mismatching -<os>-version-min rather thanAlex Lorenz2017-12-202-6/+37
| | | | | | | | | | superfluous -<os>-version-min compiler option rdar://35813850 Differential Revision: https://reviews.llvm.org/D41425 llvm-svn: 321145
* [hwasan] Remove --check-prefix=CHECK (NFC)Evgeniy Stepanov2017-12-201-1/+1
| | | | llvm-svn: 321141
* Replace a dyn_cast_or_null with dyn_cast.Rafael Espindola2017-12-201-1/+1
| | | | | | The variable being casted was accessed in the previous line. llvm-svn: 321140
* Revert r320942, "[ASTImporter] Support importing FunctionTemplateDecl and ↵Peter Collingbourne2017-12-202-155/+0
| | | | | | | | | | | | | | | | | CXXDependentScopeMemberExpr" Caused a test failure on Windows: [ RUN ] ImportExpr.ImportCXXDependentScopeMemberExpr C:\b\rr\tmppzcp4w\w\src\third_party\llvm\tools\clang\unittests\AST\ASTImporterTest.cpp(526): error: Value of: testImport("template <typename T> class C { T t; };" "template <typename T> void declToImport() {" " C<T> d;" " d.t;" "}", Lang_CXX, "", Lang_CXX, Verifier, functionTemplateDecl(has(functionDecl(has(compoundStmt( has(cxxDependentScopeMemberExpr()))))))) Actual: false (Could not find match) Expected: true C:\b\rr\tmppzcp4w\w\src\third_party\llvm\tools\clang\unittests\AST\ASTImporterTest.cpp(534): error: Value of: testImport("template <typename T> class C { T t; };" "template <typename T> void declToImport() {" " C<T> d;" " (&d)->t;" "}", Lang_CXX, "", Lang_CXX, Verifier, functionTemplateDecl(has(functionDecl(has(compoundStmt( has(cxxDependentScopeMemberExpr()))))))) Actual: false (Could not find match) Expected: true [ FAILED ] ImportExpr.ImportCXXDependentScopeMemberExpr (37 ms) llvm-svn: 321139
* [memcpyopt] Teach memcpyopt to optimize across basic blocksDan Gohman2017-12-207-19/+306
| | | | | | | | | | | | | | | | | This teaches memcpyopt to make a non-local memdep query when a local query indicates that the dependency is non-local. This notably allows it to eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%. This is r319482 and r319483, along with fixes for PR35519: fix the optimization that merges stores into memsets to preserve cached memdep info, and fix memdep's non-local caching strategy to not assume that larger queries are always more conservative than smaller ones. Fixes PR28958 and PR35519. Differential Revision: https://reviews.llvm.org/D40802 llvm-svn: 321138
* [X86] Improve coverage of fma negations.Craig Topper2017-12-201-0/+144
| | | | llvm-svn: 321137
* [X86] Fix probable typo in fma fneg test.Craig Topper2017-12-201-11/+11
| | | | llvm-svn: 321136
* [analyzer] De-duplicate path diagnostics for each exploded graph node.Artem Dergachev2017-12-203-262/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | The bugreporter::trackNullOrUndefValue() mechanism contains a system of bug reporter visitors that recursively call each other in order to track where a null or undefined value came from, where each visitor represents a particular tracking mechanism (track how the value was stored, track how the value was returned from a function, track how the value was constrained to null, etc.). Each visitor is only added once per value it needs to track. Almost. One exception from this rule would be FindLastStoreBRVisitor that has two operation modes: it contains a flag that indicates whether null stored values should be suppressed. Two instances of FindLastStoreBRVisitor with different values of this flag are considered to be different visitors, so they can be added twice and produce the same diagnostic twice. This was indeed the case in the affected test. With the current logic of this whole machinery, such duplication seems unavoidable. We should be able to safely add visitors with different flag values without constructing duplicate diagnostic pieces. Hence the effort in this commit to de-duplicate diagnostics regardless of what visitors have produced them. Differential Revision: https://reviews.llvm.org/D41258 llvm-svn: 321135
* [WebAssembly] Add test of indirect call to an otherwise unused typeSam Clegg2017-12-201-2/+22
| | | | | | | | | | | | | In this case we are calling a function pointer which a type that doesn't otherwise exist in the code. Clearly this code can't would trap if it was ever called (because there is not such function that the pointer can resolve to). But it should valid and compile and link and validation time. llvm-svn: 321134
* [analyzer] trackNullOrUndefValue: always track through parentheses and casts.Artem Dergachev2017-12-206-335/+596
| | | | | | | | | | | | | | | When trying to figure out where a null or undefined value came from, parentheses and cast expressions are either completely irrelevant, or, in the case of lvalue-to-rvale cast, straightforwardly lead us in the right direction when we remove them. There is a regression that causes a certain diagnostic to appear twice in the path-notes.cpp test (changed to FIXME). It would be addressed in the next commit. Differential revision: https://reviews.llvm.org/D41254 llvm-svn: 321133
* [X86] Remove code from combineSext that looks for MVT::i1 after operation ↵Craig Topper2017-12-201-7/+1
| | | | | | | | legalization which can never happen. Type legalization guarantees this to be impossible since MVT::i1 isn't a legal type. llvm-svn: 321132
* [WebAssembly] Disable tee_local optimizations when targeting the ELF ABI.Dan Gohman2017-12-201-1/+9
| | | | | | | These optimizations depend on the ExplicitLocals pass to lower TEE instructions, which is disabled in the ELF ABI, so disable them too. llvm-svn: 321131
* [analyzer] trackNullOrUndefValue: track last store to non-variables.Artem Dergachev2017-12-203-3/+25
| | | | | | | | | | | | | | | | | When reporting certain kinds of analyzer warnings, we use the bugreporter::trackNullOrUndefValue mechanism, which is part of public checker API, to understand where a zero, null-pointer, or garbage value came from, which would highlight important events with respect to that value in the diagnostic path notes, and help us suppress various false positives that result from values appearing from particular sources. Previously, we've lost track of the value when it was written into a memory region that is not a plain variable. Now try to resume tracking in this situation by finding where the last write to this region has occured. Differential revision: https://reviews.llvm.org/D41253 llvm-svn: 321130
* [X86] Add more CPUID bits to cpuid.h to match gcc and support icelake features.Craig Topper2017-12-201-5/+14
| | | | llvm-svn: 321129
* [analyzer] Fix a crash during C++17 aggregate construction of base objects.Artem Dergachev2017-12-203-2/+72
| | | | | | | | | | | | | | | | | | | | | | | Since C++17, classes that have base classes can potentially be initialized as aggregates. Trying to construct such objects through brace initialization was causing the analyzer to crash when the base class has a non-trivial constructor, while figuring target region for the base class constructor, because the parent stack frame didn't contain the constructor of the subclass, because there is no constructor for subclass, merely aggregate initialization. This patch avoids the crash, but doesn't provide the actually correct region for the constructor, which still remains to be fixed. Instead, construction goes into a fake temporary region which would be immediately discarded. Similar extremely conservative approach is used for other cases in which the logic for finding the target region is not yet implemented, including aggregate initialization with fields instead of base-regions (which is not C++17-specific but also never worked, just didn't crash). Differential revision: https://reviews.llvm.org/D40841 rdar://problem/35441058 llvm-svn: 321128
* [WebAssembly] Remove an obsolete comment.Dan Gohman2017-12-201-2/+1
| | | | llvm-svn: 321127
* Use references instead of pointers. NFC.Rafael Espindola2017-12-196-32/+30
| | | | | | | These values are trivially never null. While at it, also use InputSection instead of InputSectionBase when possible. llvm-svn: 321126
* Revert "Fix faulty assertion in debug info"Adrian McCarthy2017-12-193-92/+2
| | | | | | This reverts commit e32def3f7ebe1136b7038336eff56a415a962bf2. llvm-svn: 321125
* libcxx: Fix for basic_stringbuf::seekoff() after r320604.Peter Collingbourne2017-12-192-2/+27
| | | | | | | | | | | | | As a result of this change, the basic_stringbuf constructor that takes a mode ends up leaving __hm_ set to 0, causing the comparison "__hm_ - __str_.data() < __noff" in seekoff() to succeed, which caused the function to incorrectly return -1. The fix is to account for the possibility of __hm_ being 0 when computing the distance from __hm_ to the start of the string. Differential Revision: https://reviews.llvm.org/D41319 llvm-svn: 321124
* Replace an accidentally added "break" with an LLVM_FALLTHROUGH.Adrian Prantl2017-12-191-1/+1
| | | | | | Thanks to Greg Clayton for catchting this! llvm-svn: 321123
* Fix faulty assertion in debug infoAdrian McCarthy2017-12-193-2/+92
| | | | | | | | | | | | | | It appears the code uses nullptr to represent a void type in debug metadata, which led to an assertion failure when building DeltaAlgorithm.cpp with a self-hosted clang on Windows. I'm not sure why/if the problem was Windows-specific. Fixes bug https://bugs.llvm.org/show_bug.cgi?id=35543 Differential Revision: https://reviews.llvm.org/D41264 llvm-svn: 321122
* [hwasan] Fix handling of store errors.Evgeniy Stepanov2017-12-192-10/+21
| | | | llvm-svn: 321121
* Fix a couple of warnings (NFC)Adrian Prantl2017-12-194-3/+7
| | | | llvm-svn: 321120
* [hwasan] Remove unused -check-prefix in tests.Evgeniy Stepanov2017-12-192-5/+5
| | | | llvm-svn: 321119
* [X86] Add an assert to indicate that there is only once specific VT allowed ↵Craig Topper2017-12-191-0/+2
| | | | | | | | at a certain point in LowerMULH. Helps with code readability a little. llvm-svn: 321118
* Add explicit break (PR35700).Adrian Prantl2017-12-191-0/+1
| | | | llvm-svn: 321116
* Silence a bunch of implicit fallthrough warningsAdrian Prantl2017-12-1928-69/+74
| | | | llvm-svn: 321115
* Silence a bunch of implicit fallthrough warningsAdrian Prantl2017-12-1917-7/+22
| | | | llvm-svn: 321114
* [CodeGen] Move printing MO_BlockAddress operands to MachineOperand::printFrancis Visoiu Mistrih2017-12-193-44/+45
| | | | | | | Work towards the unification of MIR and debug output by refactoring the interfaces. llvm-svn: 321113
* [CodeGen] Move printing MO_IntrinsicID operands to MachineOperand::printFrancis Visoiu Mistrih2017-12-194-9/+33
| | | | | | | Work towards the unification of MIR and debug output by refactoring the interfaces. llvm-svn: 321112
* [CodeGen] Move printing MO_IntrinsicID operands to MachineOperand::printFrancis Visoiu Mistrih2017-12-194-15/+45
| | | | | | | | | | Work towards the unification of MIR and debug output by refactoring the interfaces. Also add support for printing with a null TargetIntrinsicInfo and no MachineFunction. llvm-svn: 321111
* [CodeGen] Move printing MO_FPImmediate operands to MachineOperand::printFrancis Visoiu Mistrih2017-12-193-27/+3
| | | | | | | Work towards the unification of MIR and debug output by refactoring the interfaces. llvm-svn: 321110
OpenPOWER on IntegriCloud