summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Implement kand/kandn/kor/kxor/kxnor/knot intrinsics using native IR.Craig Topper2017-12-162-16/+74
| | | | llvm-svn: 320919
* [X86] Remove GCCBuiltin from kand/kandn/kor/kxor/kxnor/knot intrinsics so ↵Craig Topper2017-12-161-6/+6
| | | | | | clang can implement with native IR. llvm-svn: 320918
* [X86] Remove unneeded code for handling the old kunpck intrinsics.Craig Topper2017-12-162-13/+1
| | | | llvm-svn: 320917
* [X86] Add the two files I forgot to commit in r320915.Craig Topper2017-12-162-0/+172
| | | | llvm-svn: 320916
* [X86] Add builtins and tests for 128 and 256 bit vpopcntdq.Craig Topper2017-12-164-0/+14
| | | | llvm-svn: 320915
* Move Transforms/LoopVectorize/consecutive-ptr-cg-bug.ll into the X86 ↵Hal Finkel2017-12-161-0/+0
| | | | | | | | subdirectory This test depends on X86's TTI; move into the X86 subdirectory. llvm-svn: 320914
* [LV] Extend InstWidening with CM_Widen_RecursiveHal Finkel2017-12-162-5/+84
| | | | | | | | | | | | | | | | | | | | Changes to the original scalar loop during LV code gen cause the return value of Legal->isConsecutivePtr() to be inconsistent with the return value during legal/cost phases (further analysis and information of the bug is in D39346). This patch is an alternative fix to PR34965 following the CM_Widen approach proposed by Ayal and Gil in D39346. It extends InstWidening enum with CM_Widen_Reverse to properly record the widening decision for consecutive reverse memory accesses and, consequently, get rid of the Legal->isConsetuviePtr() call in LV code gen. I think this is a simpler/cleaner solution to PR34965 than the one in D39346. Fixes PR34965. Patch by Diego Caballero, thanks! Differential Revision: https://reviews.llvm.org/D40742 llvm-svn: 320913
* Fixed warning 'function declaration isn’t a prototype ↵Galina Kistanova2017-12-161-1/+1
| | | | | | [-Werror=strict-prototypes]' llvm-svn: 320912
* [PowerPC, AsmParser] Enable the mnemonic spell correctorHal Finkel2017-12-162-2/+59
| | | | | | | | | | | r307148 added an assembly mnemonic spelling correction support and enabled it on ARM. This enables that support on PowerPC as well. Patch by Dmitry Venikov, thanks! Differential Revision: https://reviews.llvm.org/D40552 llvm-svn: 320911
* [X86] Add 128 and 256-bit VPOPCNTDQ instructions. Adjust some tablegen ↵Craig Topper2017-12-165-64/+324
| | | | | | | | classes LZCNT/POPCNT. I think when this instruction was first published it was only for a Knights CPU and thus VLX version was missing. llvm-svn: 320910
* [LTO] Update tests for r320905Vitaly Buka2017-12-162-2/+2
| | | | llvm-svn: 320909
* [VerifyDiagnosticConsumer] support -verify=<prefixes>Hal Finkel2017-12-1610-554/+315
| | | | | | | | | | | | | | | | | | | | This mimics FileCheck's --check-prefixes option. The default prefix is "expected". That is, "-verify" is equivalent to "-verify=expected". The goal is to permit exercising a single test suite source file with different compiler options producing different sets of diagnostics. While cpp can be combined with the existing -verify to accomplish the same goal, source is often easier to maintain when it's not cluttered with preprocessor directives or duplicate passages of code. For example, this patch also rewrites some existing clang tests to demonstrate the benefit of this feature. Patch by Joel E. Denny, thanks! Differential Revision: https://reviews.llvm.org/D39694 llvm-svn: 320908
* Remove trailing whitespaceVitaly Buka2017-12-161-1/+1
| | | | llvm-svn: 320907
* [WebAssembly] Return ArrayRef's rather than const std::vector&Sam Clegg2017-12-161-21/+11
| | | | | | | | | | From working on lld I've learned this is generally the preferred way for several reasons (e.g. more concise, improves encapsulation). Differential Revision: https://reviews.llvm.org/D41265 llvm-svn: 320906
* [LTO] Make processing of combined module more consistentVitaly Buka2017-12-1625-56/+75
| | | | | | | | | | | | | | | | | Summary: 1. Use stream 0 only for combined module. Previously if combined module was not processes ThinLTO used the stream for own output. However small changes in input, could trigger combined module and shuffle outputs making life of llvm::LTO harder. 2. Always process combined module and write output to stream 0. Processing empty combined module is cheap and allows llvm::LTO users to avoid implementing processing which is already done in llvm::LTO. Subscribers: mehdi_amini, inglorion, eraman, hiraditya Differential Revision: https://reviews.llvm.org/D41267 llvm-svn: 320905
* [TextDiagnosticBuffer] Fix diagnostic note emission orderHal Finkel2017-12-163-13/+39
| | | | | | | | | | | | The frontend currently groups diagnostics from the command line according to diagnostic level, but that places all notes last. Fix that by emitting such diagnostics in the order they were generated. Patch by Joel E. Denny, thanks! Differential Revision: https://reviews.llvm.org/D40995 llvm-svn: 320904
* Add another missing -enable-import-metadata to testTeresa Johnson2017-12-161-1/+1
| | | | | | | | r320895 modified a test so that it needs -enable-import-metadata which is false by default for NDEBUG, found another place that needs this added. llvm-svn: 320903
* [CodeGen] Specialize mixed-sign mul-with-overflow (fix PR34920)Vedant Kumar2017-12-162-0/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a specialized way to lower overflow-checked multiplications with mixed-sign operands. This fixes link failures and ICEs on code like this: void mul(int64_t a, uint64_t b) { int64_t res; __builtin_mul_overflow(a, b, &res); } The generic checked-binop irgen would use a 65-bit multiplication intrinsic here, which requires runtime support for _muloti4 (128-bit multiplication), and therefore fails to link on i386. To get an ICE on x86_64, change the example to use __int128_t / __uint128_t. Adding runtime and backend support for 65-bit or 129-bit checked multiplication on all of our supported targets is infeasible. This patch solves the problem by using simpler, specialized irgen for the mixed-sign case. llvm.org/PR34920, rdar://34963321 Testing: Apart from check-clang, I compared the output from this fairly comprehensive test driver using unpatched & patched clangs: https://gist.github.com/vedantk/3eb9c88f82e5c32f2e590555b4af5081 Differential Revision: https://reviews.llvm.org/D41149 llvm-svn: 320902
* [SimplifyLibCalls] Inline calls to cabs when it's safe to do soHal Finkel2017-12-167-0/+192
| | | | | | | | | | | | When unsafe algerbra is allowed calls to cabs(r) can be replaced by: sqrt(creal(r)*creal(r) + cimag(r)*cimag(r)) Patch by Paul Walker, thanks! Differential Revision: https://reviews.llvm.org/D40069 llvm-svn: 320901
* [LV] NFC patch for moving VP*Recipe class definitions from LoopVectorize.cpp ↵Hal Finkel2017-12-163-392/+415
| | | | | | | | | | | | | | | | | | | to VPlan.h This is a small step forward to move VPlan stuff to where it should belong (i.e., VPlan.*): 1. VP*Recipe classes in LoopVectorize.cpp are moved to VPlan.h. 2. Many of VP*Recipe::print() and execute() definitions are still left in LoopVectorize.cpp since they refer to things declared in LoopVectorize.cpp. To be moved to VPlan.cpp at a later time. 3. InterleaveGroup class is moved from anonymous namespace to llvm namespace. Referencing it in anonymous namespace from VPlan.h ended up in warning. Patch by Hideki Saito, thanks! Differential Revision: https://reviews.llvm.org/D41045 llvm-svn: 320900
* Add -enable-import-metadata to testTeresa Johnson2017-12-161-1/+1
| | | | | | | r320895 modified a test so that it needs -enable-import-metadata which is false by default for NDEBUG. llvm-svn: 320899
* [X86] Add back the assert from r320830 that was reverted in r320850Craig Topper2017-12-161-0/+2
| | | | | | Hopefully r320864 has fixed the offending case that failed the assert. llvm-svn: 320898
* Fix NDEBUG build problem in r320895Teresa Johnson2017-12-161-1/+1
| | | | | | Fix incorrect placement of #endif causing NDEBUG build failures. llvm-svn: 320897
* [COFF] Clean up debug option handlingShoaib Meenai2017-12-164-22/+24
| | | | | | | | | | | | | | | /debug and /debug:dwarf are orthogonal. An object file can contain both CodeView and DWARF debug info, so the combination of /debug:dwarf and /debug should generate both DWARF and a PDB, rather than /debug:dwarf always suppressing PDB creation. /nopdb is now redundant and can be removed. /debug /nopdb was previously used to support DWARF, but specifying /debug:dwarf is entirely equivalent to that combination now. Differential Revision: https://reviews.llvm.org/D41310 llvm-svn: 320896
* [ThinLTO] Enable importing of aliases as copy of aliaseeTeresa Johnson2017-12-1614-81/+236
| | | | | | | | | | | | | | | | | | | | | | | Summary: This implements a missing feature to allow importing of aliases, which was previously disabled because alias cannot be available_externally. We instead import an alias as a copy of its aliasee. Some additional work was required in the IndexBitcodeWriter for the distributed build case, to ensure that the aliasee has a value id in the distributed index file (i.e. even when it is not being imported directly). This is a performance win in codes that have many aliases, e.g. C++ applications that have many constructor and destructor aliases. Reviewers: pcc Subscribers: mehdi_amini, inglorion, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D40747 llvm-svn: 320895
* [COFF] Update an outdated comment. NFCShoaib Meenai2017-12-151-1/+1
| | | | | | | This comment dates from when LLD didn't produce actual PDBs, and is very outdated now. llvm-svn: 320894
* Fix WebAssembly backend for some LLVM API changesDavid Blaikie2017-12-156-11/+10
| | | | llvm-svn: 320893
* [COFF] Simplify hasArgs calls. NFCShoaib Meenai2017-12-151-4/+3
| | | | | | | We can just pass multiple options to hasArgs (which will check for any of those options being present) instead of calling it multiple times. llvm-svn: 320892
* [CMake] darwin-debug is an hard dependency for tests on macOS.Davide Italiano2017-12-151-0/+5
| | | | | | Fixes a few failured on the testsuite with CMake. llvm-svn: 320891
* [TableGen][GlobalISel] Make the different Matcher comparableQuentin Colombet2017-12-151-0/+52
| | | | | | | | | This opens refactoring opportunities in the match table now that we can check that two predicates are the same. NFC. llvm-svn: 320890
* [TableGen][GlobalISel] Fix unused variable warning in release modeQuentin Colombet2017-12-151-0/+1
| | | | | | | | Introduced in r320887. NFC. llvm-svn: 320889
* Revert "Recommit "[DWARFv5] Dump an MD5 checksum in the line-table header.""Paul Robinson2017-12-157-86/+27
| | | | | | | This reverts commit 0afef672f63f0e4e91938656bc73424a8c058bfc. Still failing at runtime on bots. llvm-svn: 320888
* [TableGen][GlobalISel] Have the predicate directly know which data they are ↵Quentin Colombet2017-12-151-101/+169
| | | | | | | | | | | | | dealing with Prior to this patch, a predicate wouldn't make sense outside of its rule. Indeed, it was only during emitting a rule that a predicate would be made aware of the IDs of the data it is checking. Because of that, predicates could not be moved around or compared between each other. NFC. llvm-svn: 320887
* Recommit "[DWARFv5] Dump an MD5 checksum in the line-table header."Paul Robinson2017-12-157-27/+86
| | | | | | | | | | | Adds missing support for DW_FORM_data16. Update of r320852, fixing the unittest to use a hand-coded struct instead of std::array to guarantee data layout. Differential Revision: https://reviews.llvm.org/D41090 llvm-svn: 320886
* Fix unused variable in non-assert buildsMatthias Braun2017-12-151-2/+1
| | | | llvm-svn: 320885
* MachineFunction: Return reference from getFunction(); NFCMatthias Braun2017-12-15242-843/+829
| | | | | | The Function can never be nullptr so we can return a reference. llvm-svn: 320884
* [MacOSX/Queues] Relax an overly aggressive assertion in a test.Davide Italiano2017-12-151-1/+2
| | | | | | | | | | "Default" is a valid QoS for a thread on older versions of macOS, like the one installed in the bot. Thanks to Jason Molenda for helping me figuring out the problem. <rdar://problem/28346273> llvm-svn: 320883
* MachineFunction: Slight refactoring; NFCMatthias Braun2017-12-154-21/+24
| | | | | | Slight cleanup/refactor in preparation for upcoming commit. llvm-svn: 320882
* MachineModuleInfo: Remove unused function; NFCMatthias Braun2017-12-151-1/+0
| | | | | | | | Remove the unused setModule() function; it would be dangerous if someone actually used it as it wouldn't reset/recompute various other module related data. llvm-svn: 320881
* [WebAssembly] Don't include lazy symbols in import tableSam Clegg2017-12-152-13/+20
| | | | | | | | | This bug was introduced in: https://reviews.llvm.org/D41304. Add a test for this case. Differential Revision: https://reviews.llvm.org/D41309 llvm-svn: 320872
* Fixed the gcc 'enumeral and non-enumeral type in conditional expression ↵Galina Kistanova2017-12-151-3/+3
| | | | | | [-Werror=extra]' warning introduced by r320750 llvm-svn: 320868
* [Hexagon] Remove recursion in visitUsesOf, replace with use queueKrzysztof Parzyszek2017-12-152-43/+121
| | | | | | | | | | | | | | | | This is primarily to reduce stack usage, but ordering the use queue according to the position in the code (earlier instructions visited before later ones) reduces the number of unnecessary bottoms due to visiting instructions out of order, e.g. %reg1 = copy %reg0 %reg2 = copy %reg0 %reg3 = and %reg1, %reg2 Here, reg3 should be known to be same as reg0-2, but if reg3 is evaluated after reg1 is updated, but before reg2 is updated, the two inputs to the and will appear different, causing reg3 to become bottom. llvm-svn: 320866
* [Hexagon] Handle concat_vectors of all allowed HVX typesKrzysztof Parzyszek2017-12-154-10/+99
| | | | llvm-svn: 320865
* [X86] Use AND32ri8 instead of AND64ri8 in Asan code in EmitCallAsanReport ↵Craig Topper2017-12-151-1/+1
| | | | | | | | for 32-bit mode. This seemed to work due to a quirk in the X86 MC encoder that didn't emit a REX byte that the AND64ri8 implies when in 32-bit mode. This made the encoding the same as AND32ri8. I tried to add an assert to catch the dropped REX prefix that caught this. llvm-svn: 320864
* [X86] In LowerVectorCTPOP use ISD::ZERO_EXTEND/ISD::TRUNCATE instead of the ↵Craig Topper2017-12-151-4/+4
| | | | | | | | target specific nodes. The target independent nodes will get legalized to the target specific nodes by their own legalization process. Someday I'd like to stop using a target specific for zero extends and truncates of legal types so the less places we reference the target specific opcode the better. llvm-svn: 320863
* [X86] Remove unnecessary TODO.Craig Topper2017-12-151-1/+0
| | | | | | When I wrote it I thought we were missing a potential optimization for KNL. But investigating further shows that for KNL we still do the optimal thing by widening to v4f32 and then using special isel patterns to widen again to zmm a register. llvm-svn: 320862
* [MinGW] Ignore the --no-seh flagMartin Storsjo2017-12-151-0/+1
| | | | | | | | | The COFF linker automatically sets the IMAGE_DLL_CHARACTERISTICS_NO_SEH when suitable, similarly to link.exe. Differential Revision: https://reviews.llvm.org/D41275 llvm-svn: 320861
* [COFF] Set the IMAGE_DLL_CHARACTERISTICS_NO_SEH flag automaticallyMartin Storsjo2017-12-153-3/+9
| | | | | | | | This seems to match how link.exe sets it. Differential Revision: https://reviews.llvm.org/D41252 llvm-svn: 320860
* [LTO] Remove unused RegularLTOState::HasModuleVitaly Buka2017-12-151-1/+0
| | | | llvm-svn: 320859
* Re-commit : [LICM] Allow sinking when foldable in loopJun Bum Lim2017-12-153-31/+232
| | | | | | | | | | | | | | | | | | | | | | This recommits r320823 reverted due to the test failure in sink-foldable.ll and an unused variable. Added "REQUIRES: aarch64-registered-target" in the test and removed unused variable. Original commit message: Continue trying to sink an instruction if its users in the loop is foldable. This will allow the instruction to be folded in the loop by decoupling it from the user outside of the loop. Reviewers: hfinkel, majnemer, davidxl, efriedma, danielcdh, bmakam, mcrosier Reviewed By: hfinkel Subscribers: javed.absar, bmakam, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D37076 llvm-svn: 320858
OpenPOWER on IntegriCloud