summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* [DebugInfo] Support DWARF v5 source code embedding extensionScott Linder2018-02-2323-92/+187
| | | | | | | | | | | | | | | | | | | In DWARF v5 the Line Number Program Header is extensible, allowing values with new content types. In this extension a content type is added, DW_LNCT_LLVM_source, which contains the embedded source code of the file. Add new optional attribute for !DIFile IR metadata called source which contains source text. Use this to output the source to the DWARF line table of code objects. Analogously extend METADATA_FILE in Bitcode and .file directive in ASM to support optional source. Teach llvm-dwarfdump and llvm-objdump about the new values. Update the output format of llvm-dwarfdump to make room for the new attribute on file_names entries, and support embedded sources for the -source option in llvm-objdump. Differential Revision: https://reviews.llvm.org/D42765 llvm-svn: 325970
* [InstSimplify] sqrt(X) * sqrt(X) --> XSanjay Patel2018-02-232-11/+15
| | | | | | This was misplaced in InstCombine. We can loosen the FMF as a follow-up step. llvm-svn: 325965
* Intrinsics calls should avoid the PLT when "RtLibUseGOT" metadata is present.Sriraman Tallam2018-02-231-0/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D42216 llvm-svn: 325962
* [InstCombine] allow fmul-sqrt folds with less than full -ffast-mathSanjay Patel2018-02-231-21/+27
| | | | | | Also, add a Builder method for intrinsics to reduce code duplication for clients. llvm-svn: 325960
* [X86] Add assembler/disassembler support for blendm with zero masking and ↵Craig Topper2018-02-232-0/+184
| | | | | | | | broacast. Fixes PR31617 llvm-svn: 325957
* [Hexagon] Recognize non-immediate constants in HexagonConstPropagationKrzysztof Parzyszek2018-02-231-0/+25
| | | | llvm-svn: 325954
* [X86] Add DAG combine to remove (and X, 1) from in front of a v1i1 scalar to ↵Craig Topper2018-02-231-4/+2
| | | | | | | | | | | | vector. These can be created by type legalization promoting the inputs to select to match scalar boolean contents. We were trying to pattern match them away during isel, but its better to just remove them from the DAG. I've cleaned up some patterns to not check for this 'and' anymore. But I suspect this has also opened up opportunities for pattern removal. llvm-svn: 325949
* [X86][SSE] Generalize x > C-1 ? x+-C : 0 --> subus x, C combine for ↵Simon Pilgrim2018-02-231-93/+19
| | | | | | non-uniform constants llvm-svn: 325944
* [PATCH] [AArch64] Add new target feature to fuse conditional selectEvandro Menezes2018-02-231-0/+30
| | | | | | | | | This feature enables the fusion of the comparison and the conditional select instructions together. Differential revision: https://reviews.llvm.org/D42392 llvm-svn: 325939
* [Test] Fix the test to output to /dev/null instead of redirecting.Matt Davis2018-02-231-1/+1
| | | | | | The redirection was confusing the windows build machine. llvm-svn: 325937
* [X86][SSE] Add x > C-1 ? x+-C : 0 --> subus x, C test caaes for non-uniform ↵Simon Pilgrim2018-02-231-0/+136
| | | | | | constants llvm-svn: 325936
* [X86] Custom split v32i16/v64i8 bitcasts when AVX512F is available, but BWI ↵Craig Topper2018-02-231-2122/+106
| | | | | | | | | | is not. The test changes you can see are related to the changes in ReplaceNodeResults. Though shuffle-vs-trunc-512.ll does have a test that exercises the code in LowerBITCAST. Looks like the test output didn't change because DAG combining is able to clean up the resulting type legalization. Adding the custom hook just makes type legalization work less hard. Differential Revision: https://reviews.llvm.org/D43447 llvm-svn: 325933
* [MachineOperand][Target] MachineOperand::isRenamable semantics changesGeoff Berry2018-02-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add a target option AllowRegisterRenaming that is used to opt in to post-register-allocation renaming of registers. This is set to 0 by default, which causes the hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq fields of all opcodes to be set to 1, causing MachineOperand::isRenamable to always return false. Set the AllowRegisterRenaming flag to 1 for all in-tree targets that have lit tests that were effected by enabling COPY forwarding in MachineCopyPropagation (AArch64, AMDGPU, ARM, Hexagon, Mips, PowerPC, RISCV, Sparc, SystemZ and X86). Add some more comments describing the semantics of the MachineOperand::isRenamable function and how it is set and maintained. Change isRenamable to check the operand's opcode hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq bit directly instead of relying on it being consistently reflected in the IsRenamable bit setting. Clear the IsRenamable bit when changing an operand's register value. Remove target code that was clearing the IsRenamable bit when changing registers/opcodes now that this is done conservatively by default. Change setting of hasExtraSrcRegAllocReq in AMDGPU target to be done in one place covering all opcodes that have constant pipe read limit restrictions. Reviewers: qcolombet, MatzeB Subscribers: aemerson, arsenm, jyknight, mcrosier, sdardis, nhaehnle, javed.absar, tpr, arichardson, kristof.beyls, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, jordy.potman.lists, apazos, sabuasal, niosHD, escha, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D43042 llvm-svn: 325931
* [Debug] Add dbg.value intrinsics for PHIs created during LCSSA.Matt Davis2018-02-232-4/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is an enhancement to propagate dbg.value information when Phis are created on behalf of LCSSA. I noticed a case where a value carried across a loop was reported as <optimized out>. Specifically this case: ``` int bar(int x, int y) { return x + y; } int foo(int size) { int val = 0; for (int i = 0; i < size; ++i) { val = bar(val, i); // Both val and i are correct } return val; // <optimized out> } ``` In the above case, after all of the interesting computation completes our value is reported as "optimized out." This change will add a dbg.value to correct this. This patch also moves the dbg.value insertion routine from LoopRotation.cpp into Local.cpp, so that we can share it in both places (LoopRotation and LCSSA). Reviewers: mzolotukhin, aprantl, vsk, davide Reviewed By: aprantl, vsk Subscribers: dberlin, llvm-commits Differential Revision: https://reviews.llvm.org/D42551 llvm-svn: 325926
* [BPI] Detect branches in loops that make themselves not takenJohn Brawn2018-02-231-0/+88
| | | | | | | | | | | | | | | | | | | | | | If we have a loop like this: int n = 0; while (...) { if (++n >= MAX) { n = 0; } } then the body of the 'if' statement will only be executed once every MAX iterations. Detect this by looking for branches in loops where taking the branch makes the branch condition evaluate to 'not taken' in the next iteration of the loop, and reduce the probability of such branches. This slightly improves EEMBC benchmarks on cortex-m4/cortex-m33 due to making better choices in if-conversion, but has no effect on any other cpu/benchmark that I could detect. Differential Revision: https://reviews.llvm.org/D35804 llvm-svn: 325925
* [X86] Regenerate i128 multiply testsSimon Pilgrim2018-02-231-14/+348
| | | | llvm-svn: 325919
* [PowerPC] Code cleanup. Remove instructions that were withdrawn from Power 9.Stefan Pintilie2018-02-232-33/+1
| | | | | | | | | | | | | | The following set of instructions was originally planned to be added for Power 9 and so code was added to support them. However, a decision was made later on to withdraw support for these instructions in the hardware. xscmpnedp xvcmpnesp xvcmpnedp This patch removes support for the instructions that were not added. Differential Revision: https://reviews.llvm.org/D43641 llvm-svn: 325918
* Support for the mno-stack-arg-probe flagHans Wennborg2018-02-231-0/+38
| | | | | | | | | | | | Adds support for this flag. There is also another piece for clang (separate review). More info: https://bugs.llvm.org/show_bug.cgi?id=36221 By Ruslan Nikolaev! Differential Revision: https://reviews.llvm.org/D43107 llvm-svn: 325900
* [SystemZ] Also update the CHECK line for VPDIJonas Paulsson2018-02-231-1/+1
| | | | llvm-svn: 325898
* [SystemZ] Fix VPDI argument in test.Jonas Paulsson2018-02-231-1/+1
| | | | | | To select element 1 from each half with VPDI, a constant of 5 should be used. llvm-svn: 325897
* [X86][F16C] Regenerate half conversion testsSimon Pilgrim2018-02-231-133/+133
| | | | llvm-svn: 325896
* llvm-config: Add advapi32 to --system-libs on Windows (PR36372)Hans Wennborg2018-02-231-1/+1
| | | | llvm-svn: 325894
* [DAGCOmbine] Ensure that (brcond (setcc ...)) is handled in a canonical manner.Amaury Sechet2018-02-235-33/+21
| | | | | | | | | | | | | | | Summary: There are transformation that change setcc into other constructs, and transform that try to reconstruct a setcc from the brcond condition. Depending on what order these transform are done, the end result differs. Most of the time, it is preferable to get a setcc as a brcond argument (and this is why brcond try to recreate the setcc in the first place) so we ensure this is done every time by also doing it at the setcc level when the only user is a brcond. Reviewers: spatel, hfinkel, niravd, craig.topper Subscribers: nhaehnle, llvm-commits Differential Revision: https://reviews.llvm.org/D41235 llvm-svn: 325892
* Revert "TableGen: Fix typeIsConvertibleTo for record types"Nicolai Haehnle2018-02-232-36/+1
| | | | | | | | | | This reverts r325884. Clang's TableGen has dependencies on the exact ordering of superclasses. Revert this change fully for now to fix the build. Change-Id: Ib297f5571cc7809f00838702ad7ab53d47335b26 llvm-svn: 325891
* [MIPS GlobalISel] Adding GlobalISelPetar Jovanovic2018-02-232-0/+23
| | | | | | | | | | | Add GlobalISel infrastructure up to the point where we can select a ret void. Patch by Petar Avramovic. Differential Revision: https://reviews.llvm.org/D43583 llvm-svn: 325888
* TableGen: Fix typeIsConvertibleTo for record typesNicolai Haehnle2018-02-232-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Only check whether the left-hand side type is a subclass (or equal to) the right-hand side type. This requires a further fix in handling !if expressions and in type resolution. Furthermore, reverse the order of superclasses so that resolveTypes will find a least common ancestor at least in simple cases. Add a test that used to be accepted without flagging the obvious type error. Change-Id: Ib366db1a4e6a079f1a0851e469b402cddae76714 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43559 llvm-svn: 325884
* TableGen: Add !size operationNicolai Haehnle2018-02-231-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Returns the size of a list. I have found this to be rather useful in some development for the AMDGPU backend where we could simplify our .td files by concatenating list<LLVMType> for complex intrinsics. Doing so requires us to compute the position argument for LLVMMatchType. Basically, the usage is in a pattern that looks somewhat like this: list<LLVMType> argtypes = !listconcat(base, [llvm_any_ty, LLVMMatchType<!size(base)>]); Change-Id: I360a0b000fd488d18bea412228230fd93722bd2c Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits, tpr Differential Revision: https://reviews.llvm.org/D43553 llvm-svn: 325883
* AMDGPU: Track physreg uses in SILoadStoreOptimizerNicolai Haehnle2018-02-233-10/+158
| | | | | | | | | | | | | | | | Summary: This handles def-after-use of physregs, and allows us to merge loads and stores even across some physreg defs (typically M0 defs). Change-Id: I076484b2bda27c2cf46013c845a0380c5b89b67b Reviewers: arsenm, mareko, rampitec Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D42647 llvm-svn: 325882
* StructurizeCFG: Test for branch divergence correctlyNicolai Haehnle2018-02-232-2/+84
| | | | | | | | | | | | | | | | | | | | | | Summary: This fixes cases like the new test @nonuniform. In that test, %cc itself is a uniform value; however, when reading it after the end of the loop in basic block %if, its value is effectively non-uniform. This problem was encountered in https://bugs.freedesktop.org/show_bug.cgi?id=103743; however, this change in itself is not sufficient to fix that bug, as there is another issue in the AMDGPU backend. Change-Id: I32bbffece4a32f686fab54964dae1a5dd72949d4 Reviewers: arsenm, rampitec, jlebar Subscribers: wdng, tpr, llvm-commits Differential Revision: https://reviews.llvm.org/D40546 llvm-svn: 325881
* Mark MergedLoadStoreMotion as not preserving MemDep resultsBjorn Steinbrink2018-02-231-0/+22
| | | | | | | | | | | | | | | | | | Summary: MemDep caches results that signify that a dependence is non-local, and there is currently no way to invalidate such cache entries. Unfortunately, when MLSM sinks a store that can result in a non-local dependence becoming a local one, and then MemDep gives wrong answers. The easiest way out here is to just say that MLSM does indeed not preserve MemDep results. Reviewers: davide, Gerolf Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43177 llvm-svn: 325880
* [Mips] Return true in enableMultipleCopyHints().Jonas Paulsson2018-02-237-479/+491
| | | | | | | | | | Enable multiple COPY hints to eliminate more COPYs during register allocation. Note that this is something all targets should do, see https://reviews.llvm.org/D38128. Review: Simon Dardis llvm-svn: 325870
* [WebAssembly] Add first claass symbol table to wasm objectsSam Clegg2018-02-2329-524/+497
| | | | | | | | | | | | | | | | | | | | This is combination of two patches by Nicholas Wilson: 1. https://reviews.llvm.org/D41954 2. https://reviews.llvm.org/D42495 Along with a few local modifications: - One change I made was to add the UNDEFINED bit to the binary format to avoid the extra byte used when writing data symbols. Although this bit is redundant for other symbols types (i.e. undefined can be implied if a function or global is a wasm import) - I prefer to be explicit and consistent and not have derived flags. - Some field renaming. - Some reverting of unrelated minor changes. - No test output differences. Differential Revision: https://reviews.llvm.org/D43147 llvm-svn: 325860
* Remove file missed by r325852 due to merge conflict.Richard Smith2018-02-231-1378/+0
| | | | llvm-svn: 325853
* Revert r325128 ("[X86] Reduce Store Forward Block issues in HW").Richard Smith2018-02-231-1926/+0
| | | | | | This is causing miscompiles in some situations. See the llvm-commits thread for the commit for details. llvm-svn: 325852
* [X86] Turn setne X, signedmax into setgt signedmax, X in LowerVSETCC to ↵Craig Topper2018-02-231-0/+15
| | | | | | | | | | avoid an invert We won't be able to fold the constant pool load, but its still better than materialing ones and xoring for the invert if we used PCMPEQ. This will fix another regression from D42948. llvm-svn: 325845
* [X86] Turn setne X, signedmin into setgt X, signedmin in LowerVSETCC to ↵Craig Topper2018-02-221-0/+11
| | | | | | | | | | avoid an invert This will fix one of the regressions from D42948. Differential Revision: https://reviews.llvm.org/D43531 llvm-svn: 325840
* [AArch64] Improve macro fusion test caseEvandro Menezes2018-02-221-3/+5
| | | | | | | Improve a vector in the test case for the fusion of address generation and loads or stores. Otherwise, NFC. llvm-svn: 325839
* [DWARFv5] Turn an assert into a diagnostic. Hand-coded assembler filesPaul Robinson2018-02-221-0/+5
| | | | | | | | should not trigger assertions. Differential Revision: https://reviews.llvm.org/D43152 llvm-svn: 325831
* [ThinLTO/gold] Perform cache pruning when cache directory specifiedTeresa Johnson2018-02-221-2/+4
| | | | | | | | | | | | | | | Summary: As pointed out in the review for D37993, for consistency with other linkers, gold plugin should perform cache pruning whenever there is a cache directory specified, which will use the default cache policy. Reviewers: pcc Subscribers: llvm-commits, inglorion Differential Revision: https://reviews.llvm.org/D43389 llvm-svn: 325830
* Revert "[DebugInfo][FastISel] Fix dropping dbg.value()"Sander de Smalen2018-02-222-60/+7
| | | | | | | | | This patch reverts r325440 and r325438 because it triggers an assertion in SelectionDAGBuilder.cpp. Also having debug enabled may unintentionally affect code-gen. The patch is reverted until we find a better solution. llvm-svn: 325825
* [ThinLTO] Represent relative BF using a scaled representation .Easwaran Raman2018-02-221-1/+1
| | | | | | | | | | | | | | | Summary: The current integer representation of relative block frequency prevents representing relative block frequencies below 1. This change uses a 8 of the 29 bits to represent the decimal part by using a fixed scale of -8. Reviewers: tejohnson, davidxl Subscribers: mehdi_amini, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D43520 llvm-svn: 325823
* Fix DataFlowSanitizer instrumentation pass to take parameter position ↵Peter Collingbourne2018-02-222-0/+64
| | | | | | | | | | | | | | changes into account for custom functions. When DataFlowSanitizer transforms a call to a custom function, the new call has extra parameters. The attributes on parameters must be updated to take the new position of each parameter into account. Patch by Sam Kerner! Differential Revision: https://reviews.llvm.org/D43132 llvm-svn: 325820
* [ThinLTO] Always create linked objects file for --thinlto-index-only=Vitaly Buka2018-02-221-0/+18
| | | | | | | | | | | | | | | Summary: ThinLTO indexing may decide to skip all objects. If we don't write something to the list build system may consider this as failure or linker can reuse a file from the previews build. Reviewers: pcc, tejohnson Subscribers: mehdi_amini, inglorion, eraman, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D43415 llvm-svn: 325819
* [AlignmentFromAssumptions] Set source and dest alignments of memory ↵Daniel Neilson2018-02-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | intrinsiscs separately 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 AlignmentFromAssumptions pass to cease using the old getAlignment()/setAlignment API of MemoryIntrinsic in favour of getting/setting source & dest specific alignments through the new API. This allows us to simplify some of the code in this pass and also be more aggressive about setting the source and destination alignments separately. 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, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774, rL324781, rL324784, rL324955, rL324960 ) 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 Reviewers: hfinkel, bollu, reames Reviewed By: reames Subscribers: reames, llvm-commits Differential Revision: https://reviews.llvm.org/D43081 llvm-svn: 325816
* [MC] Don't crash on modulo by zero (PR35650)Simon Pilgrim2018-02-221-0/+3
| | | | | | | | Extension to D12776, handle modulo by zero in the same way we handle divide by zero. Differential Revision: https://reviews.llvm.org/D43631 llvm-svn: 325810
* [X86][AVX512] Add DQ+VLX scalar int<->fp tests cases for D43441Simon Pilgrim2018-02-222-14/+20
| | | | llvm-svn: 325804
* [DEBUGINFO] Do not output labels for empty macinfo sections.Alexey Bataev2018-02-221-0/+24
| | | | | | | | | | | | | | Summary: If there is no debug info for macros, do not emit labels for empty macinfo sections. Reviewers: probinson, echristo Subscribers: aprantl, llvm-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D43589 llvm-svn: 325803
* TableGen: Allow implicit casting between string and codeNicolai Haehnle2018-02-221-0/+23
| | | | | | | | | | | | | | | | | | | | | Summary: Perhaps the distinction between the two should be removed entirely in the long term, and the [{ ... }] syntax should just be a convenient way of writing multi-line strings. In the meantime, a lot of existing .td files are quite relaxed about string vs. code, and this change allows switching on more consistent type checks without breaking those. Change-Id: If85e3e04469e41b58e2703b62ac0032d2711713c Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43557 llvm-svn: 325799
* TableGen: Fix type deduction for !foreachNicolai Haehnle2018-02-221-0/+12
| | | | | | | | | | | | | | | | | Summary: In the case of !foreach(id, input-list, transform) where the type of input-list is list<A> and the type of transform is B, we now correctly deduce list<B> as the type of the !foreach. Change-Id: Ia19dd65eecc5991dd648280ba6a15f6a20fd61de Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43555 llvm-svn: 325797
* TableGen: Generalize type deduction for !listconcatNicolai Haehnle2018-02-221-0/+14
| | | | | | | | | | | | | | | Summary: This way, it should work even with complex operands. Change-Id: Iaccf5bbb50bd5882a0ba5d59689e4381315fb361 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43554 llvm-svn: 325796
OpenPOWER on IntegriCloud