summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86][SSE] Add scheduler class support for SSE42 (PCMPGT) instructionsSimon Pilgrim2017-04-232-12/+16
| | | | llvm-svn: 301142
* [X86][SSE] Add scheduling latency/throughput tests for (most) SSE42 instructionsSimon Pilgrim2017-04-231-0/+477
| | | | llvm-svn: 301141
* [InstCombine] add tests for not-xor and remove redundant tests; NFCSanjay Patel2017-04-232-55/+147
| | | | llvm-svn: 301140
* [JumpThread] We want to fold (not thread) when all predecessor go to single ↵Xin Tong2017-04-232-0/+165
| | | | | | | | | | | | | | | | | | | | | BB's successor. Summary: In case all predecessor go to a single successor of current BB. We want to fold (not thread). I failed to update the phi nodes properly in the last patch https://reviews.llvm.org/rL300657. Phi nodes values are per predecessor in LLVM. Reviewers: sanjoy Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32400 llvm-svn: 301139
* Fix typo in comment.Nick Lewycky2017-04-231-1/+1
| | | | llvm-svn: 301138
* [X86][SSE] Add scheduling latency/throughput tests for (most) SSE41 instructionsSimon Pilgrim2017-04-231-0/+1938
| | | | llvm-svn: 301137
* [X86][SSE] Add missing scheduling latency/throughput test for PINSRWSimon Pilgrim2017-04-231-0/+46
| | | | llvm-svn: 301136
* Correct grammar. NFCXin Tong2017-04-231-1/+1
| | | | llvm-svn: 301135
* [APInt] Make clearUnusedBits branch free.Craig Topper2017-04-231-7/+2
| | | | | | | | This makes the WordBits calculation calculate a value between 1 and 64 for the number of bits in the last word. Previously if the BitWidth was a multiple of 64 bits the WordBits value was 0 and we had to bail out early to avoid an undefined shift. Now with a value of 64 we no longer have an undefined shift issue. This shows a 15-16k reduction in the size of the opt binary on my local x86-64 build. llvm-svn: 301134
* [APInt] In sext single word case, use SignExtend64 and let the APInt ↵Craig Topper2017-04-232-5/+22
| | | | | | | | constructor mask off any excess bits. The current code is trying to be clever with shifts to avoid needing to clear unused bits. But it looks like the compiler is unable to optimize out the unused bit handling in the APInt constructor. Given this its better to just use SignExtend64 and have more readable code. llvm-svn: 301133
* Add missing acquire_load to call_once overload.Justin Lebar2017-04-231-1/+1
| | | | | | | | | | | | Summary: Seemed to have been overlooked in D24028. This bug was found and brought to my attention by Paul Wankadia. Reviewers: kubamracek, EricWF, dvyukov Differential Revision: https://reviews.llvm.org/D32402 llvm-svn: 301132
* [InstCombine] add tests for or-to-xor; NFCSanjay Patel2017-04-231-0/+76
| | | | llvm-svn: 301131
* clang-rename: fix formattingMiklos Vajna2017-04-233-7/+5
| | | | | | As detected by clang-format. llvm-svn: 301130
* [InstCombine] add pattern matches for commuted variants of xor-to-xorSanjay Patel2017-04-232-45/+58
| | | | | | | | | There's probably some better way to write this that eliminates the code duplication without hurting readability, but at least this eliminates the logic holes and is hopefully slightly more efficient than creating new instructions. llvm-svn: 301129
* [InstCombine] add tests for xor-to-xor; NFCSanjay Patel2017-04-231-0/+215
| | | | | | Besides missing 2 commuted patterns, the way we handle these folds is inefficient. llvm-svn: 301128
* [X86][SSE] Add scheduling latency/throughput tests for SSSE3 instructionsSimon Pilgrim2017-04-231-0/+754
| | | | llvm-svn: 301127
* [X86][SSE] Add scheduling latency/throughput tests for SSE3 instructionsSimon Pilgrim2017-04-231-0/+455
| | | | llvm-svn: 301126
* [InstCombine] add tests for add-to-xor commuted variants; NFCSanjay Patel2017-04-231-5/+47
| | | | | | | 1 out of the 4 tests commuted the operands, so there's an asymmetry somewhere under this in how we handle these transforms. llvm-svn: 301125
* Revert "[APInt] Fix a few places that use APInt::getRawData to operate ↵Renato Golin2017-04-2314-46/+38
| | | | | | | | | | | | | | | | within the normal API." This reverts commit r301105, 4, 3 and 1, as a follow up of the previous revert, which broke even more bots. For reference: Revert "[APInt] Use operator<<= where possible. NFC" Revert "[APInt] Use operator<<= instead of shl where possible. NFC" Revert "[APInt] Use ashInPlace where possible." PR32754. llvm-svn: 301111
* Revert "[APInt] Add ashrInPlace method and implement ashr using it. Also fix ↵Renato Golin2017-04-234-77/+77
| | | | | | | | | | a bug in the shift by BitWidth handling." This reverts commit r301094, as it broke all ARM self-hosting bots. PR32754. llvm-svn: 301110
* [X86][MPX] Add load & store instructions of bnd values to ↵Ayman Musa2017-04-231-22/+30
| | | | | | | | | | getLoadStoreRegOpcode function. This is needed for a follow up patch that generates the memory folding tables. Differential Revision: https://reviews.llvm.org/D32232 llvm-svn: 301109
* [isl C++ bindings] Add explicit const casts for *foreach* bindingsTobias Grosser2017-04-231-7/+7
| | | | | | | This avoids a compiler warning about lost 'const' attributes. Suggested-by: Michael Kruse <llvm@meinersbur.de> llvm-svn: 301108
* [X86] Convert test checks to generated checks of update_llc_test_checks.py. NFCAyman Musa2017-04-231-18/+1
| | | | llvm-svn: 301107
* [ARM] ScheduleDAGRRList::DelayForLiveRegsBottomUp must consider OptionalDefsArtyom Skrobov2017-04-232-0/+30
| | | | | | | | | | | | | | | | | Summary: D30400 has enabled tADC and tSBC instructions to be unglued, thereby allowing CPSR to remain live between Thumb1 scheduling units. Most Thumb1 instructions have an OptionalDef for CPSR; but the scheduler ignored the OptionalDefs, and could unwittingly insert a flag-setting instruction in between an ADDS and the corresponding ADC. Reviewers: javed.absar, atrick, MatzeB, t.p.northover, jmolloy, rengolin Reviewed By: javed.absar Subscribers: rogfer01, efriedma, aemerson, rengolin, llvm-commits, MatzeB Differential Revision: https://reviews.llvm.org/D31081 llvm-svn: 301106
* [APInt] Fix a few places that use APInt::getRawData to operate within the ↵Craig Topper2017-04-233-8/+5
| | | | | | | | | | normal API. getRawData exposes the internal type of the APInt class directly to its users. Ideally we wouldn't expose such an implementation detail. This patch fixes a few of the easy cases by using truncate, extract, or a rotate. llvm-svn: 301105
* [APInt] Use operator<<= where possible. NFCCraig Topper2017-04-233-5/+5
| | | | llvm-svn: 301104
* [APInt] Use operator<<= instead of shl where possible. NFCCraig Topper2017-04-239-21/+32
| | | | llvm-svn: 301103
* [ThinLTO/Summary] Rename anonymous globals as last action ...Davide Italiano2017-04-231-3/+6
| | | | | | | | | | | | | | ... in the per-TU -O0 pipeline. The problem is that there could be passes registered using `addExtensionsToPM()` introducing unnamed globals. Asan is an example, but there may be others. Building cppcheck with `-flto=thin` and `-fsanitize=address` triggers an assertion while we're reading bitcode (in lib/LTO), as the BitcodeReader assumes there are no unnamed globals (because the namer has run). Unfortunately I wasn't able to find an easy way to test this. I added a comment in the hope nobody moves this again. llvm-svn: 301102
* [APInt] Use ashInPlace where possible.Craig Topper2017-04-233-4/+4
| | | | llvm-svn: 301101
* Simplify FreeBSD Host.cpp with early returnsEd Maste2017-04-231-78/+86
| | | | | | Based on NetBSD's Host.cpp. Also tidy up comments to match NetBSD. llvm-svn: 301100
* Revert "Use DW_OP_stack_value when reconstructing variable values with ↵Adrian Prantl2017-04-232-67/+20
| | | | | | | | arithmetic." This reverts commit r301093 while investigating stage2 bot breakage. llvm-svn: 301099
* Fix testcase: s/CHECKNEXT/CHECK-NEXT/Jonathan Roelofs2017-04-221-8/+8
| | | | llvm-svn: 301098
* [InstCombine] clean up tests and regenerate checks; NFCSanjay Patel2017-04-221-44/+46
| | | | llvm-svn: 301097
* [CMake] Fix polly-isl-test execution in out-of-LLVM-tree builds.Michael Kruse2017-04-223-7/+10
| | | | | | | | | | | | | The isl unittest modified its PATH variable to point to the LLVM bin dir. When building out-of-LLVM-tree, it does not contain the polly-isl-test executable, hence the test fails. Ensure that the polly-isl-test is written to a bin directory in the build root, just like it would happen in an inside-LLVM build. Then, change PATH to include that dir such that the executable in it is prioritized before any other location. llvm-svn: 301096
* [CMake] Fix unittests in out-of-LLVM-tree builds.Michael Kruse2017-04-222-13/+18
| | | | | | | | | | | | | Unittests are linked against a subset of LLVM libraries and its transitive dependencies resolved by CMake. The information about indirect library dependency is not available when building separately from LLVM, which result in missing symbol errors while linking. Resolve this issue by querying llvm-config about the available LLVM libraries and link against all of them, since dependence information is still not available. llvm-svn: 301095
* [APInt] Add ashrInPlace method and implement ashr using it. Also fix a bug ↵Craig Topper2017-04-224-77/+77
| | | | | | | | in the shift by BitWidth handling. For single word, shift by BitWidth was always returning 0, but for multiword it was based on original sign. Now single word matches multi word. llvm-svn: 301094
* Use DW_OP_stack_value when reconstructing variable values with arithmetic.Adrian Prantl2017-04-222-20/+67
| | | | | | | | | | | | | When the location description of a source variable involves arithmetic on the value itself, it needs to be marked with DW_OP_stack_value since it is not describing the variable's location, but rather its value. This is a follow-up to r297971 and fixes the source testcase quoted in the comment in debuginfo-dce.ll. rdar://problem/30725338 llvm-svn: 301093
* [X86] Regenerate TLS testsSimon Pilgrim2017-04-223-190/+221
| | | | | | Use the correct check prefix for X86/X32/X64 target types. llvm-svn: 301092
* [APInt] Remove unnecessary min with BitWidth from countTrailingOnesSlowCase.Craig Topper2017-04-221-1/+2
| | | | | | The unused upper bits are guaranteed to be 0 so we don't need to worry about accidentally counting them. llvm-svn: 301091
* [PartialInlining] Using existing hasAddressTaken interface to legality check/NFCXinliang David Li2017-04-221-19/+3
| | | | llvm-svn: 301090
* [builtins] Implement emulated TLS on Windows.Frederich Munch2017-04-222-67/+222
| | | | | | | | | | | | | | | Summary: LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows. Reviewers: chh, howard.hinnant Reviewed By: chh Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D30787 llvm-svn: 301089
* [InstCombine] use 'match' to reduce code; NFCISanjay Patel2017-04-221-36/+31
| | | | | | | | | | | The later uses of dyn_castNotVal in this block are either incomplete (doesn't handle vector constants) or overstepping (shouldn't handle constants at all), but this first use is just unnecessary. 'I' is obviously not a constant, and it can't be a not-of-a-not because that would already be instsimplified. llvm-svn: 301088
* Update documentation for the NetBSD targetKamil Rytarowski2017-04-221-0/+2
| | | | | | LLVM is known to work on NetBSD x86 32-bit and 64-bit. llvm-svn: 301081
* [globalisel][tablegen] Add support for RegisterOperand.Daniel Sanders2017-04-222-2/+12
| | | | | | | | | | | | | | | | | | Summary: It functions just like RegisterClass except that the class is obtained from a field. Depends on D31761. Reviewers: ab, qcolombet, t.p.northover, rovka, kristof.beyls, aditya_nandakumar Reviewed By: ab Subscribers: dberris, llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D32229 llvm-svn: 301080
* [globalisel][tablegen] Revise API for ComplexPattern operands to improve ↵Daniel Sanders2017-04-2210-155/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flexibility. Summary: Some targets need to be able to do more complex rendering than just adding an operand or two to an instruction. For example, it may need to insert an instruction to extract a subreg first, or it may need to perform an operation on the operand. In SelectionDAG, targets would create SDNode's to achieve the desired effect during the complex pattern predicate. This worked because SelectionDAG had a form of garbage collection that would take care of SDNode's that were created but not used due to a later predicate rejecting a match. This doesn't translate well to GlobalISel and the churn was wasteful. The API changes in this patch enable GlobalISel to accomplish the same thing without the waste. The API is now: InstructionSelector::OptionalComplexRendererFn selectArithImmed(MachineOperand &Root) const; where Root is the root of the match. The return value can be omitted to indicate that the predicate failed to match, or a function with the signature ComplexRendererFn can be returned. For example: return OptionalComplexRendererFn( [=](MachineInstrBuilder &MIB) { MIB.addImm(Immed).addImm(ShVal); }); adds two immediate operands to the rendered instruction. Immed and ShVal are captured from the predicate function. As an added bonus, this also reduces the amount of information we need to provide to GIComplexOperandMatcher. Depends on D31418 Reviewers: aditya_nandakumar, t.p.northover, qcolombet, rovka, ab, javed.absar Reviewed By: ab Subscribers: dberris, kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D31761 llvm-svn: 301079
* [globalisel][tablegen] Fix PR32733 by checking which instruction operands ↵Daniel Sanders2017-04-222-2/+68
| | | | | | | | | | | | | belong to. canMutate() was returning true when the operands were all in the same order as the matched instruction. However, it wasn't checking the operands were actually on that instruction. This worked when we could only match a single instruction but the addition of nested instruction matching led to cases where the operands could be split across multiple instructions. canMutate() now returns false if operands belong to instructions other than the root of the match. llvm-svn: 301077
* [OpenMP] libomptarget: Set ref count for global objects to positive infinityGeorge Rokos2017-04-221-5/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D32326 llvm-svn: 301076
* [OpenMP] libomptarget: Remove obsolete negative device IDs -2/-3George Rokos2017-04-222-16/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D32325 llvm-svn: 301075
* [OpenMP] Run libomptarget regression tests using all available system threads.George Rokos2017-04-221-1/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D32327 llvm-svn: 301074
* Fix test to handle .rel and .rela sections (& to actually specify the target ↵David Blaikie2017-04-221-4/+4
| | | | | | architecture as X86) llvm-svn: 301073
OpenPOWER on IntegriCloud