summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [SCEV] Consider delinearization pattern with extension with identity factorTobias Grosser2016-10-172-1/+66
| | | | | | | | | | | | Summary: The delinearization algorithm did not consider terms which had an extension without a multiply factor, i.e. a identify factor. We lose cases where size is char type where there will no multiply factor. Reviewers: sanjoy, grosser Subscribers: mzolotukhin, Eugene.Zelenko, llvm-commits, mssimpso, sanjoy, grosser Differential Revision: https://reviews.llvm.org/D16492 llvm-svn: 284378
* [CodeGenPrepare] When moving a zext near to its associated load, do not ↵Andrea Di Biagio2016-10-172-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | retain the original debug location. CodeGenPrepare knows how to move a zext of a load into the same basic block where the load lives. The goal is to help ISel match a zero-extending load instead of two separated instructions. CGP attempts to move a zext computation even if it lives in a basic block that does not post-dominate the load's basic block. That means, the hoisted zext may be speculated. Preserving the zext location would hurt the debugging experience and the quality of sample pgo. With this patch, when moving a zext near to its associated load, CGP no longer propagates the zext's debug location. Instead, CGP conservatively reuses the same debug location for the load and the zext. An alternative approach would be to assign an artificial line-0 location to the zext. However we don't want to over-use the 'line-0' for this particular case because it would have a size cost in the line-table section for no additional benefit. Differential Revision: https://reviews.llvm.org/D25611 llvm-svn: 284377
* Recommit r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is."George Rimar2016-10-175-1/+8
| | | | | | | | | | | | | | | | | | | | | With fix: hex edited the precompiled inputs from another testcases to pass new checks. Original commit message: [Object/ELF] - Check that e_shnum is null when e_shoff is. Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) : e_shnum This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero. Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540 That was the reason of crash in lld on incorrect input file. Binary reduced using afl-min. Differential revision: https://reviews.llvm.org/D25090 llvm-svn: 284374
* Revert r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is."George Rimar2016-10-173-8/+1
| | | | | | | It broke build bot: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/908/steps/test-stage1-compiler/logs/stdio llvm-svn: 284373
* [Object/ELF] - Check that e_shnum is null when e_shoff is.George Rimar2016-10-173-1/+8
| | | | | | | | | | | | | | | Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) : e_shnum This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero. Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540 That was the reason of crash in lld on incorrect input file. Binary reduced using afl-min. Differential revision: https://reviews.llvm.org/D25090 llvm-svn: 284371
* [Object/ELF] - Do not crash on invalid section index.George Rimar2016-10-173-4/+6
| | | | | | | | | | | | | | | | If object has wrong (large) string table index and also incorrect large value for amount of sections in total, then section index passes the check: if (Index >= getNumSections()) return object_error::invalid_section_index; But result pointer then is far after end of file data, what result in a crash. Differential revision: https://reviews.llvm.org/D25081 llvm-svn: 284369
* Support: Drop LLVM_ATTRIBUTE_UNUSED_RESULTJustin Bogner2016-10-172-9/+4
| | | | | | | | Uses of this have all been updated to use LLVM_NODISCARD, which matches the C++17 [[nodiscard]] semantics rather than those of GCC's __attribute__((warn_unused_result)). llvm-svn: 284367
* [X86] Fix shuffle decoding assertions to print the right number of required ↵Craig Topper2016-10-171-8/+8
| | | | | | operands. Update the checks themselves to be >= to the same number instead of > one less than the required number. llvm-svn: 284365
* ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for StringRefJustin Bogner2016-10-171-21/+5
| | | | | | | | Instead of annotating (most of) the StringRef API, we can just annotate the type directly. This is less code and it will warn in more cases. llvm-svn: 284364
* [AVX-512] Add shuffle combining support for vpermi2var shuffles derived from ↵Craig Topper2016-10-172-32/+14
| | | | | | existing support for vpermt2var. llvm-svn: 284357
* [AVX-512] Add vpermi2var test cases to shuffle combining test case. ↵Craig Topper2016-10-171-0/+112
| | | | | | Combining will be added in a future commit. llvm-svn: 284356
* [AVX-512] Add support for turning a 256-bit load that goes to both halfs of ↵Craig Topper2016-10-164-73/+99
| | | | | | | | an insert_subvector into a subvector broadcast. Differential Revision: https://reviews.llvm.org/D25650 llvm-svn: 284353
* unittests: Explicitly ignore some return values in crash testsJustin Bogner2016-10-161-16/+18
| | | | | | | | Ideally these would actually check that the results are reasonable, but given that we're looping over so many different kinds of path that isn't really practical. llvm-svn: 284350
* Support: Return void from Scanner::scan_ns_uri_char, no one uses the resultJustin Bogner2016-10-161-7/+2
| | | | | | | Simplify this a little bit since the result is never used. It can be added back easily enough if that changes. llvm-svn: 284348
* MachineModuleInfo: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-161-2/+1
| | | | | | | Update a function annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284346
* SCEV: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-161-9/+9
| | | | | | | Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284345
* Support: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-161-23/+25
| | | | | | | Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284344
* ADT: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-168-11/+11
| | | | | | | Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284343
* ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for ArrayRefJustin Bogner2016-10-161-14/+2
| | | | | | | Instead of annotating (most of) the ArrayRef API, we can just annotate the type directly. This is less code and it will warn in more cases. llvm-svn: 284342
* PR30711: Fix incorrect profiling of 'long long' in FoldingSet, then use it toRichard Smith2016-10-162-4/+25
| | | | | | fix TBAA violation in profiling of pointers. llvm-svn: 284336
* [AVX-512] Fix the operand order for vpermi2var_qi intrinsics to match the ↵Craig Topper2016-10-163-12/+12
| | | | | | other vpermi2var intrinsics. llvm-svn: 284329
* [AVX-512] Correct execution domain for VPERMT2PS and VPERMI2PS.Craig Topper2016-10-168-94/+94
| | | | llvm-svn: 284328
* [AVX-512] Move (v4i64 (X86SubVBroadcast (v2i64))) alternate patterns under a ↵Craig Topper2016-10-161-9/+9
| | | | | | HasVLX predicate. Similar for floating point. llvm-svn: 284327
* [ArmFastISel] Kill dead code. NFCI.Davide Italiano2016-10-161-35/+0
| | | | llvm-svn: 284320
* [MachineMemOperand] Move synchronization scope and atomic orderings from ↵Konstantin Zhuravlyov2016-10-1512-142/+145
| | | | | | | | SDNode to MachineMemOperand, and remove redundant getAtomic* member functions from SelectionDAG. Differential Revision: https://reviews.llvm.org/D24577 llvm-svn: 284312
* [GVN/PRE] Hoist global values outside of loops.Davide Italiano2016-10-153-36/+115
| | | | | | | | | | | In theory this could be generalized to move anything where we prove the operands are available, but that would require rewriting PRE. As NewGVN will hopefully come soon, and we're trying to rewrite PRE in terms of NewGVN+MemorySSA, it's probably not worth spending too much time on it. Fix provided by Daniel Berlin! llvm-svn: 284311
* [X86][SSE] Added some basic examples of knownbits failing for vector typesSimon Pilgrim2016-10-151-0/+119
| | | | | | computeKnownBits only returns the common bits of each vector element instead of only the elements that are actually used llvm-svn: 284308
* Test commit. (NFC)Li Huang2016-10-151-1/+1
| | | | llvm-svn: 284307
* [X86] Regenerate known bits testSimon Pilgrim2016-10-151-4/+18
| | | | llvm-svn: 284306
* [AVX-512] Add shuffle comments for vbroadcast instructions.Craig Topper2016-10-156-92/+141
| | | | llvm-svn: 284305
* [AVX-512] Rename VPBROADCASTI32X2 and VPBROADCASTF32X2 instruction classes ↵Craig Topper2016-10-151-4/+4
| | | | | | to match the mnemonic which does not include a 'P'. llvm-svn: 284304
* [SimplifyCFG] Use the error checking provided by getPrevNode.Benjamin Kramer2016-10-151-7/+11
| | | | | | | | | BasicBlock::size is O(insts), making this loop O(blocks*insts), which can be really slow on generated code. getPrevNode already checks if we're at the beginning of the block and returns nullptr if so, just use that instead. No functionality change intended. llvm-svn: 284303
* [libFuzzer] swap bytes in integers when handling CMP tracesKostya Serebryany2016-10-155-15/+49
| | | | llvm-svn: 284301
* [libFuzzer] better algorithm for -minimize_crashKostya Serebryany2016-10-153-5/+25
| | | | llvm-svn: 284299
* AMDGPU/SI: Handle s_getreg hazard in GCNHazardRecognizerTom Stellard2016-10-153-5/+111
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D25526 llvm-svn: 284298
* ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for APIntJustin Bogner2016-10-152-54/+42
| | | | | | | Instead of annotating (most of) the APInt API, we can just annotate the type directly. This is less code and it will warn in more cases. llvm-svn: 284297
* [NFC] Loop Versioning for LICM code clean upEvgeny Astigeevich2016-10-141-31/+42
| | | | | | | | | | | | - Removed unused class members. - Made class internal data private. - Made class scoped data function scoped where it's possible. - Replace naked new/delete with unique_ptr. - Made resources guaranteed to be freed. Differential Revision: https://reviews.llvm.org/D25464 llvm-svn: 284290
* GlobalISel: rename legalizer components to match others.Tim Northover2016-10-1445-265/+259
| | | | | | | | | | The previous names were both misleading (the MachineLegalizer actually contained the info tables) and inconsistent with the selector & translator (in having a "Machine") prefix. This should make everything sensible again. The only functional change is the name of a couple of command-line options. llvm-svn: 284287
* Support: Add LLVM_NODISCARD with C++17's [[nodiscard]] semanticsJustin Bogner2016-10-141-0/+14
| | | | | | | | | | | | This is essentially a more powerful version of our current LLVM_ATTRIBUTE_UNUSED_RESULT, in that it can also be applied to types and generate warnings whenever an object of that type is returned by value and the value is discarded. I'll replace uses of LLVM_ATTRIBUTE_UNUSED_RESULT and remove that macro in follow up commits. llvm-svn: 284286
* hardware_physical_concurrency() should return 1 when LLVM is built with ↵Mehdi Amini2016-10-142-0/+4
| | | | | | LLVM_ENABLE_THREADS=OFF llvm-svn: 284283
* PowerPC: specify full triple to avoid different Darwin asm syntax.Tim Northover2016-10-141-1/+1
| | | | llvm-svn: 284281
* [ARM] add tests for PR30660Sanjay Patel2016-10-141-0/+26
| | | | llvm-svn: 284280
* [PowerPC] add tests for PR30661Sanjay Patel2016-10-141-0/+26
| | | | llvm-svn: 284279
* [PPC] Shorter sequence to load 64bit constant with same hi/lo wordsGuozhi Wei2016-10-142-2/+34
| | | | | | | | | | | | This is a patch to implement pr30640. When a 64bit constant has the same hi/lo words, we can use rldimi to copy the low word into high word of the same register. This optimization caused failure of test case bperm.ll because of not optimal heuristic in function SelectAndParts64. It chooses AND or ROTATE to extract bit groups from a register, and OR them together. This optimization lowers the cost of loading 64bit constant mask used in AND method, and causes different code sequence. But actually ROTATE method is better in this test case. The reason is in ROTATE method the final OR operation can be avoided since rldimi can insert the rotated bits into target register directly. So this patch also enhances SelectAndParts64 to prefer ROTATE method when the two methods have same cost and there are multiple bit groups need to be ORed together. Differential Revision: https://reviews.llvm.org/D25521 llvm-svn: 284276
* [libFuzzer] remove subdir fuzzer-test-suite as it is now superseded with ↵Kostya Serebryany2016-10-1419-410/+0
| | | | | | https://github.com/google/fuzzer-test-suite llvm-svn: 284275
* [libFuzzer] add -trace_cmp=1 (guiding mutations based on the observed CMP ↵Kostya Serebryany2016-10-1412-12/+157
| | | | | | instructions). This is a reincarnation of the previously deleted -use_traces, but using a different approach for collecting traces. Still a toy, but at least it scales well. Also fix -merge in trace-pc-guard mode llvm-svn: 284273
* vim: add `norecurse` attributeSaleem Abdulrasool2016-10-141-0/+1
| | | | | | Add missing attribute to the keyword set. llvm-svn: 284270
* vim: add `comdat` keywordSaleem Abdulrasool2016-10-141-0/+1
| | | | | | The attribute may be applied to a function. Highlight it as a keyword. llvm-svn: 284269
* [DAG] avoid creating illegal node when transforming negated shifted sign bitSanjay Patel2016-10-141-2/+3
| | | | | | | | Eli noted this potential bug in the post-commit thread for: https://reviews.llvm.org/rL284239 ...but I'm not sure how to trigger it, so there's no test case yet. llvm-svn: 284268
* AMDGPU/SI: Use new SimplifyDemandedBits helper for multi-use operationsTom Stellard2016-10-144-21/+75
| | | | | | | | | | | | | Summary: We are using this helper for our 24-bit arithmetic combines, so we are now able to eliminate multi-use operations that mask the high-bits of 24-bit inputs (e.g. and x, 0xffffff) Reviewers: arsenm, nhaehnle Subscribers: tony-tye, arsenm, kzhuravl, wdng, nhaehnle, llvm-commits, yaxunl Differential Revision: https://reviews.llvm.org/D24672 llvm-svn: 284267
OpenPOWER on IntegriCloud