summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86][AVX] Extended vector average testsSimon Pilgrim2017-06-231-411/+917
| | | | | | Added AVX1 tests and merged AVX1/AVX2/AVX512 checks where possible llvm-svn: 306107
* [SystemZ] Fix trap issue and enable expensive checks.Jonas Paulsson2017-06-235-18/+29
| | | | | | | | | | | | | | | | | | | | | | | The isBarrier/isTerminator flags have been removed from the SystemZ trap instructions, so that tests do not fail with EXPENSIVE_CHECKS. This was just an issue at -O0 and did not affect code output on benchmarks. (Like Eli pointed out: "targets are split over whether they consider their "trap" a terminator; x86, AArch64, and NVPTX don't, but ARM, MIPS, PPC, and SystemZ do. We should probably try to be consistent here.". This is still the case, although SystemZ has switched sides). SystemZ now returns true in isMachineVerifierClean() :-) These Generic tests have been modified so that they can be run with or without EXPENSIVE_CHECKS: CodeGen/Generic/llc-start-stop.ll and CodeGen/Generic/print-machineinstrs.ll Review: Ulrich Weigand, Simon Pilgrim, Eli Friedman https://bugs.llvm.org/show_bug.cgi?id=33047 https://reviews.llvm.org/D34143 llvm-svn: 306106
* [RuntimeLoopUnrolling] Rename exit block and move assert earlier. NFCAnna Thomas2017-06-231-23/+23
| | | | | | | The single exit block allowed in runtime unrolling is guaranteed to be the Latch's successor, so rename it as LatchExitBlock. llvm-svn: 306105
* [X86][SSE] Dropped -mcpu from vector average testsSimon Pilgrim2017-06-231-645/+686
| | | | | | Use triple and attribute only for consistency llvm-svn: 306104
* PR26195: Set correct NestedNameSpecifierLoc for the dependent initializerAlex Lorenz2017-06-232-0/+126
| | | | | | | | | | | | | | | | | | This commit fixes incorrect source positions of dependent c'tor initializers like in the following code: template<typename MyBase> struct Derived: MyBase::InnerIterator { Derived() : MyBase::InnerIterator() {} /// This line is problematic: all positions point to InnerIterator and nothing points to MyBase }; Patch by Serge Preis! Differential Revision: https://reviews.llvm.org/D32439 llvm-svn: 306103
* [docs] As of binutils 2.21.51.0.2, ld.bfd supports plugins too, represent ↵Ekaterina Vaartis2017-06-231-11/+9
| | | | | | | | this in docs PR#32760 llvm-svn: 306102
* Fix double->float truncation warning on MSVCSimon Pilgrim2017-06-231-2/+2
| | | | llvm-svn: 306101
* [InstCombine] Recognize and simplify three way comparison idiomsAnna Thomas2017-06-233-4/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Many languages have a three way comparison idiom where comparing two values produces not a boolean, but a tri-state value. Typical values (e.g. as used in the lcmp/fcmp bytecodes from Java) are -1 for less than, 0 for equality, and +1 for greater than. We actually do a great job already of converting three way comparisons into binary comparisons when the result produced has one a single use. Unfortunately, such values can have more than one use, and in that case, our existing optimizations break down. The patch adds a peephole which converts a three-way compare + test idiom into a binary comparison on the original inputs. It focused on replacing the test on the result of the three way compare and does nothing about removing the three way compare itself. That's left to other optimizations (which do actually kick in commonly.) We currently recognize one idiom on signed integer compare. In the future, we plan to recognize and simplify other comparison idioms on other signed/unsigned datatypes such as floats, vectors etc. This is a resurrection of Philip Reames' original patch: https://reviews.llvm.org/D19452 Reviewers: majnemer, apilipenko, reames, sanjoy, mkazantsev Reviewed by: mkazantsev Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34278 llvm-svn: 306100
* Revert r306095: [mips] Fix reg positions in the aui/daui instructionsPetar Jovanovic2017-06-237-12/+12
| | | | | | | | | | | | | | | ELF/mips-plt-r6.s in lld-test is failing. Reverting the change. Original commit message: [mips] Fix register positions in the aui/daui instructions Swapped the position of the rt and rs register in the aut/daui instructions for mips32r6 and mips64r6. With this change, the format of the generated instructions complies with specifications and GCC. Patch by Milos Stojanovic. llvm-svn: 306099
* Fix build breakage caused by r306096Pavel Labath2017-06-231-3/+3
| | | | | | | It seems some targets don't have std::strtof and friends. Hopefully, dropping the std:: will be fine, as that's what the compiler recommends. llvm-svn: 306098
* [X86][SSE] Dropped -mcpu from scalar math testsSimon Pilgrim2017-06-231-6/+4
| | | | | | Use triple and attribute only for consistency llvm-svn: 306097
* [ADT] Add llvm::to_floatPavel Labath2017-06-234-20/+58
| | | | | | | | | | | | | | | | | | Summary: The function matches the interface of llvm::to_integer, but as we are calling out to a C library function, I let it take a Twine argument, so we can avoid a string copy at least in some cases. I add a test and replace a couple of existing uses of strtod with this function. Reviewers: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34518 llvm-svn: 306096
* [mips] Fix register positions in the aui/daui instructionsPetar Jovanovic2017-06-237-12/+12
| | | | | | | | | | | | Swapped the position of the rt and rs register in the aut/daui instructions for mips32r6 and mips64r6. With this change, the format of the generated instructions complies with specifications and GCC. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D33988 llvm-svn: 306095
* [clang-format] Add a SortUsingDeclaration option and enable it by defaultKrasimir Georgiev2017-06-234-26/+69
| | | | | | | | | | | | | | | | Summary: This patch adds a `SortUsingDeclaration` style option and enables it for llvm style. Reviewers: klimek Reviewed By: klimek Subscribers: klimek Differential Revision: https://reviews.llvm.org/D34453 llvm-svn: 306094
* [clang-format] Update dump_format_style.py to indent nested fieldsKrasimir Georgiev2017-06-232-107/+108
| | | | | | | | | | | | | | | | | | Summary: This updates the format options documentation script to indent the documentation of nested fields. The previous format caused some problems, as when a bulleted list ends with a multiline comment. See the buildbot failure http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/10020/steps/docs-clang-html/logs/stdio Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34552 llvm-svn: 306093
* [X86][SSE] Dropped -mcpu from insertps testsSimon Pilgrim2017-06-231-3/+3
| | | | | | Use triple and attribute only for consistency llvm-svn: 306092
* [clang-tidy] Fix a false positive in modernize-use-nullptr.Haojian Wu2017-06-232-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The FP happens when a casting nullptr expression is used within a NULL-default-arguemnt cxx constructor. Before the fix, the check will give a warning on nullptr when running with the test case, which should not happen: ``` G(g(static_cast<char*>(nullptr))); ^~~~~~~~~~~ nullptr ``` Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits, xazax.hun Differential Revision: https://reviews.llvm.org/D34524 llvm-svn: 306091
* [mips][msa] Splat.d endianness checkStefan Maksimovic2017-06-232-6/+33
| | | | | | | | | | | | | Before this change, it was always the first element of a vector that got splatted since the lower 6 bits of vshf.d $wd were always zero for little endian. Additionally, masking has been performed for vshf via which splat.d is created. Vshf has a property where if its first operand's elements have either bit 6 or 7 set, destination element is set to zero. Initially masked with 63 to avoid this property, which would result in generation of and.v + vshf.d in all cases. Masking with one results in generating a single splati.d instruction when possible. Differential Revision: https://reviews.llvm.org/D32216 llvm-svn: 306090
* [clang-format] Update style documentation, NFCKrasimir Georgiev2017-06-232-19/+101
| | | | | | | | | | | | Summary: Style documentation is generated automatically by `docs/tools/dump_format_style.py`. This hasn't been ran for a while. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D34457 llvm-svn: 306089
* Bail out early in case we see an invalid runtime context in buildAliasGroupsTobias Grosser2017-06-231-0/+3
| | | | llvm-svn: 306088
* Hoist buildMinMaxAccess computeout to cover full alias-groupTobias Grosser2017-06-231-12/+13
| | | | | | | | | This allows us to bail out both in case the lexmin/max computation is too expensive, but also in case the commulative cost across an alias group is too expensive. This is an improvement of r303404, which did not seem to be sufficient to keep the Android Buildbot quiet. llvm-svn: 306087
* [islpp] Move buildMinMaxAccess[es] to C++ [NFC]Tobias Grosser2017-06-231-63/+48
| | | | llvm-svn: 306086
* [JumpThreading] Teach jump threading how to analyze (and (cmp A, C1), (cmp ↵Craig Topper2017-06-233-0/+68
| | | | | | | | | | | | | | A, C2)) after InstCombine has turned it into (cmp (add A, C3), C4) Currently JumpThreading can use LazyValueInfo to analyze an 'and' or 'or' of compare if the compare is fed by a livein of a basic block. This can be used to to prove the condition can't be met for some predecessor and the jump from that predecessor can be moved to the false path of the condition. But if the compare is something that InstCombine turns into an add and a single compare, it can't be analyzed because the livein is now an input to the add and not the compare. This patch adds a new method to LVI to get a ConstantRange on an edge. Then we teach jump threading to detect the add livein feeding a compare and to get the ConstantRange and propagate it. Differential Revision: https://reviews.llvm.org/D33262 llvm-svn: 306085
* [JumpThreading] Use some temporary variables to reduce the number of times ↵Craig Topper2017-06-231-12/+16
| | | | | | | | we call the same methods. NFC A future patch will add even more uses of these variables. llvm-svn: 306084
* Implement inclusive_scan/transform_inclusive_scan for C++17.Marshall Clow2017-06-236-0/+722
| | | | llvm-svn: 306083
* COFF: Produce an error on invalid pcrel relocs.Rafael Espindola2017-06-236-36/+39
| | | | | | | | | | X86_64 COFF only has support for 32 bit pcrel relocations. Produce an error on all others. Note that gnu as has extended the relocation values to support this. It is not clear if we should support the gnu extension. llvm-svn: 306082
* [LoopSimplify] Factor the logic to form dedicated exits into a utility.Chandler Carruth2017-06-236-65/+91
| | | | | | | | | | | | | | | | | | | | | | I want to use the same logic as LoopSimplify to form dedicated exits in another pass (SimpleLoopUnswitch) so I wanted to factor it out here. I also noticed that there is a pretty significantly more efficient way to implement this than the way the code in LoopSimplify worked. We don't need to actually retain the set of unique exit blocks, we can just rewrite them as we find them and use only a set to deduplicate. This did require changing one part of LoopSimplify to not re-use the unique set of exits, but it only used it to check that there was a single unique exit. That part of the code is about to walk the exiting blocks anyways, so it seemed better to rewrite it to use those exiting blocks to compute this property on-demand. I also had to ditch a statistic, but it doesn't seem terribly valuable. Differential Revision: https://reviews.llvm.org/D34049 llvm-svn: 306081
* Make the test a bit more strict. NFC.Rafael Espindola2017-06-231-62/+64
| | | | llvm-svn: 306080
* [Frontend] 'Show hotness' can be used with a sampling profileBrian Gesiak2017-06-233-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Prior to this change, using `-fdiagnostics-show-hotness` with a sampling profile specified via `-fprofile-sample-use=` would result in the Clang frontend emitting a warning: "argument '-fdiagnostics-show-hotness' requires profile-guided optimization information". Of course, a sampling profile *is* profile-guided optimization information, so the warning is misleading. Furthermore, despite the warning, hotness was displayed based on the data in the sampling profile. Prevent the warning from being emitted when a sampling profile is used, and add a test that verifies this. Reviewers: anemet, davidxl Reviewed By: davidxl Subscribers: danielcdh, cfe-commits Differential Revision: https://reviews.llvm.org/D34082 llvm-svn: 306079
* COFF: handle "undef - ." expressions.Rafael Espindola2017-06-233-17/+10
| | | | | | | This is another thing that the ELF implementation can do but is missing from COFF. llvm-svn: 306078
* Add missing file from r306075.Richard Smith2017-06-231-0/+1
| | | | llvm-svn: 306077
* [LVI] Teach LVI to reason about ORs of icmps similar to how it reasons about ↵Craig Topper2017-06-232-5/+100
| | | | | | | | | | | | | | | | ANDs of icmps Summary: LVI can reason about an AND of icmps on the true dest of a branch. I believe we can do similar for the false dest of ORs. This allows us to get the same answer for the demorganed versions of some of the AND test cases as you can see. Reviewers: anna, reames Reviewed By: reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34431 llvm-svn: 306076
* PR33552: Distinguish between declarations that are owned by no module andRichard Smith2017-06-2312-101/+147
| | | | | | | | | | | | | | | | | | | declarations that are owned but unconditionally visible. This allows us to set declarations as visible even if they have a local owning module, without losing information. In turn, that means that our Objective-C support can keep on incorrectly assuming the "hidden" bit on the declaration is the whole story with regard to name visibility. This will also be useful once we support the C++ Modules TS export semantics. Objective-C name visibility is still incorrect in any case where the "hidden" bit is not the complete story: for instance, in Objective-C++ the set of visible categories will be wrong during template instantiation, and with local submodule visibility enabled it will be wrong when building modules. Fixing that will require a major overhaul of how visibility is handled for Objective-C (and particularly for categories). llvm-svn: 306075
* [WebAssembly] Add default -allow-undefined-file to linker argsSam Clegg2017-06-232-5/+6
| | | | | | | | | | | Also, don't use the outdated lib32/lib64 naming of files within the sysroot. The more modern/flexible approach IIUC is to use seperate sysroots or /lib/<target-tripple> and /include/<target-tripple>. Differential Revision: https://reviews.llvm.org/D33565 llvm-svn: 306074
* Fixed a (product) build error that was due to an unused variableFarhana Aleen2017-06-221-2/+1
| | | | | | | | | | | | | Details: There was a use but it was in the assert which was not exercised during product build. Reviewers: Andrew Kaylor Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32658 llvm-svn: 306073
* [x86] add/sub (X==0) --> sbb(cmp X, 1)Sanjay Patel2017-06-222-11/+20
| | | | | | | | | | | | | | | | | | | | | | This is very similar to the transform in: https://reviews.llvm.org/rL306040 ...but in this case, we use cmp X, 1 to set the carry bit as needed. Again, we can show that all of these are logically equivalent (although InstCombine currently canonicalizes to a form not seen here), and if we believe IACA, then this is the smallest/fastest code. Eg, with SNB: | Num Of | Ports pressure in cycles | | | Uops | 0 - DV | 1 | 2 - D | 3 - D | 4 | 5 | | --------------------------------------------------------------------- | 1 | 1.0 | | | | | | | cmp edi, 0x1 | 2 | | 1.0 | | | | 1.0 | CP | sbb eax, eax The larger motivation is to clean up all select-of-constants combining/lowering because we're missing some common cases. llvm-svn: 306072
* [COFF] Fix SECTION and SECREL relocation handling for absolute symbolsReid Kleckner2017-06-227-3/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For SECTION relocations against absolute symbols, MSVC emits the largest output section index plus one. I've implemented that by threading a global variable through DefinedAbsolute that is filled in by the Writer. A more library-oriented approach would be to thread the Writer through Chunk::writeTo and SectionChunk::applyRel*, but Rui seems to prefer doing it this way. MSVC rejects SECREL relocations against absolute symbols, but only when the relocation is in a real output section. When the relocation is in a CodeView debug info section destined for the PDB, it seems that this relocation error is suppressed, and absolute symbols become zeros in the object file. This is easily implemented by checking the input section from which we're applying relocations. This should fix errors about __safe_se_handler_table and __guard_fids_table when linking the CRT and generating a PDB. Reviewers: ruiu Subscribers: aprantl, llvm-commits Differential Revision: https://reviews.llvm.org/D34541 llvm-svn: 306071
* Restrict the definition of loop preheader to avoid EH blocksAndrew Kaylor2017-06-226-2/+73
| | | | | | Differential Revision: https://reviews.llvm.org/D34487 llvm-svn: 306070
* Define behavior of "stack-probe-size" attribute when inlining.whitequark2017-06-224-2/+73
| | | | | | | | | | Also document the attribute, since "probe-stack" already is. Reviewed By: majnemer Differential Revision: https://reviews.llvm.org/D34528 llvm-svn: 306069
* Supported lowerInterleavedStore() in X86InterleavedAccess.Farhana Aleen2017-06-224-100/+197
| | | | | | | | | | Reviewers: RKSimon, DavidKreitzer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32658 llvm-svn: 306068
* Remove the LoadCombine pass. It was never enabled and is unsupported.Eric Christopher2017-06-2213-674/+0
| | | | | | Based on discussions with the author on mailing lists. llvm-svn: 306067
* PR33002: When we instantiate the definition of a static data member, we mightRichard Smith2017-06-224-7/+53
| | | | | | | have attached an initializer to the in-class declaration. If so, include the initializer in the update record for the instantiation. llvm-svn: 306065
* [x86] add more tests for select --> sbb transform; NFCSanjay Patel2017-06-221-4/+61
| | | | | | These are siblings of the tests added with r306032. llvm-svn: 306064
* Change creation of relative relocations on COFF.Rafael Espindola2017-06-223-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For whatever reason, when processing .globl foo foo: .data bar: .long foo-bar llvm-mc creates a relocation with the section: 0x0 IMAGE_REL_I386_REL32 .text This is different than when the relocation is relative from the beginning. For example, a file with call foo produces 0x0 IMAGE_REL_I386_REL32 foo I would like to refactor the logic for converting "foo - ." into a relative relocation so that it is shared with ELF. This is the first step and just changes the coff implementation to match what ELF (and COFF in the case of calls) does. llvm-svn: 306063
* [ORC] Expose a typedef in RTDyldObjectLinkingLayer.Lang Hames2017-06-221-1/+3
| | | | | | This should fix the failure on the polly bots. llvm-svn: 306062
* Fix modular buildKamil Rytarowski2017-06-221-1/+2
| | | | | | Exclude header Support/Solaris/sys/regset.h. llvm-svn: 306061
* [WebAssembly] WebAssemblyFastISel getelementptr variable index supportJacob Gravelle2017-06-222-1/+119
| | | | | | | | | | | | | | Summary: Previously -fast-isel getelementptr would constant-fold non-constant i8 load/stores. Reviewers: sunfish Subscribers: jfb, dschuff, sbc100, llvm-commits Differential Revision: https://reviews.llvm.org/D34044 llvm-svn: 306060
* [Hexagon] Properly update kill flags in HexagonNewValueJumpKrzysztof Parzyszek2017-06-222-1/+54
| | | | | | | The feeder instruction will be moved to right before the compare, so the updating code should not be looking for kills past the compare. llvm-svn: 306059
* [ORC] Switch the object layer API from addObjectSet to addObject (singular), andLang Hames2017-06-2216-365/+319
| | | | | | | | | move the ObjectCache from the IRCompileLayer to SimpleCompiler. This is the first in a series of patches aimed at cleaning up and improving the robustness and performance of the ORC APIs. llvm-svn: 306058
* [MC] Allow assembling .secidx and .secrel32 for undefined symbolsReid Kleckner2017-06-223-12/+34
| | | | | | | | | | | There's nothing incorrect about emitting such relocations against symbols defined in other objects. The code in EmitCOFFSec* was missing the visitUsedExpr part of MCStreamer::EmitValueImpl, so these symbols were not being registered with the object file assembler. This will be used to make reduced test cases for LLD. llvm-svn: 306057
OpenPOWER on IntegriCloud