summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Add new target hooks for LoadStoreVectorizerVolkan Keles2016-10-036-59/+187
| | | | | | | | | | | | Summary: Added 6 new target hooks for the vectorizer in order to filter types, handle size constraints and decide how to split chains. Reviewers: tstellarAMD, arsenm Subscribers: arsenm, mzolotukhin, wdng, llvm-commits, nhaehnle Differential Revision: https://reviews.llvm.org/D24727 llvm-svn: 283099
* [ARM] Code size optimisation to lower udiv+urem to udiv+mls instead of aSjoerd Meijer2016-10-032-1/+91
| | | | | | | | | | | | | | | library call to __aeabi_uidivmod. This is an improved implementation of r280808, see also D24133, that got reverted because isel was stuck in a loop. That was caused by the optimisation incorrectly triggering on i64 ints, which shouldn't happen because there is no 64bit hwdiv support; that put isel's type legalization and this optimisation in a loop. A native ARM compiler and testing now shows that this is fixed. Patch mostly by Pablo Barrio. Differential Revision: https://reviews.llvm.org/D25077 llvm-svn: 283098
* [CodeGen] Adding a test showing the current state of poor code gen ofAlexey Bataev2016-10-031-0/+67
| | | | | | | | | | | | search loop, by Andrey Tischenko PR27136 shows failure to hoist constant out of loop. This test is used as start point to fix the failure: it shows the current state of codegen and discovers what should be fixed Differential Revision: https://reviews.llvm.org/D25097 llvm-svn: 283091
* [lit] Throw in unimplemented method (NFC)Chris Bieneman2016-10-031-1/+1
| | | | | | | | | | | | | | | | | | Summary: lit's `OneCommandFileTest` class implements an abstract method that raises if called. However, it raises by referencing an undefined symbol. Instead, raise explicitly by throwing a `NotImplementedError`. This is clearer, and appeases Python linters. Patch By Brian Gesiak! Reviewers: ddunbar, echristo, beanz Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25170 llvm-svn: 283090
* [lit] Remove unused imports (NFC)Chris Bieneman2016-10-034-5/+6
| | | | | | | | | | | | Reviewers: ddunbar, echristo, beanz Patch by Brian Gesiak! Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25169 llvm-svn: 283089
* [lit] Compare to None using identity, not equalityChris Bieneman2016-10-032-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Summary: In Python, `None` is a singleton, so checking whether a variable is `None` may be done with `is` or `is not`. This has a slight advantage over equiality comparisons `== None` and `!= None`, since `__eq__` may be overridden in Python to produce sometimes unexpected results. Using `is None` and `is not None` is also recommended practice in https://www.python.org/dev/peps/pep-0008: > Comparisons to singletons like `None` should always be done with `is` or > `is not`, never the equality operators. Patch by Brian Gesiak! Reviewers: ddunbar, echristo, beanz Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25168 llvm-svn: 283088
* [AMDGPU] Remove unused variables from SIOptimizeExecMaskingKonstantin Zhuravlyov2016-10-031-3/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D25110 llvm-svn: 283087
* [PowerPC] Account for the ELFv2 function prologue during branch selectionHal Finkel2016-10-032-2/+18
| | | | | | | | | | | | | | | | The PPC branch-selection pass, which performs branch relaxation, needs to account for the padding that might be introduced to satisfy block alignment requirements. We were assuming that the first block was at offset zero (i.e. had the alignment of the function itself), but under the ELFv2 ABI, a global entry function prologue is added to the first block, and it is a two-instruction sequence (i.e. eight-bytes long). If the function has 16-byte alignment, the fact that the first block is eight bytes offset from the start of the function is relevant to calculating where padding will be added in between later blocks. Unfortunately, I don't have a small test case. llvm-svn: 283086
* [AVX-512] Remove isCheapAsAMove flag from VMOVAPSZ128rm_NOVLX and friends.Craig Topper2016-10-031-1/+1
| | | | | | This was accidentally copy and pasted from other Pseudos in the file. llvm-svn: 283084
* [X86] Mark all sizes of (V)MOVUPD as trivially rematerializable.Craig Topper2016-10-033-24/+23
| | | | | | I don't know for sure that we truly needs this, but its the only vector load that isn't rematerializable. Making it consistent allows it to not be a special case in the td files. llvm-svn: 283083
* [X86][AVX2] Add support for combining target shuffles to VPERMD/VPERMPSSimon Pilgrim2016-10-022-24/+32
| | | | llvm-svn: 283080
* [SCEV] Rely on ConstantRange instead of custom logic; NFCISanjoy Das2016-10-021-124/+52
| | | | | | | This was first landed in rL283058 and subsequenlty reverted since a change this depends on (rL283057) was buggy and had to be reverted. llvm-svn: 283079
* [ConstantRange] Make getEquivalentICmp smarterSanjoy Das2016-10-023-0/+61
| | | | | | | | | | | This change teaches getEquivalentICmp to be smarter about generating ICMP_NE and ICMP_EQ predicates. An earlier version of this change was landed as rL283057 which had a use-after-free bug. This new version has a fix for that bug, and a (C++ unittests/) test case that would have triggered it rL283057. llvm-svn: 283078
* [X86][AVX2] Missed opportunities to combine to VPERMD/VPERMPSSimon Pilgrim2016-10-021-0/+48
| | | | llvm-svn: 283077
* [X86][AVX2] Fix typo in test namesSimon Pilgrim2016-10-021-6/+6
| | | | | | We are testing vpermps not vpermd llvm-svn: 283076
* Rangify for loops.Yaron Keren2016-10-021-17/+10
| | | | llvm-svn: 283074
* [x86] remove 'nan' strings from copysign assertions; NFCSanjay Patel2016-10-021-8/+8
| | | | | | | | | | | | Preemptively scrubbing these to avoid a bot fail as in PR30443: https://llvm.org/bugs/show_bug.cgi?id=30443 I'm nearly done with a patch to fix these cases, so not trying very hard to do better for the temporary win. I plan to use better checks than what the script produces for the vectorized cases. llvm-svn: 283072
* [x86] add test to show unnecessary scalarization of copysign intrinsics ↵Sanjay Patel2016-10-021-0/+294
| | | | | | (PR30433) llvm-svn: 283071
* [X86][AVX] Ensure broadcast loads respect dependenciesSimon Pilgrim2016-10-022-9/+22
| | | | | | | | | | | | To allow broadcast loads of a non-zero'th vector element, lowerVectorShuffleAsBroadcast can replace a load with a new load with an adjusted address, but unfortunately we weren't ensuring that the new load respected the same dependencies. This patch adds a TokenFactor and updates all dependencies of the old load to reference the new load instead. Bug found during internal testing. Differential Revision: https://reviews.llvm.org/D25039 llvm-svn: 283070
* [X86] Don't set i64 ADDC/ADDE/SUBC/SUBE as Custom if the target isn't ↵Craig Topper2016-10-021-7/+4
| | | | | | 64-bit. This way we don't have to catch them and do nothing with them in ReplaceNodeResults. llvm-svn: 283066
* [X86] Fix indentation. NFCCraig Topper2016-10-021-1/+1
| | | | llvm-svn: 283065
* Revert r283057 and r283058Sanjoy Das2016-10-023-91/+124
| | | | | | | | | | | They've broken the sanitizer-bootstrap bots. Reverting while I investigate. Original commit messages: r283057: "[ConstantRange] Make getEquivalentICmp smarter" r283058: "[SCEV] Rely on ConstantRange instead of custom logic; NFCI" llvm-svn: 283062
* [PowerPC] Refactor soft-float support, and enable PPC64 soft floatHal Finkel2016-10-026-26/+45
| | | | | | | | | | | | | | | | | | | | | | | This change enables soft-float for PowerPC64, and also makes soft-float disable all vector instruction sets for both 32-bit and 64-bit modes. This latter part is necessary because the PPC backend canonicalizes many Altivec vector types to floating-point types, and so soft-float breaks scalarization support for many operations. Both for embedded targets and for operating-system kernels desiring soft-float support, it seems reasonable that disabling hardware floating-point also disables vector instructions (embedded targets without hardware floating point support are unlikely to have Altivec, etc. and operating system kernels desiring not to use floating-point registers to lower syscall cost are unlikely to want to use vector registers either). If someone needs this to work, we'll need to change the fact that we promote many Altivec operations to act on v4f32. To make it possible to disable Altivec when soft-float is enabled, hardware floating-point support needs to be expressed as a positive feature, like the others, and not a negative feature, because target features cannot have dependencies on the disabling of some other feature. So +soft-float has now become -hard-float. Fixes PR26970. llvm-svn: 283060
* Remove duplicated code; NFCSanjoy Das2016-10-026-73/+7
| | | | | | | ICmpInst::makeConstantRange does exactly the same thing as ConstantRange::makeExactICmpRegion. llvm-svn: 283059
* [SCEV] Rely on ConstantRange instead of custom logic; NFCISanjoy Das2016-10-021-124/+52
| | | | llvm-svn: 283058
* [ConstantRange] Make getEquivalentICmp smarterSanjoy Das2016-10-022-0/+39
| | | | | | | This change teaches getEquivalentICmp to be smarter about generating ICMP_NE and ICMP_EQ predicates. llvm-svn: 283057
* [SCEV] Remove commented out code; NFCSanjoy Das2016-10-021-3/+1
| | | | llvm-svn: 283056
* COFF: Fix short import lib import name type bitshiftMartell Malone2016-10-013-1/+5
| | | | | | | | | | | | | | As per the PE COFF spec (section 8.3, Import Name Type) Offset: 18 Size 2 bits Name: Type Offset: 20 Size 3 bits Name: Name Type Offset: 20 added based on 18+2 Partially commited as rL279069 Differential Revision: https://reviews.llvm.org/D23540 llvm-svn: 283055
* [X86][SSE] Cleaned up shuffle decode assertion messagesSimon Pilgrim2016-10-011-7/+11
| | | | llvm-svn: 283050
* [SLPVectorizer][X86] Added fptosi/fptoui testsSimon Pilgrim2016-10-012-0/+1146
| | | | llvm-svn: 283048
* [CostModel][X86] Added tests for current fptosi/fptoui costsSimon Pilgrim2016-10-012-0/+501
| | | | llvm-svn: 283047
* [SLPVectorizer][X86] Added fcopysign testsSimon Pilgrim2016-10-011-0/+404
| | | | llvm-svn: 283046
* [SLPVectorizer][X86] Added fabs testsSimon Pilgrim2016-10-011-0/+274
| | | | llvm-svn: 283045
* [CostModel][X86] Added fcopysign costsSimon Pilgrim2016-10-011-0/+65
| | | | llvm-svn: 283044
* Use StringRef for MemoryBuffer identifier API (NFC)Mehdi Amini2016-10-015-11/+9
| | | | llvm-svn: 283043
* [CostModel][X86] Added fabs costsSimon Pilgrim2016-10-011-0/+65
| | | | llvm-svn: 283042
* Fix signed/unsigned warningSimon Pilgrim2016-10-011-2/+2
| | | | llvm-svn: 283041
* [X86][SSE] Add support for combining target shuffles to binary BLENDSimon Pilgrim2016-10-013-12/+34
| | | | | | We already had support for 1-input BLEND with zero - this adds support for 2-input BLEND as well. llvm-svn: 283040
* Use StringRef in Registry API (NFC)Mehdi Amini2016-10-012-9/+8
| | | | llvm-svn: 283039
* [X86][SSE] Always combine target shuffles to MOVSD/MOVSSSimon Pilgrim2016-10-019-41/+92
| | | | | | | | Now we can commute to BLENDPD/BLENDPS on SSE41+ targets if necessary, so simplify the combine matching where we can. This required me to add a couple of scalar math movsd/moss fold patterns that hadn't been needed in the past. llvm-svn: 283038
* [X86][SSE] Enable commutation from MOVSD/MOVSS to BLENDPD/BLENDPS on SSE41+ ↵Simon Pilgrim2016-10-017-50/+160
| | | | | | | | | | | | targets Instead of selecting between MOVSD/MOVSS and BLENDPD/BLENDPS at shuffle lowering by subtarget this will help us select the instruction based on actual commutation requirements. We could possibly add BLENDPD/BLENDPS -> MOVSD/MOVSS commutation and MOVSD/MOVSS memory folding using a similar approach if it proves useful I avoided adding AVX512 handling as I'm not sure when we should be making use of VBLENDPD/VBLENDPS on EVEX targets llvm-svn: 283037
* Revert r283029 - [cmake] Make LIT_COMMAND configurable and improve fallback ↵Michal Gorny2016-10-011-4/+3
| | | | | | | | | | | | | | support Revert the change in r283029 (and the fixup in r283033) due to buildbot breakage. The fixup is ineffective for the bots that do not force clean build since the wrong value is already cached in CMakeCache.txt. Reverting it should result in the cache variable being removed and therefore it should be possible to re-introduce it after all buildbots build this revision. llvm-svn: 283036
* [X86][SSE] Regenerate vselect tests and improve AVX1/AVX2 coverageSimon Pilgrim2016-10-013-193/+507
| | | | llvm-svn: 283035
* Revert "[MC] Prevent out of order HashDirective lexing in AsmLexer."Nirav Dave2016-10-013-26/+27
| | | | | | This reverts commit r282992 which appears to be causing an LTO test failure. llvm-svn: 283034
* [cmake] Fix incorrect default for LIT_COMMAND, from r283029Michal Gorny2016-10-011-1/+1
| | | | llvm-svn: 283033
* [cmake] Make LIT_COMMAND configurable and improve fallback supportMichal Gorny2016-10-011-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make LIT_COMMAND configurable, use source tree only when actually available and extend the default search to other common executable names 'lit.py' and 'lit', in order to increase uniformity between all LLVM projects and support using installed lit. Changing the conditional used to determine whether in-tree or external lit is being used covers the case when LLVM_MAIN_SRC_DIR is defined but does not exist (anymore). In this case, the functions falls back to looking for installed lit rather than attempting to use a non-existing path. The same conditional is used in clang already. Making LIT_COMMAND a cache variable in case the source tree variant is used serves two purposes. Firstly, it increases uniformity between the two branches since find_program() implicitly makes LIT_COMMAND a cache variable. Secondly, it allows overriding the lit executable used to run the tests when the LLVM source tree is provided. Gentoo is planning to use this to use installed (and byte-compiled) lit instead of re-compiling it in every LLVM project. Extending default search is meant to increase uniformity between different LLVM projects. The 'lit.py' name is already used by a few of them, and 'lit' is the name used by utils/lit/setup.py when installing. Differential Revision: https://reviews.llvm.org/D25076 llvm-svn: 283029
* [OCaml] Install .mli (interface) filesMichal Gorny2016-10-011-1/+2
| | | | | | | | | | | | | Install the OCaml interface .mli files. Those files were most likely omitted because they are input files for the compiled .cmi files. However, installing them is reasonable since -- unlike .cmi files -- they are human-readable. The issue was originally spotted by @jpdeplaix. Differential Revision: https://reviews.llvm.org/D25128 llvm-svn: 283028
* Split a comment into generic description and note about the specificJoerg Sonnenberger2016-10-011-3/+2
| | | | | | cmake use. llvm-svn: 283027
* Retire LLVM_BINDIR and friends. They haven't been provided with actualJoerg Sonnenberger2016-10-012-42/+0
| | | | | | values since the switch to cmake. llvm-svn: 283026
* [libFuzzer] add fuzzer test for libxml2, finds ↵Kostya Serebryany2016-10-013-0/+38
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=751631 llvm-svn: 283024
OpenPOWER on IntegriCloud