summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Add avx512vl command lines to the 128/256-bit vector-lzcnt tests so we ↵Craig Topper2017-05-142-92/+656
| | | | | | | | can see what compare instructions are being used in the lookup table code. I noticed the 512-bit lzcnts don't use the X86 specific lookup table code and instead use the EXPAND case in LegalizeDAG. I was toying around with fixing this and noticed it would require compare instructions that generate i1 masks and then converting from mask to vector. Then I noticed that we don't test which compares are used with avx512vl and no avx512cd. llvm-svn: 303020
* [X86] Cleanup some of the check-prefixes in the vector-lzcnt tests.Craig Topper2017-05-142-136/+96
| | | | | | Remove an unneeded prefix from the 32-bit command line. Make all the 64-bit triples match. Replace ALL with X64 and remove it from the 32-bit test. llvm-svn: 303019
* [X86] Remove unused value from IntrinsicType enum. NFCCraig Topper2017-05-142-7/+1
| | | | llvm-svn: 303018
* [X86][AVX1] Account for cost of extract/insert of 256-bit SDIV/UDIV by mul ↵Simon Pilgrim2017-05-142-33/+33
| | | | | | sequences llvm-svn: 303017
* Fix DynamicLibraryTest.cpp on FreeBSD and NetBSDDimitry Andric2017-05-142-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: After rL301562, on FreeBSD the DynamicLibrary unittests fail, because the test uses getMainExecutable("DynamicLibraryTests", Ptr), and since the path does not contain any slashes, retrieving the main executable will not work. Reimplement getMainExecutable() for FreeBSD and NetBSD using sysctl(3), which is more reliable than fiddling with relative or absolute paths. Also add retrieval of the original argv[] from the GoogleTest framework, to use as a fallback for other OSes. Reviewers: emaste, marsupial, hans, krytarowski Reviewed By: krytarowski Subscribers: krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D33171 llvm-svn: 303015
* [COFF] Gracefully handle empty .drectve sectionsShoaib Meenai2017-05-143-1/+18
| | | | | | | | | | | | | | | | | | Running `llvm-readobj -coff-directives msvcrt.lib` resulted in this error: Invalid data was encountered while parsing the file This happened because some of the object files in the archive have empty `.drectve` sections. These empty sections result in a `parse_failed` error being returned from `COFFObjectFile::getSectionContents()`, which in turn caused `llvm-readobj` to stop. With this change, `getSectionContents` now returns success, and like before the resulting array is empty. Patch by Dave Lee. Differential Revision: https://reviews.llvm.org/D32652 llvm-svn: 303014
* [X86][XOP] XOP's general v16i8 shifts will be used instead of v8i16 shift + ↵Simon Pilgrim2017-05-143-9/+12
| | | | | | | | mask. Tweak cost model to match what lowering actually does. llvm-svn: 303013
* [X86][SSE] Account for cost of extract/insert of v32i8 vector shiftsSimon Pilgrim2017-05-144-15/+15
| | | | llvm-svn: 303012
* [StringExtras] Add llvm::to_integer.Zachary Turner2017-05-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | This is a very thin wrapper around StringRef::getAsInteger. It serves three purposes. 1) It allows a cleaner syntax when you have something other than a StringRef - for example, a std::string or an llvm::SmallString. Previously, in this case you would have to write something like: StringRef(MyStr).getAsInteger(0, Result) by explicitly constructing a temporary StringRef. This can be done implicitly however with the new function by just writing: to_integer(MyStr, ...). 2) Correcting the travesty that is getAsInteger's return value. This function returns true on success, and false on failure. While this may cause confusion with people familiar with the getAsInteger API, there seems to be widespread agreement that the return semantics of getAsInteger was a mistake. 3) It allows the Radix to be deduced as a default argument by putting it last in the parameter list. Most uses of getAsInteger pass 0 for the first argument. With this syntax it can just be omitted. llvm-svn: 303011
* [X86][XOP] Account for cost of extract/insert of 256-bit vector shiftsSimon Pilgrim2017-05-144-110/+110
| | | | llvm-svn: 303010
* [X86][AVX] Allow 32-bit targets to peek through subvectors to extract ↵Simon Pilgrim2017-05-145-34/+27
| | | | | | constant splats for vXi64 shifts. llvm-svn: 303009
* [X86][AVX] Add additional 32-bit target vector shift testsSimon Pilgrim2017-05-143-0/+1400
| | | | | | Shows issue with 32-bits not being able to peek through subvectors to extract constant splats llvm-svn: 303008
* update of the urlSylvestre Ledru2017-05-141-1/+1
| | | | llvm-svn: 303005
* [InstSimplify] Add patterns for folding (A & B) | (~A ^ B) -> (~A ^ B) and ↵Craig Topper2017-05-142-32/+34
| | | | | | | | its commuted variants. We already had (A & ~B) | (A ^ B), but we missed the cases where the not was part of the xor. llvm-svn: 303004
* fooCraig Topper2017-05-141-0/+122
| | | | llvm-svn: 303003
* [BasicAA] Alphabetize includes. NFCCraig Topper2017-05-141-1/+1
| | | | llvm-svn: 303002
* Renable test that was disabled due to cost analysisXinliang David Li2017-05-141-1/+1
| | | | llvm-svn: 303000
* Fix test failure on windows -- do not return deleted funcXinliang David Li2017-05-141-2/+8
| | | | llvm-svn: 302999
* [llvm-pdbdump] Add the option to sort functions and data.Zachary Turner2017-05-149-17/+234
| | | | llvm-svn: 302998
* [SelectionDAG] Added support for EXTRACT_SUBVECTOR/CONCAT_VECTORS ↵Simon Pilgrim2017-05-132-30/+33
| | | | | | demandedelts in ComputeNumSignBits llvm-svn: 302997
* Add missing filesPeter Collingbourne2017-05-132-0/+25
| | | | llvm-svn: 302996
* Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI.Peter Collingbourne2017-05-138-7/+7
| | | | | | | This reorganisation prevents us from cluttering up the top-level lib directory with more driver libraries such as llvm-dlltool (see D29892). llvm-svn: 302995
* [X86][SSE] Test showing missing EXTRACT_SUBVECTOR/CONCAT_VECTORS ↵Simon Pilgrim2017-05-131-0/+55
| | | | | | demandedelts support in ComputeNumSignBits llvm-svn: 302994
* [SelectionDAG] Add VECTOR_SHUFFLE support to ComputeNumSignBitsSimon Pilgrim2017-05-132-45/+39
| | | | llvm-svn: 302993
* [X86][SSE] Test showing inability of ComputeNumSignBits to resolve shufflesSimon Pilgrim2017-05-131-0/+72
| | | | llvm-svn: 302992
* [ValueTracking] Remove const_casts on several calls to computeKnownBits and ↵Craig Topper2017-05-133-8/+4
| | | | | | ComputeSignBit. NFC llvm-svn: 302991
* MSan: Mark MemorySanitizer tests that use x86 intrinsics as REQUIRES: x86Justin Bogner2017-05-137-64/+73
| | | | | | | Tests that use target intrinsics are inherently target specific. Mark them as such. llvm-svn: 302990
* [x86, SSE] AVX1 PR28129 (256-bit all-ones rematerialization)Simon Pilgrim2017-05-139-114/+124
| | | | | | | | | | | | | | | | | | | | Further perf tests on Jaguar indicate that: vxorps %ymm0, %ymm0, %ymm0 vcmpps $15, %ymm0, %ymm0, %ymm0 is consistently faster (by about 9%) than: vpcmpeqd %xmm0, %xmm0, %xmm0 vinsertf128 $1, %xmm0, %ymm0, %ymm0 Testing equivalent code on a SandyBridge (E5-2640) puts it slightly (~3%) faster as well. Committed on behalf of @dtemirbulatov Differential Revision: https://reviews.llvm.org/D32416 llvm-svn: 302989
* [LoopOptimizer][Fix]PR32859, PR24738Simon Pilgrim2017-05-132-7/+39
| | | | | | | | | | | | | | | | | | | The Loop vectorizer pass introduced undef value while it is fixing output of LCSSA form. Here it is: before: %e.0.ph = phi i32 [ 0, %for.inc.2.i ] after: %e.0.ph = phi i32 [ 0, %for.inc.2.i ], [ undef, %middle.block ] and after this change we have: %e.0.ph = phi i32 [ 0, %for.inc.2.i ] %e.0.ph = phi i32 [ 0, %for.inc.2.i ], [ 0, %middle.block ] Committed on behalf of @dtemirbulatov Differential Revision: https://reviews.llvm.org/D33055 llvm-svn: 302988
* This reverts r302984Vivek Pandya2017-05-132-101/+39
| | | | llvm-svn: 302985
* Simplify MIR Output used for Codegen TestingVivek Pandya2017-05-132-39/+101
| | | | | | | | | | | | | | - MIRYamlMapping: Default value provided for fields which have optional mappings. Implemented == operators for required classes. When a field's value is same as default value specified YAML IO class will not print it. - MIRPrinter: Above mentioned behaviour is not on by default. If -simplify-mir option not specified, then make yaml::Output to print fields with default values too. Differential Revision: https://reviews.llvm.org/D32304 llvm-svn: 302984
* [APInt] Use Lo_32/Hi_32/Make_64 in a few more places in the divide code. NFCICraig Topper2017-05-131-6/+6
| | | | llvm-svn: 302983
* [InstCombine] Prevent InstCombine from triggering an extra iteration if ↵Craig Topper2017-05-132-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | something changed in the initial Worklist creation Summary: If the Worklist build causes an IR change this change flag currently factors into the flag for running another iteration of the iteration loop. But only changes during processing should trigger another loop. This patch captures the worklist creation change flag into the outside the loop flag currently used for DbgDeclares and only sends that flag up to the caller. Rerunning the loop only depends on IC.run() now. This uses the debug output of InstCombine to determine if one or two iterations run. I couldn't think of a better way to detect it since the second spurious iteration shoudn't make any visible changes. Just wasted computation. I can do a pre-commit of the test case with the CHECK-NOT as a CHECK if this is an ok way to check this. This is a subset of D31678 as I'm still not sure how to verify the analysis behavior for that. Reviewers: davide, majnemer, spatel, chandlerc Reviewed By: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32453 llvm-svn: 302982
* ConstProp: Split x86 SSE intrinsic tests out of calls.llJustin Bogner2017-05-132-206/+209
| | | | | | | This allows us to mark this as `REQUIRES: x86`, since it uses x86 target specific intrinsics. llvm-svn: 302980
* InstCombine: Move tests that use target intrinsics into subdirectoriesJustin Bogner2017-05-1338-175/+190
| | | | | | | | Tests with target intrinsics are inherently target specific, so it doesn't actually make sense to run them if we've excluded their target. llvm-svn: 302979
* Disable llvm/test/Transforms/NewGVN/pr32934.ll while Davide is investigating.NAKAMURA Takumi2017-05-131-1/+1
| | | | llvm-svn: 302977
* [NewGVN] XFAIL a flaky test until I find out what's going on.Davide Italiano2017-05-131-0/+1
| | | | | | | | | | I bet the change is correct but this test seems to expose some underlying problem that manifest only on some buildbots, and I'm not able to reproduce locally. Unfortunately I can't debug right now but I don't want to annoy people with spurious failures, so I'll XFAIL until I can take a look (over the weekend). llvm-svn: 302976
* [APInt] Fix typo in comment. NFCCraig Topper2017-05-131-1/+1
| | | | llvm-svn: 302974
* [AVR] When lowering Select8/Select16, put newly generated MBBs in the same spotDylan McKay2017-05-132-2/+38
| | | | | | | | | | Contributed by Dr. Gergő Érdi. Fixes a bug. Raised from (https://github.com/avr-rust/rust/issues/49). llvm-svn: 302973
* AA: Use generic intrinsics for tests instead of target specific onesJustin Bogner2017-05-135-67/+87
| | | | | | | | | Update a few tests to use llvm.masked.load/store instead of arm neon vector loads and stores, and move the tests that are actually specific to those arm intrinsics to their own files. This lets us mark the tests that use target specific intrinsics as requiring those targets. llvm-svn: 302972
* [CodeView] Silence some -Wsign-compare warningsJustin Bogner2017-05-131-10/+10
| | | | llvm-svn: 302971
* [AVR] Remove an unused variableDylan McKay2017-05-131-1/+0
| | | | llvm-svn: 302970
* [PartialInlining] Profile based cost analysisXinliang David Li2017-05-1210-57/+523
| | | | | | | | | | | | Implemented frequency based cost/saving analysis and related options. The pass is now in a state ready to be turne on in the pipeline (in follow up). Differential Revision: http://reviews.llvm.org/D32783 llvm-svn: 302967
* [GISel]: Add a getConstantFPVRegVal utilityAditya Nandakumar2017-05-122-0/+11
| | | | | | | | This might be useful across various GISel Passes https://reviews.llvm.org/D33051 llvm-svn: 302964
* [GISel]: Fix undefined behavior while accessing DefaultAction mapAditya Nandakumar2017-05-122-6/+13
| | | | | | | | We end up dereferencing the end iterator here when the Aspect doesn't exist in the DefaultAction map. Change the API to return Optional<LLT> and return None when not found. Also update the callers to handle the None case llvm-svn: 302963
* [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).Eugene Zelenko2017-05-1214-159/+260
| | | | llvm-svn: 302961
* [TLI] Add mapping for various '__<func>_finite' forms of the math routines ↵Andrew Kaylor2017-05-122-0/+211
| | | | | | | | | | to SVML routines Patch by Chris Chrulski Differential Revision: https://reviews.llvm.org/D31789 llvm-svn: 302957
* [ConstantFolding] Add folding for various math '__<func>_finite' routines ↵Andrew Kaylor2017-05-122-11/+152
| | | | | | | | | | generated from -ffast-math Patch by Chris Chrulski Differential Revision: https://reviews.llvm.org/D31788 llvm-svn: 302956
* [TLI] Add declarations for various math header file routines from ↵Andrew Kaylor2017-05-125-1/+510
| | | | | | | | | | math-finite.h that create '__<func>_finite as functions Patch by Chris Chrulski Differential Revision: https://reviews.llvm.org/D31787 llvm-svn: 302955
* [APInt] Add early outs for a division by 1 to udiv/urem/udivremCraig Topper2017-05-121-4/+18
| | | | | | | | We already counted the number of bits in the RHS so its pretty cheap to just check if the RHS is 1. Differential Revision: https://reviews.llvm.org/D33154 llvm-svn: 302953
OpenPOWER on IntegriCloud