summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [x86] Slap a triple on this test since it is poking around at the stackChandler Carruth2014-10-041-0/+2
| | | | | | | and calling conventions. Otherwise its too hard to craft a usefully generic set of assertions. llvm-svn: 219047
* [x86] Enable the new vector shuffle lowering by default.Chandler Carruth2014-10-0491-3776/+1334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the entire regression test suite for the new shuffles. Remove most of the old testing which was devoted to the old shuffle lowering path and is no longer relevant really. Also remove a few other random tests that only really exercised shuffles and only incidently or without any interesting aspects to them. Benchmarking that I have done shows a few small regressions with this on LNT, zero measurable regressions on real, large applications, and for several benchmarks where the loop vectorizer fires in the hot path it shows 5% to 40% improvements for SSE2 and SSE3 code running on Sandy Bridge machines. Running on AMD machines shows even more dramatic improvements. When using newer ISA vector extensions the gains are much more modest, but the code is still better on the whole. There are a few regressions being tracked (PR21137, PR21138, PR21139) but by and large this is expected to be a win for x86 generated code performance. It is also more correct than the code it replaces. I have fuzz tested this extensively with ISA extensions up through AVX2 and found no crashes or miscompiles (yet...). The old lowering had a few miscompiles and crashers after a somewhat smaller amount of fuzz testing. There is one significant area where the new code path lags behind and that is in AVX-512 support. However, there was *extremely little* support for that already and so this isn't a significant step backwards and the new framework will probably make it easier to implement lowering that uses the full power of AVX-512's table-based shuffle+blend (IMO). Many thanks to Quentin, Andrea, Robert, and others for benchmarking assistance. Thanks to Adam and others for help with AVX-512. Thanks to Hal, Eric, and *many* others for answering my incessant questions about how the backend actually works. =] I will leave the old code path in the tree until the 3 PRs above are at least resolved to folks' satisfaction. Then I will rip it (and 1000s of lines of code) out. =] I don't expect this flag to stay around for very long. It may not survive next week. llvm-svn: 219046
* Add fake use to suppress defined-but-unused warningsJingyue Wu2014-10-041-0/+1
| | | | llvm-svn: 219045
* [x86] Fix a bug in the VZEXT DAG combine that I just made more powerful.Chandler Carruth2014-10-041-3/+23
| | | | | | | | | | | | It turns out this combine was always somewhat flawed -- there are cases where nested VZEXT nodes *can't* be combined: if their types have a mismatch that can be observed in the result. While none of these show up in currently, once I switch to the new vector shuffle lowering a few test cases actually form such nested VZEXT nodes. I've not come up with any IR pattern that I can sensible write to exercise this, but it will be covered by tests once I flip the switch. llvm-svn: 219044
* [x86] Sink a generic combine of VZEXT nodes from the lowering to VZEXTChandler Carruth2014-10-041-40/+39
| | | | | | | | | | | nodes to the DAG combining of them. This will allow the combine to fire on both old vector shuffle lowering and the new vector shuffle lowering and generally seems like a cleaner design. I've trimmed down the code a bit and tried to make it and the surrounding combine fairly clean while moving it around. llvm-svn: 219042
* R600/SI: Custom lower f64 -> i64 conversionsMatt Arsenault2014-10-037-37/+179
| | | | llvm-svn: 219038
* R600: Custom lower [s|u]int_to_fp for i64 -> f64Matt Arsenault2014-10-035-5/+113
| | | | llvm-svn: 219037
* R600/SI: Fix ftrunc f64 conformance failures.Matt Arsenault2014-10-035-4/+114
| | | | | | Re-add the tests since they were deleted at some point llvm-svn: 219036
* Remove unused ALL_BINDINGS configuration variable.Peter Collingbourne2014-10-033-11/+1
| | | | llvm-svn: 219035
* [x86] Add a really preposterous number of patterns for matching all ofChandler Carruth2014-10-036-40/+284
| | | | | | | | | | | | | | | | | | | | | | | | | the various ways in which blends can be used to do vector element insertion for lowering with the scalar math instruction forms that effectively re-blend with the high elements after performing the operation. This then allows me to bail on the element insertion lowering path when we have SSE4.1 and are going to be doing a normal blend, which in turn restores the last of the blends lost from the new vector shuffle lowering when I got it to prioritize insertion in other cases (for example when we don't *have* a blend instruction). Without the patterns, using blends here would have regressed sse-scalar-fp-arith.ll *completely* with the new vector shuffle lowering. For completeness, I've added RUN-lines with the new lowering here. This is somewhat superfluous as I'm about to flip the default, but hey, it shows that this actually significantly changed behavior. The patterns I've added are just ridiculously repetative. Suggestions on making them better very much welcome. In particular, handling the commuted form of the v2f64 patterns is somewhat obnoxious. llvm-svn: 219033
* Converting the ErrorHandlerMutex to a ManagedStatic to avoid the static ↵Chris Bieneman2014-10-031-4/+5
| | | | | | constructor and destructor. llvm-svn: 219028
* [x86] Adjust the patterns for lowering X86vzmovl nodes which don'tChandler Carruth2014-10-037-107/+240
| | | | | | | | | | | | | | perform a load to use blendps rather than movss when it is available. For non-loads, blendps is *much* faster. It can execute on two ports in Sandy Bridge and Ivy Bridge, and *three* ports on Haswell. This fixes one of the "regressions" from aggressively taking the "insertion" path in the new vector shuffle lowering. This does highlight one problem with blendps -- it isn't commuted as heavily as it should be. That's future work though. llvm-svn: 219022
* Fix typo in TableGen documentationJonathan Roelofs2014-10-031-1/+1
| | | | llvm-svn: 219018
* Add unit tests to verify Hexagon emission.Sid Manning2014-10-032-0/+63
| | | | | | | Add the test cases I overlooked, part of the original commit, http://reviews.llvm.org/D5523 llvm-svn: 219016
* Add a reference to Phabricator.rst to docs/index.rst.Adrian Prantl2014-10-031-0/+5
| | | | llvm-svn: 219015
* PR21145: Teach LLVM about C++14 sized deallocation functions.Richard Smith2014-10-034-1/+40
| | | | | | | | C++14 adds new builtin signatures for 'operator delete'. This change allows new/delete pairs to be removed in C++14 onwards, as they were in C++11 and before. llvm-svn: 219014
* Revert "Revert "DI: Fold constant arguments into a single MDString""Duncan P. N. Exon Smith2014-10-03354-6714/+6823
| | | | | | | | | | | | | | | | | | | | | | This reverts commit r218918, effectively reapplying r218914 after fixing an Ocaml bindings test and an Asan crash. The root cause of the latter was a tightened-up check in `DILexicalBlock::Verify()`, so I'll file a PR to investigate who requires the loose check (and why). Original commit message follows. -- This patch addresses the first stage of PR17891 by folding constant arguments together into a single MDString. Integers are stringified and a `\0` character is used as a separator. Part of PR17891. Note: I've attached my testcases upgrade scripts to the PR. If I've just broken your out-of-tree testcases, they might help. llvm-svn: 219010
* [ISel] Keep matching state consistent when folding during X86 address matchAdam Nemet2014-10-034-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the X86 backend, matching an address is initiated by the 'addr' complex pattern and its friends. During this process we may reassociate and-of-shift into shift-of-and (FoldMaskedShiftToScaledMask) to allow folding of the shift into the scale of the address. However as demonstrated by the testcase, this can trigger CSE of not only the shift and the AND which the code is prepared for but also the underlying load node. In the testcase this node is sitting in the RecordedNode and MatchScope data structures of the matcher and becomes a deleted node upon CSE. Returning from the complex pattern function, we try to access it again hitting an assert because the node is no longer a load even though this was checked before. Now obviously changing the DAG this late is bending the rules but I think it makes sense somewhat. Outside of addresses we prefer and-of-shift because it may lead to smaller immediates (FoldMaskAndShiftToScale is an even better example because it create a non-canonical node). We currently don't recognize addresses during DAGCombiner where arguably this canonicalization should be performed. On the other hand, having this in the matcher allows us to cover all the cases where an address can be used in an instruction. I've also talked a little bit to Dan Gohman on llvm-dev who added the RAUW for the new shift node in FoldMaskedShiftToScaledMask. This RAUW is responsible for initiating the recursive CSE on users (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076903.html) but it is not strictly necessary since the shift is hooked into the visited user. Of course it's safer to keep the DAG consistent at all times (e.g. for accurate number of uses, etc.). So rather than changing the fundamentals, I've decided to continue along the previous patches and detect the CSE. This patch installs a very targeted DAGUpdateListener for the duration of a complex-pattern match and updates the matching state accordingly. (Previous patches used HandleSDNode to detect the CSE but that's not practical here). The listener is only installed on X86. I tested that there is no measurable overhead due to this while running through the spec2k BC files with llc. The only thing we pay for is the creation of the listener. The callback never ever triggers in spec2k since this is a corner case. Fixes rdar://problem/18206171 llvm-svn: 219009
* R600: Align functions to 256 bytesTom Stellard2014-10-033-3/+14
| | | | llvm-svn: 219002
* Eliminate some deep std::vector copies. NFC.Benjamin Kramer2014-10-0314-50/+25
| | | | llvm-svn: 218999
* MCParser: Modernize memory handling.Benjamin Kramer2014-10-031-37/+22
| | | | | | NFC. llvm-svn: 218998
* [Power] Delete redundant test Atomics-32.llRobin Morisset2014-10-031-715/+0
| | | | | | | | The test Atomics-32.ll was both redundant (all operations are also checked by atomics.ll at least) and not actually checking correctness (it was not using FileCheck, just verifying that the compiler does not crash). llvm-svn: 218997
* llvm-readobj: print out the fields of the COFF delay-import tableRui Ueyama2014-10-034-0/+28
| | | | llvm-svn: 218996
* [Power] Use lwsync for non-seq_cst fencesRobin Morisset2014-10-032-1/+37
| | | | | | | | | | | | | | | | Summary: hwsync is only required for seq_cst fences, acquire and release one can use the cheaper lwsync. Test Plan: Added some cases to atomics.ll + make check-all Reviewers: jfb, wschmidt Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5317 llvm-svn: 218995
* MipsAsmParser.cpp: fix VS2012 buildHans Wennborg2014-10-031-1/+1
| | | | llvm-svn: 218991
* HexagonMCCodeEmitter.h: deleted member functions are not supported in VS2012Hans Wennborg2014-10-031-2/+2
| | | | llvm-svn: 218990
* [mips] Print warning when using register names not available in N32/64Daniel Sanders2014-10-034-3/+58
| | | | | | | | | | | | | | | | | | | Summary: The register names t4-t7 are not available in the N32 and N64 ABIs. This patch prints a warning, when those names are used in N32/64, along with a fix-it with the correct register names. Patch by Vasileios Kalintiris Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5272 llvm-svn: 218989
* Fix build break on HexagonSid Manning2014-10-031-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D5600 llvm-svn: 218987
* Adding skeleton for unit testing Hexagon Code EmissionSid Manning2014-10-037-8/+179
| | | | | | | | | | | Adding and modifying CMakeLists.txt files to run unit tests under unittests/Target/* if the directory exists. Adding basic unit test to check that code emitter object can be retrieved. Differential Revision: http://reviews.llvm.org/D5523 Change by: Colin LeMahieu llvm-svn: 218986
* [x86] Teach the new vector shuffle lowering to aggressively form MOVSSChandler Carruth2014-10-036-128/+103
| | | | | | | | | | | | | | | | | | | | | | | | and MOVSD nodes for single element vector inserts. This is particularly important because a number of patterns in the backend detect these patterns and leverage them to simplify things. It also fixes quite a few of the insertion bad code examples. However, it regresses a specific area: when available, blendps and blendpd are *dramatically* faster than movss and movsd respectively. But it doesn't really work to form the blend logic first because the blends *aren't* as crazy efficient when the data is coming from memory anyways, and thus will have a movss or movsd regardless. Also, doing that would block a bunch of the patterns that this is designed to hit. So my plan is to go into the patterns for lowering MOVSS and MOVSD and lower them via blends when available. However that's a pretty invasive restructuring so it will need to be a follow-up patch. I have already gone into the patterns to lower MOVSS and MOVSD from memory using MOVLPD, etc. Without that, several of the test cases I already have regress. llvm-svn: 218985
* [sphinx cleanup] Fix unexpected indentation warning introduced by r218937Dan Liew2014-10-031-0/+2
| | | | llvm-svn: 218982
* Revert 202433 - Provide a target override for the latest regalloc heuristicRenato Golin2014-10-035-16/+3
| | | | | | | | | | | That commit was introduced in order to help investigate a problem in ARM codegen breaking from commit 202304 (Add a limit to the heuristic that register allocates instructions in local order). Recent analisys indicated that the problem no longer exists, so I'm reverting this change. See PR18996. llvm-svn: 218981
* [x86] Refactor the element insertion logic in the new vector shuffleChandler Carruth2014-10-031-19/+21
| | | | | | | | | | | lowering to handle the potential mirroring of 2-element vectors (because we can't reliably sort them one way) in the caller rather than in the insertion logic. This will simplify things considerably as more ways to fail to match the insertion are added because now we have a nice try and retry point. llvm-svn: 218980
* Fix typo in commentAlexander Musman2014-10-031-1/+1
| | | | llvm-svn: 218979
* [x86] Fix the RUN-lines of this test to make sense.Chandler Carruth2014-10-031-3/+5
| | | | | | | | | | I got them quite wrong when updating it and had the SSE4.1 run checked for SSE2 and the SSE2 run checked for SSE4.1. I think everything was actually generic SSE, but this still seems good to fix. While here, hoist the triple into the IR and make the flag set a bit more direct in what it is trying to test. llvm-svn: 218978
* [x86] Significantly improve the ability of the new vector shuffleChandler Carruth2014-10-035-248/+100
| | | | | | | | | | | | | | | | lowering to match VZEXT_MOVL patterns. I hadn't realized that these had sufficient pattern smarts in the backend to lower zext-ing from the low element of a vector without it being a scalar_to_vector node. They do, and this is how to match a bunch of patterns for movq, movss, etc. There is a weird propensity to end up using pshufd to place the element afterward even though it means domain crossing (or rather, to use xorps+movss to zext the element rather than movq) but that's an orthogonal problem with VZEXT_MOVL that someone should probably look at. llvm-svn: 218977
* [x86] Add some important, missing test coverage for blending from oneChandler Carruth2014-10-032-46/+371
| | | | | | | | | | | | | | | vector to a zero vector for the v2 cases and fix the v4 integer cases to actually blend from a vector. There are already seprate tests for the case of inserting from a scalar. These cases cover a lot of the regressions I've seen in the regression test suite for the new vector shuffle lowering and specifically cover the reported lack of using various zext-ing instruction patterns. My next patch should fix a big chunk of this, but wanted to get a nice baseline for these patterns in the test cases first. llvm-svn: 218976
* [x86] Unbreak SSE1 with the new vector shuffle lowering. We can't widenChandler Carruth2014-10-032-4/+243
| | | | | | | | | element types to form illegal vector types. I've added a special SSE1 test case here that makes sure we don't break this going forward. llvm-svn: 218974
* [x86] Add two more triples to stabilize the precise assembly syntaxChandler Carruth2014-10-032-0/+4
| | | | | | across platforms. llvm-svn: 218973
* [x86] Remove a couple of fairly pointless tests. These were merelyChandler Carruth2014-10-032-58/+0
| | | | | | | | | | | | | | | | | testing that we generated divps and divss but not in a very systematic way. There are other tests for widening binary operations already that make these unnecessary. The second one seems mostly about testing Atom as well as normal X86, but despite the comment claiming it is testing a different instruction sequence, it then tests for exactly the same div instruction sequence! (The sequence of instructions is actually quite different on Atom, but not the sequence of div instructions....) And then it has an "execution" test that simply isn't run? Very strange. Anyways, none of this is really needed so clean this up. llvm-svn: 218972
* Revert r215343.James Molloy2014-10-032-58/+1
| | | | | | This was contentious and needs invesigation. llvm-svn: 218971
* [mips] Remove XFAIL from two XPASS'ing tests on the llvm-mips-linux builderDaniel Sanders2014-10-032-2/+0
| | | | llvm-svn: 218967
* [x86] Add another triple to a test to make the comment syntax stable.Chandler Carruth2014-10-031-1/+1
| | | | | | Should fix darwin builders. llvm-svn: 218956
* [x86] Add triples to these tests so that we see fewer calling conventionChandler Carruth2014-10-032-3/+3
| | | | | | | differences and they're a bit easier to maintain. This should fix the tests on cygwin bots, etc. llvm-svn: 218955
* [x86] Regenerate precise FileCheck lines for the lats batch of testChandler Carruth2014-10-033-347/+1351
| | | | | | cases. llvm-svn: 218954
* [x86] Remove another low-value test still written using grep. We haveChandler Carruth2014-10-031-19/+0
| | | | | | many tests for movss and friends. llvm-svn: 218953
* [x86] Regenerate precise checks for a couple of test cases and removeChandler Carruth2014-10-033-90/+190
| | | | | | | a test case that was just grepping the debug stats output rather than actually checking the generated code for anything useful. llvm-svn: 218951
* [x86] Remove an over-reduced test case. This would need to beChandler Carruth2014-10-031-30/+0
| | | | | | | | intergrated much more fully into some logical part of the backend to really understand what it is trying to accomplish and how to update it. I suspect it no longer holds enough value to be worth having. llvm-svn: 218950
* [x86] Regenerate and clean up more tests is preparation for vectorChandler Carruth2014-10-033-348/+252
| | | | | | | | | shufle switch. I nuked a win64 config from one test as it doesn't really make sense to cover that ABI specially for generic v2f32 tests... llvm-svn: 218948
* [x86] Cleanup and generate precise FileCheck assertions for a bunch ofChandler Carruth2014-10-034-525/+933
| | | | | | SSE tests. llvm-svn: 218947
OpenPOWER on IntegriCloud