summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* Another additional error check for invalid Mach-O files for theKevin Enderby2016-10-279-0/+24
| | | | | | | | | | | | | | | | | | | | | | obsolete load commands. Again the philosophy of the error checking in libObject for Mach-O files, the idea behind the checking is that we never will return a Mach-O file out of libObject that contains unknown things the library code can’t operate on. So known obsolete load commands will cause a hard error. Also to make things clear I have added comments to the values and structures in Support/Mach-O.h and Support/MachO.def as to what is obsolete. As noted in a TODO in the code, there may need to be a non-default mode to allow some unknown values for well structured Mach-O files with things like unknown load load commands. So things like using an old lldb on a newer Mach-O file could still provide some limited functionality. llvm-svn: 285342
* [InstCombine] add vector tests for foldSPFofSPF to show missing foldsSanjay Patel2016-10-271-0/+33
| | | | llvm-svn: 285340
* AMDGPU/SI: Handle s_setreg hazard in GCNHazardRecognizerTom Stellard2016-10-271-49/+93
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D25528 llvm-svn: 285338
* [InstCombine] auto-generate checks for min/max testsSanjay Patel2016-10-271-28/+40
| | | | llvm-svn: 285336
* [PPC] Adding the removed testcase againEhsan Amiri2016-10-271-0/+71
| | | | | | | | | | | | | | This testcase was originally part of r284995, but I put it in a wrong directory. So I removed it. Before adding it back I did some small enhancements. Also I changed the assertions a little bit, to take into account the impact of some changes performed since code review is done. This is similar to changes done for another testcase in the original commit. See: https://reviews.llvm.org/D23614#577749 Basically for instead of vxor we now generate xxlxor in some cases, which is better. llvm-svn: 285333
* [X86][AVX512] Fix MUL v8i64 costs on non-AVX512DQ targetsSimon Pilgrim2016-10-271-2/+2
| | | | llvm-svn: 285329
* [InstCombine] handle simple vector integer constants in IsFreeToInvertSanjay Patel2016-10-271-8/+24
| | | | llvm-svn: 285318
* ARM: ensure that the Windows DBZ check is in rangeSaleem Abdulrasool2016-10-273-36/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows ARM target expects the compiler to emit a division-by-zero check. The check would use the form of: cmp r?, #0 cbz .Ltrap b .Lbody .Lbody: ... .Ltrap: udf #249 @ __brkdiv0 This works great most of the time. However, if the body of the function is greater than 127 bytes, the branch target limitation of cbz becomes an issue. This occurs in the unoptimized code generation cases sometimes (like in compiler-rt). Since this is a matter of correctness, possibly pay a small penalty instead. We now form this slightly differently: cbnz .Lbody udf #249 @ __brkdiv0 .Lbody: ... The positive case is through the branch instead of being the next instruction. However, because of the basic block layout, the negated branch is going to be a short distance always (2 bytes away, after the inserted __brkdiv0). The new t__brkdiv0 instruction is required to explicitly mark the instruction as a terminator as the generic UDF instruction is not a terminator. Addresses PR30532! llvm-svn: 285312
* Add Loop Sink pass to reverse the LICM based of basic block frequency.Dehao Chen2016-10-272-0/+346
| | | | | | | | | | | | Summary: LICM may hoist instructions to preheader speculatively. Before code generation, we need to sink down the hoisted instructions inside to loop if it's beneficial. This pass is a reverse of LICM: looking at instructions in preheader and sinks the instruction to basic blocks inside the loop body if basic block frequency is smaller than the preheader frequency. Reviewers: hfinkel, davidxl, chandlerc Subscribers: anna, modocache, mgorny, beanz, reames, dberlin, chandlerc, mcrosier, junbuml, sanjoy, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D22778 llvm-svn: 285308
* [mips] Do not allow -opt-bisect-limit to skip the PIC call optimization pass.Vasileios Kalintiris2016-10-271-0/+14
| | | | | | | | | | | | | | r282428 added the MipsOptimizePICCall as an opt-in pass that can be skipped when using the -opt-bisect-limit option. However, this pass is needed because it generates code that conforms to the o32 ABI specification by using the $t9 register for PIC calls with JALR instructions. This bug was exposed by the fact that skipFunction() also checks for the "optnone" attribute. This caused functions with that attribute to break the requirements of the o32 ABI. llvm-svn: 285305
* [X86][AVX512DQ] Improve lowering of MUL v2i64 and v4i64Simon Pilgrim2016-10-272-22/+21
| | | | | | | | | | With DQI but without VLX, lower v2i64 and v4i64 MUL operations with v8i64 MUL (vpmullq). Updated cost table accordingly. Differential Revision: https://reviews.llvm.org/D26011 llvm-svn: 285304
* [ValueTracking] fix matchSelectPattern to allow vector splat folds of ↵Sanjay Patel2016-10-273-26/+5
| | | | | | min/max/abs/nabs llvm-svn: 285303
* [InstCombine] add tests for missing folds of vector abs/nabs/min/maxSanjay Patel2016-10-274-4/+102
| | | | llvm-svn: 285299
* [Hexagon] Do not expand ISD::SELECT for HVX vectorsKrzysztof Parzyszek2016-10-271-0/+69
| | | | llvm-svn: 285297
* [DAGCombiner] Add vector demanded elements support to computeKnownBitsSimon Pilgrim2016-10-272-43/+13
| | | | | | | | | | | | | | | | Currently computeKnownBits returns the common known zero/one bits for all elements of vector data, when we may only be interested in one/some of the elements. This patch adds a DemandedElts argument that allows us to specify the elements we actually care about. The original computeKnownBits implementation calls with a DemandedElts demanding all elements to match current behaviour. Scalar types set this to 1. The approach was found to be easier than trying to add a per-element known bits solution, for a similar usefulness given the combines where computeKnownBits is typically used. I've only added support for a few opcodes so far (the ones that have proven straightforward to test), all others will default to demanding all elements but can be updated in due course. DemandedElts support could similarly be added to computeKnownBitsForTargetNode in a future commit. Differential Revision: https://reviews.llvm.org/D25691 llvm-svn: 285296
* [InstCombine] auto-generate better checks; NFCSanjay Patel2016-10-271-32/+37
| | | | llvm-svn: 285293
* Revert r285285 "[Object/ELF] - Fixed behavior when ↵George Rimar2016-10-272-3/+0
| | | | | | | | SectionHeaderTable->sh_size is too large." It broke BB. llvm-svn: 285288
* [SLP] Fix for PR30626: Compiler crash inside SLP Vectorizer.Alexey Bataev2016-10-271-58/+153
| | | | | | | | | | | | | | | | After successfull horizontal reduction vectorization attempt for PHI node vectorizer tries to update root binary op by combining vectorized tree and the ReductionPHI node. But during vectorization this ReductionPHI can be vectorized itself and replaced by the `undef` value, while the instruction itself is marked for deletion. This 'marked for deletion' PHI node then can be used in new binary operation, causing "Use still stuck around after Def is destroyed" crash upon PHI node deletion. Also the test is fixed to make it perform actual testing. Differential Revision: https://reviews.llvm.org/D25671 llvm-svn: 285286
* [Object/ELF] - Fixed behavior when SectionHeaderTable->sh_size is too large.George Rimar2016-10-272-0/+3
| | | | | | | | | | | | Elf.h already has code checking that section table does not go past end of file. Problem is that this check may not work on values greater than UINT64_MAX / Header->e_shentsize because of calculation overflow. Parch fixes the issue. Differential revision: https://reviews.llvm.org/D25432 llvm-svn: 285285
* [Object/ELF] - Do not allow overflow when checking section size/offset.George Rimar2016-10-272-0/+4
| | | | | | | | | Overflow was the reason of incorrect passing the check, patch fixes the case. Differentail revision: https://reviews.llvm.org/D25514 llvm-svn: 285284
* [Object/ELF] - Do not crash if string table sh_size is equal to zero.George Rimar2016-10-272-0/+1
| | | | | | | | | Revealed using "id_000038,sig_11,src_000015,op_havoc,rep_16" from PR30540, when sh_size was 0, crash happened. Differential revision: https://reviews.llvm.org/D25091 llvm-svn: 285282
* [ARM] Add newline char to test.Sam Parker2016-10-271-1/+2
| | | | | | | | Missed a newline in the previous commit. Differential Revision: https://reviews.llvm.org/D26027 llvm-svn: 285280
* [ARM] Predicate UMAAL selection on hasDSP.Sam Parker2016-10-271-14/+26
| | | | | | | | | | | | UMAAL is a DSP instruction and it is not available on thumbv7m (Cortex-M3) and thumbv6m (Cortex-M0+1) targets. Also fix wrong CHECK prefix in longMAC.ll test. Patch by Vadzim Dambrouski. Differential Revision: https://reviews.llvm.org/D25890 llvm-svn: 285278
* AMDGPU: Fix SILoadStoreOptimizer when writes cannot be merged due register ↵Nicolai Haehnle2016-10-271-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | dependencies Summary: When finding a match for a merge and collecting the instructions that must be moved, keep in mind that the instruction we merge might actually use one of the defs that are being moved. Fixes piglit spec/arb_enhanced_layouts/execution/component-layout/vs-tcs-load-output[-indirect]. The fact that the ds_read in the test case is not eliminated suggests that there might be another problem related to alias analysis, but that's a separate problem: this pass should still work correctly even when earlier optimization passes missed something or were disabled. Reviewers: tstellarAMD, arsenm Subscribers: kzhuravl, wdng, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D25829 llvm-svn: 285273
* [PowerPC] - No SExt/ZExt needed for count trailing zerosNemanja Ivanovic2016-10-271-0/+54
| | | | | | | | | This patch corresponds to review: https://reviews.llvm.org/D25896 It just eliminates the redundant ZExt after a count trailing zeros instruction. llvm-svn: 285267
* llvm-objdump: Make some error messages more consistentJustin Bogner2016-10-262-13/+13
| | | | | | | | | Most of the version of report_error were quoting the filename and printing a colon between the file name and the error message, but this one wasn't doing either of those. Fix the output to be more consistent. llvm-svn: 285252
* [lit] Work around Windows MSys command line tokenization bugReid Kleckner2016-10-261-0/+2
| | | | | | | | | | | | | | Summary: This will allow us to revert LLD r284768, which added spaces to get MSys echo to print what we want. Reviewers: ruiu, inglorion, rafael Subscribers: modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D26009 llvm-svn: 285237
* ARM: don't rely on push/pop reglists being in order when folding SP adjust.Tim Northover2016-10-261-0/+14
| | | | | | | | | | | | | | | | | | It would be a very nice invariant to rely on, but unfortunately it doesn't necessarily hold (and the causes of mis-sorted reglists appear to be quite varied) so to be robust the frame lowering code can't assume that the first register in the list is also the first one that actually gets pushed. Should fix an issue where we were turning something like: push {r8, r4, r7, lr} sub sp, #24 into nonsense like: push {r2, r3, r4, r5, r6, r7, r8, r4, r7, lr} llvm-svn: 285232
* Do not assume that FP vector operands are never legalized by expandingNemanja Ivanovic2016-10-261-0/+74
| | | | | | | | | | | This patch ensures that if a floating point vector operand is legalized by expanding, it is legalized through the stack rather than by calling DAGTypeLegalizer::IntegerToVector which will cause a failure since the operand is a non-integer type. This fixes PR 30715. llvm-svn: 285231
* Simplify `x >=u x >> y` and `x >=u x udiv y`Sanjoy Das2016-10-261-0/+32
| | | | | | | | | | | | | | | | | | | Summary: Extends InstSimplify to handle both `x >=u x >> y` and `x >=u x udiv y`. This is a folloup of rL258422 and https://github.com/rust-lang/rust/pull/30917 where llvm failed to optimize away the bounds checking in a binary search. Patch by Arthur Silva! Reviewers: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25941 llvm-svn: 285228
* Revert "[AliasSetTracker] Make AST smarter about intrinsics that don't ↵Chad Rosier2016-10-261-54/+0
| | | | | | | | | | | actually affect memory." This reverts commit r285191. LICM appears to rely on the Alias Set Tracker hitting lifetime markers to prevent code from being moved outside of the original scope. llvm-svn: 285227
* [PowerPC] Implement vec_insert_exp builtins - llvm portionNemanja Ivanovic2016-10-261-0/+24
| | | | | | | This revision corresponds to review: https://reviews.llvm.org/D25957. Committing on behalf of Zaara Syeda. llvm-svn: 285225
* Fix test from r285217.Chad Rosier2016-10-261-1/+1
| | | | llvm-svn: 285222
* [AArch64] Avoid materializing constant 1 when generating cneg instructions.Chad Rosier2016-10-261-0/+11
| | | | | | | | | | | | | | | | | Instead of cmp w0, #1 orr w8, wzr, #0x1 cneg w0, w8, ne we now generate cmp w0, #1 csinv w0, w0, wzr, eq PR28965 llvm-svn: 285217
* Reapply: "Remove debug location from common tail when tail-merging"Robert Lougher2016-10-262-6/+80
| | | | | | | | | | | | | | | | This reapplies revision 285093. Original commit message: The branch folding pass tail merges blocks into a common-tail. However, the tail retains the debug information from one of the original inputs to the merge (chosen randomly). This is a problem for sampled-based PGO, as hits on the common-tail will be attributed to whichever block was chosen, irrespective of which path was actually taken to the common-tail. This patch fixes the issue by nulling the debug location for the common-tail. Differential Revision: https://reviews.llvm.org/D25742 llvm-svn: 285212
* AMDGPU: Refactor processor definition to use ISA version featuresYaxun Liu2016-10-261-2/+16
| | | | | | | | | | | | | | Add missing ISA versions 7.0.2/8.0.4/8.1.0. to backend. Refactor processor definition to use ISA version features. Fixed ISA version for stoney. Based on Laurent Morichetti's patch. Differential Revision: https://reviews.llvm.org/D25919 llvm-svn: 285210
* Introduce updateDiscriminator interface to DILocation to make it cleaner ↵Dehao Chen2016-10-261-3/+1
| | | | | | | | | | | | | | assigning discriminators. Summary: This patch introduces updateDiscriminator to DILocation so that it can be directly called by AddDiscriminator. It also makes it easier to update the discriminator later. Reviewers: dnovillo, dblaikie, aprantl, echristo Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D25959 llvm-svn: 285207
* Reapply "AMDGPU: Don't use offen if it is 0"Matt Arsenault2016-10-2610-74/+91
| | | | | | This reverts r283003 llvm-svn: 285203
* AMDGPU/SI: Don't emit multi-dword flat memory ops when they might access scratchTom Stellard2016-10-261-2/+25
| | | | | | | | | | | | | | Summary: A single flat memory operations that might access the scratch buffer can only access MaxPrivateElementSize bytes. Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D25788 llvm-svn: 285198
* AMDGPU/SI: Remove unnecessary run lines from testTom Stellard2016-10-261-4/+2
| | | | | | | | | | | | | | Summary: This test had run lines disabling/enabling the promote alloca pass, but enabling/disabling promote alloca had no impact on the output. Reviewers: arsenm Subscribers: mgrang, kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D25787 llvm-svn: 285197
* [X86] AVX512 fallback for floating-point scalar selectsZvi Rackover2016-10-261-12/+8
| | | | | | | | | | | | | Summary: In the case where of 'select i1 , f32, f32' or select i1, f64, f64 prefer lowering to masked-moves over branches. Fixes pr30561 Reviewers: igorb, aymanmus, delena Differential Revision: https://reviews.llvm.org/D25310 llvm-svn: 285196
* [InstCombine] consolidate zext tests and auto-generate checks; NFCSanjay Patel2016-10-263-48/+59
| | | | llvm-svn: 285195
* [InstCombine] auto-generate better checks; NFCSanjay Patel2016-10-261-90/+125
| | | | llvm-svn: 285194
* [AliasSetTracker] Make AST smarter about intrinsics that don't actually ↵Chad Rosier2016-10-261-0/+54
| | | | | | | | affect memory. Differential Revision: https://reviews.llvm.org/D25969 llvm-svn: 285191
* DebugInfo: support for DWARFv5 DW_AT_alignment attributeVictor Leschuk2016-10-264-4/+357
| | | | | | | | | | | | * Assume that clang passes non-zero alignment value to DIBuilder only in case when it was forced by C++11 'alignas', C11 '_Alignas' or compiler attribute '__attribute__((aligned (N)))'. * Emit DW_AT_alignment if alignment is specified for type/object. Differential Revision: https://reviews.llvm.org/D24425 llvm-svn: 285189
* [IndVarSimplify][DebugLoc] When widening the exit loop condition, correctly ↵Andrea Di Biagio2016-10-261-0/+8
| | | | | | | | | | | | | | | reuse the debug location of the original comparison. When the loop exit condition is canonicalized as a != compaison, reuse the debug location of the original (non canonical) comparison. Before this patch, the debug location of the new icmp was obtained from the loop latch terminator. This patch fixes the issue by correctly setting the IRBuilder's "current debug location" to the location of the original compare. Differential Revision: https://reviews.llvm.org/D25953 llvm-svn: 285185
* Revert r285181 "DebugInfo: support for DWARFv5 DW_AT_alignment attribute".Vassil Vassilev2016-10-264-357/+4
| | | | | | The commit broke the builds. llvm-svn: 285183
* DebugInfo: support for DWARFv5 DW_AT_alignment attributeVictor Leschuk2016-10-264-4/+357
| | | | | | | | | | | | * Assume that clang passes non-zero alignment value to DIBuilder only in case when it was forced by C++11 'alignas', C11 '_Alignas' or compiler attribute '__attribute__((aligned (N)))'. * Emit DW_AT_alignment if alignment is specified for type/object. Differential Revision: https://reviews.llvm.org/D24425 llvm-svn: 285181
* DebugInfo: add bitcode upgrade test for alignment Victor Leschuk2016-10-262-0/+23
| | | | | | Bitcode format was changed in D25073, this adds bitcode upgrade test. llvm-svn: 285179
* [XRay] Be case-insensitive for error stringsDean Michael Berris2016-10-261-1/+1
| | | | | | | On Windows, "no such file or directory" is the default error translation as opposed to the capitalized form on Linux. llvm-svn: 285174
OpenPOWER on IntegriCloud