summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] Add vector urem tests.Simon Pilgrim2018-02-081-0/+54
| | | | | | Improve coverage of InstCombiner::visitURem for vector types llvm-svn: 324629
* Use ranged for loops in TypeFinder.cpp, NFCVedant Kumar2018-02-081-30/+20
| | | | llvm-svn: 324628
* [InstCombine] Regenerate vector mul tests.Simon Pilgrim2018-02-081-156/+193
| | | | llvm-svn: 324627
* [LoopIdiom] Be more aggressive when setting alignment in memcpyDaniel Neilson2018-02-082-4/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change is part of step five in the series of changes to remove alignment argument from memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the LoopIdiom pass to cease using the old IRBuilder CreateMemCpy single-alignment APIs in favour of the new API that allows setting source and destination alignments independently. This allows us to be slightly more aggressive in setting the alignment of memcpy calls that loop idiom creates. Steps: Step 1) Remove alignment parameter and create alignment parameter attributes for memcpy/memmove/memset. ( rL322965, rC322964, rL322963 ) Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing source and dest alignments. ( rL323597 ) Step 3) Update Clang to use the new IRBuilder API. ( rC323617 ) Step 4) Update Polly to use the new IRBuilder API. ( rL323618 ) Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API, and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment() and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278, rL324384, rL324395, rL324402 ) Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the MemIntrinsicInst::[get|set]Alignment() methods. Reference http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html llvm-svn: 324626
* Fix signed/unsigned compare warning I introducedErich Keane2018-02-081-2/+2
| | | | | | | | 'size' of a vector is unsigned, and I accidentially compared it to an int through GTEST. I switched it to unsigned, which is the template parameter type anyway. llvm-svn: 324625
* Once more, with feeling. Spell 'clang-4.0' correctly this timeMarshall Clow2018-02-082-2/+2
| | | | llvm-svn: 324624
* [ARM] Add 'fillValidCPUArchList' to ARM targetsErich Keane2018-02-083-0/+44
| | | | | | | | | This is a support change for a CFE change (https://reviews.llvm.org/D42978) that allows march and -target-cpu to list the valid targets in a note. The changes are limited to the ARM/AArch64, since this is the only target that gets the CPU list from LLVM. llvm-svn: 324623
* [dsymutil] Use llvm::sys::path to join bundle path.Jonas Devlieghere2018-02-081-3/+4
| | | | | | | | When processing a dSYM bundle, use llvm::sys::path to join the different path components instead of using a string with hard coded forward slashes as separators. llvm-svn: 324622
* [dwarfdump] Normalize input path.Jonas Devlieghere2018-02-081-0/+2
| | | | | | | | | Before this patch, llvm-dwarfdump would reject `bundel.dSYM/` as input, while `bundel.dSYM` was accepted. The reason is that `path::extension()` returns an empty string for the former, leading to the argument not being recognized as a dSYM bundle. llvm-svn: 324621
* [scudo] Allow options to be defined at compile timeKostya Kortchinsky2018-02-085-11/+18
| | | | | | | | | | | | | | | | Summary: Allow for options to be defined at compile time, like is already the case for other sanitizers, via `SCUDO_DEFAULT_OPTIONS`. Reviewers: alekseyshl, dberris Reviewed By: alekseyshl, dberris Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42980 llvm-svn: 324620
* Clean up string's deduction guides tests. Mark old versions of clang as ↵Marshall Clow2018-02-083-58/+83
| | | | | | unsupported, b/c they don't have deduction guides, even in C++17 mode llvm-svn: 324619
* [clang-format] Do not break Objective-C string literals inside array literalsBen Hamilton2018-02-083-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Concatenating Objective-C string literals inside an array literal raises the warning -Wobjc-string-concatenation (which is enabled by default). clang-format currently splits and concatenates string literals like the following: NSArray *myArray = @[ @"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ]; into: NSArray *myArray = @[ @"aaaaaaaaaaaaaaaaaaaaaaaaaaaa" @"aaaaaaaaa" ]; which raises the warning. This is https://bugs.llvm.org/show_bug.cgi?id=36153 . The options I can think of to fix this are: 1) Have clang-format disable Wobjc-string-concatenation by emitting pragmas around the formatted code 2) Have clang-format wrap the string literals in a macro (which disables the warning) 3) Disable string splitting for Objective-C string literals inside array literals I think 1) has no precedent, and I couldn't find a good identity() macro for 2). So, this diff implements 3). Test Plan: make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: jolesiak, stephanemoore, djasper Reviewed By: jolesiak Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42704 llvm-svn: 324618
* [AMDGPU] Updae documentation about address spaceYaxun Liu2018-02-081-25/+13
| | | | llvm-svn: 324617
* [SLPVectorizer] auto-generate complete checks; NFCSanjay Patel2018-02-081-18/+52
| | | | llvm-svn: 324616
* [SLPVectorizer] auto-generate complete checks; NFCSanjay Patel2018-02-081-14/+43
| | | | llvm-svn: 324615
* [SLPVectorizer] move RUN line to top-of-file; NFCSanjay Patel2018-02-081-1/+1
| | | | | | | I was confused what we were checking because the RUN line was in the middle of the file. llvm-svn: 324614
* [InstCombine] Fix issue with X udiv (POW2_C1 << N) for non-splat constant ↵Simon Pilgrim2018-02-082-4/+55
| | | | | | | | vectors foldUDivShl was assuming that the input was a scalar or a splat constant llvm-svn: 324613
* [SLPVectorizer] auto-generate complete checks; NFCSanjay Patel2018-02-081-30/+145
| | | | llvm-svn: 324612
* [LoopVectorize] auto-generate complete checks; NFCSanjay Patel2018-02-081-5/+80
| | | | llvm-svn: 324611
* [ValueTracking] don't crash when assumptions conflict (PR36270)Sanjay Patel2018-02-082-0/+29
| | | | | | | | | | | | | | The last assume in the test says that %B12 is 0. The first assume says that %and1 is less than %B12. Therefore, %and1 is unsigned less than 0...does not compute. That means this line: Known.Zero.setHighBits(RHSKnown.countMinLeadingZeros() + 1); ...tries to set more bits than exist. Differential Revision: https://reviews.llvm.org/D43052 llvm-svn: 324610
* Update the status of removed componentsMarshall Clow2018-02-081-14/+14
| | | | llvm-svn: 324609
* [InstCombine] Fix issue with X udiv 2^C -> X >> C for non-splat constant vectorsSimon Pilgrim2018-02-082-3/+25
| | | | | | foldUDivPow2Cst was assuming that the input was a scalar or a splat constant llvm-svn: 324608
* [Parser][FixIt] Better diagnostics for "typedef" instead of "typename" typoJan Korous2018-02-084-14/+47
| | | | | | | | rdar://problem/10214588 Differential Revision: https://reviews.llvm.org/D42170 llvm-svn: 324607
* [ARM] Re-commit r324600 with fixed LLVMBuild.txtOliver Stannard2018-02-084-12/+36
| | | | | | | | | | | | | | | | | | | | | | ARMDisassembler now depends on the banked register tables in ARMUtils, so the LLVMBuild.txt needed updating to reflect this. Original commit mesage: [ARM] Fix disassembly of invalid banked register moves When disassembling banked register move instructions, we don't have an assembly syntax for the unallocated register numbers, so we have to return Fail rather than SoftFail. Previously we were returning SoftFail, then crashing in the InstPrinter as we have no way to represent these encodings in an assembly string. This also switches the decoder to use the table-generated list of banked registers, removing the duplicated list of encodings. Differential revision: https://reviews.llvm.org/D43066 llvm-svn: 324606
* Fix unused variable warning.Simon Pilgrim2018-02-081-1/+1
| | | | llvm-svn: 324605
* Revert r324600 as it breaks a buildbotOliver Stannard2018-02-083-35/+11
| | | | | | | | The broken bot (clang-ppc64le-linux-multistage) is doign a shared-object build, so I guess using lookupBankedRegByEncoding in the disassembler is a layering violation? llvm-svn: 324604
* [InstCombine] Improve mul(x, pow2) -> shl combine for vector constantsSimon Pilgrim2018-02-083-19/+23
| | | | | | Refactor getLogBase2Vector into getLogBase2 to accept all scalars/vectors. Generalize from ConstantDataVector to support all constant vectors. llvm-svn: 324603
* [x86] Add test/CodeGen/X86/vmaskmov-offset.ll. NFC.Alexander Ivchenko2018-02-081-0/+42
| | | | | | Needed for checking current code generation. llvm-svn: 324601
* [ARM] Fix disassembly of invalid banked register movesOliver Stannard2018-02-083-11/+35
| | | | | | | | | | | | | | | When disassembling banked register move instructions, we don't have an assembly syntax for the unallocated register numbers, so we have to return Fail rather than SoftFail. Previously we were returning SoftFail, then crashing in the InstPrinter as we have no way to represent these encodings in an assembly string. This also switches the decoder to use the table-generated list of banked registers, removing the duplicated list of encodings. Differential revision: https://reviews.llvm.org/D43066 llvm-svn: 324600
* [clangd] Update include guard in Annotations.h. NFCIlya Biryukov2018-02-081-2/+2
| | | | llvm-svn: 324599
* [test][dsymutil] Fix tests for Windows bots.Jonas Devlieghere2018-02-083-17/+2
| | | | | | | | | | The UNSUPPORTED directive was not honored by the bot, presumably because of the FIXME above it. This moves the comment down and removes the remaining update check from basic-linking-x86.test. This should un-break: llvm-clang-x86_64-expensive-checks-win/builds/7798/ llvm-svn: 324598
* Add missed PostDominatorTree analysis dependency to GVN hoist pass.Alexander Ivchenko2018-02-081-0/+1
| | | | | | | | | | | | | Summary: GVN hoist pass is using PostDominatorTree analysis, therefore the analysis should be listed in the pass initialization as a dependency. Reviewed By: sebpop Differential Revision: https://reviews.llvm.org/D43007 Author: ashlykov <arkady.shlykov@intel.com> llvm-svn: 324597
* [libcxx] Avoid spurious construction of valarray elementsMikhail Maltsev2018-02-085-21/+139
| | | | | | | | | | | | | | | | | | | | | Summary: Currently libc++ implements some operations on valarray by using the resize method. This method has a parameter with a default value. Because of this, valarray may spuriously construct and destruct objects of valarray's element type. This patch fixes this issue and adds corresponding test cases. Reviewers: EricWF, mclow.lists Reviewed By: mclow.lists Subscribers: rogfer01, cfe-commits Differential Revision: https://reviews.llvm.org/D41992 llvm-svn: 324596
* [X86][MC]: Adding test coverage of MC encoding for several small ↵Gadi Haber2018-02-0823-0/+1602
| | | | | | | | | | | | | | | | extensions.<NFC> NFC. Adding MC regressions tests to cover several small x86 extensions as follows: CLWB, CLZERO, F16C, INVPCID, PKU, POPCNT, RTM, SGX, SHA, SVM, VMFUNC, VTX This patch is part of a larger task to cover MC encoding of all X86 isa sets started in revision: https://reviews.llvm.org/D39952 Reviewers: RKSimon, craig.topper, zvi, AndreiGrischenko Differential Revision: https://reviews.llvm.org/D41388 Change-Id: I254508cd17faca00b780be0fc2abf6c71b61faab llvm-svn: 324595
* Fix for #31362 - ms_abi is implemented incorrectly for values >=16 bytes.Alexander Ivchenko2018-02-082-1/+24
| | | | | | | | | | | | | | | | Summary: This patch is a fix for following issue: https://bugs.llvm.org/show_bug.cgi?id=31362 The problem was caused by front end lowering C calling conventions without taking into account calling conventions enforced by attribute. In this case win64cc was no correctly lowered on targets other than Windows. Reviewed By: rnk (Reid Kleckner) Differential Revision: https://reviews.llvm.org/D43016 Author: belickim <mateusz.belicki@intel.com> llvm-svn: 324594
* [builtins] Workaround for infinite recursion in c?zdi2Jonas Devlieghere2018-02-082-0/+12
| | | | | | | | | | | gcc resolves `__builtin_c?z` to `__c?zdi2` which leads to infinite recursion. This problem has been observed for sparc64, mips64 and riscv. Presumably this happens whenever an arch without dedicated bit counting instructions is targeted. This patch provides a workaround. Differential revision: https://reviews.llvm.org/D42902 llvm-svn: 324593
* Re-land [dsymutil] Upstream update featureJonas Devlieghere2018-02-089-45/+362
| | | | | | | | | | This commit attempts to re-land the r324480 which was reverted in r324493 because it broke the Windows bots. For now I disabled the two update tests on Windows until I'm able to debug this. Differential revision: https://reviews.llvm.org/D42880 llvm-svn: 324592
* [clang-format] Do not break before long string literals in protosKrasimir Georgiev2018-02-085-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is a follow-up to r323319 (which disables string literal breaking for text protos) and it disables breaking before long string literals. For example this: ``` keyyyyy: "long string literal" ``` used to get broken into: ``` keyyyyy: "long string literal" ``` While at it, I also enabled it for LK_Proto and fixed a bug in the mustBreak code. Reviewers: djasper, sammccall Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42957 llvm-svn: 324591
* Rewrite the flaky test_restart_bug test in a more deterministic wayPavel Labath2018-02-083-88/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test was trying to reproduce a bug in handling of two concurrent events, which was impossible to do reliably in a black-box style test. In practice, this meant the test was only ever failing on remote targets, as these were slow enough to trigger this. Fortunately, we now have the ability to mock the server side of the connection, which means we can simulate the failure deterministically, so I rewrite the test to use the new gdb-client framework. I've needed to add a couple of new packets to the mock server to be able to do this. Instead of trying to guess how a "typical" gdb-client test will want to handle this, I throw an exception in the implementation to force the user to override them (the packets are only sent if the test explicitly performs some action which will trigger them, so a basic test which e.g. does not need the "continue" functionality will not need to implement them). Reviewers: owenpshaw Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D42959 llvm-svn: 324590
* [Loop Predication] Teach LP about reverse loops with uge and sge latch ↵Serguei Katkov2018-02-082-5/+113
| | | | | | | | | | | | | | conditions Add support of uge and sge latch condition to Loop Prediction for reverse loops. Reviewers: apilipenko, mkazantsev, sanjoy, anna Reviewed By: anna Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42837 llvm-svn: 324589
* [OMPT] Add tool_available_search testcaseJoachim Protze2018-02-081-0/+104
| | | | | | | | | | | | | | | | | | Tests the search for tools as defined in the spec. The OMP_TOOL_LIBRARIES environment variable contains paths to the following files(in that order) -to a nonexisting file -to a shared library that does not have a ompt_start_tool function -to a shared library that has an ompt_start_tool implementation returning NULL -to a shared library that has an ompt_start_tool implementation returning a pointer to a valid instance of ompt_start_tool_result_t The expected result is that the last tool gets active and can print in the thread-begin callback. Differential Revision: https://reviews.llvm.org/D42166 llvm-svn: 324588
* [OMPT] Add tool_not_available testcaseJoachim Protze2018-02-082-0/+69
| | | | | | | | | | | | Add a testcase that checks wheter the runtime can handle an ompt_start_tool method that returns NULL indicating that no tool shall be loaded. All tool_available testcases need a separate folder to avoid file conflicts for the generated tools. Differential Revision: https://reviews.llvm.org/D41904 llvm-svn: 324587
* [X86] Fix compilation of r324580.Clement Courbet2018-02-081-1/+1
| | | | | | @ctopper Can you check that the fix is correct ? llvm-svn: 324586
* Revert accidental changes that snuck in r324584Stefan Maksimovic2018-02-084-27/+1
| | | | llvm-svn: 324585
* [mips] Define certain instructions in microMIPS32r3Stefan Maksimovic2018-02-0837-254/+738
| | | | | | | | | | | | | | | | | | | | Instructions affected: mthc1, mfhc1, add.d, sub.d, mul.d, div.d, mov.d, neg.d, cvt.w.d, cvt.d.s, cvt.d.w, cvt.s.d These instructions are now defined for microMIPS32r3 + microMIPS32r6 in MicroMipsInstrFPU.td since they shared their encoding with those already defined in microMIPS32r6InstrInfo.td and have been therefore removed from the latter file. Some instructions present in MicroMipsInstrFPU.td which did not have both AFGR64 and FGR64 variants defined have been altered to do so. Differential revision: https://reviews.llvm.org/D42738 llvm-svn: 324584
* [AVR] Fix the testsuite after '%' changed to '$' in MIRDylan McKay2018-02-0840-119/+119
| | | | llvm-svn: 324583
* [TargetSchedule] Expose sub-units of a ProcResGroup in MCProcResourceDesc.Clement Courbet2018-02-083-5/+45
| | | | | | | | | | | | | | | | | | Summary: Right now using a ProcResource automatically counts as usage of all super ProcResGroups. All this is done during codegen, so there is no way for schedulers to get this information at runtime. This adds the information of which individual ProcRes units are contained in a ProcResGroup in MCProcResourceDesc. Reviewers: gchatelet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43023 llvm-svn: 324582
* [AArch64] Don't materialize 0 with "fmov h0, .." when FullFP16 is not supportedSjoerd Meijer2018-02-083-7/+11
| | | | | | | | | | | | | | We were generating "fmov h0, wzr" instructions when FullFP16 is not enabled. I've not added any tests, because the problem was visible in: test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll, which I had to change: I don't think Cyclone has FullFP16 enabled by default, so it shouldn't be using this v8.2a instruction. I've also removed these rdar tags, please shout if there are any objections. Differential Revision: https://reviews.llvm.org/D43020 llvm-svn: 324581
* [X86] Support folding in a k-register OR when creating KORTEST from scalar ↵Craig Topper2018-02-083-18/+18
| | | | | | | | compare of a bitcast from vXi1. This should allow us to remove the kortest intrinsic from IR and use compare+bitcast+or in IR instead. llvm-svn: 324580
* [X86] Allow KORTEST instruction to be used for testing if a mask is all onesCraig Topper2018-02-084-17/+49
| | | | | | | | The KTEST instruction sets the C flag if the result of anding both operands together is all 1s. We can use this to lower (icmp eq/ne (bitcast (vXi1 X), -1) Differential Revision: https://reviews.llvm.org/D42772 llvm-svn: 324577
OpenPOWER on IntegriCloud