summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* [SelectionDAG] getRawSubclassData should not return HasDebugValue.Chih-Hung Hsieh2016-12-011-0/+177
| | | | | | | | | | | This change fixes a regression in r279537 and makes getRawSubclassData behave like r279536. Without this change, the fp128-g.ll test case will have an infinite loop involving SoftenFloatRes_LOAD. Differential Revision: http://reviews.llvm.org/D26942 llvm-svn: 288420
* AArch64: fix 128-bit cmpxchg at -O0 (again, again).Tim Northover2016-12-011-4/+8
| | | | | | | | | | | | | | | This time the issue is fortunately just a simple mistake rather than a horrible design spectre. I thought SUBS/SBCS provided sufficient NZCV flags for comparing two 64-bit values, but they don't. The fix is slightly clunkier in AArch64 because we can't use conditional execution to emit a pair of CMPs. Traditionally an "icmp ne i128" would map to an EOR/EOR/ORR/CBNZ, but that uses more registers so it's easier to go with a CSET/CINC/CBNZ combination. Slightly less efficient, but this is -O0 anyway. Thanks to Anton Korobeynikov for pointing out the issue. llvm-svn: 288418
* [PR29121] Don't fold if it would produce atomic vector loads or storesPhilip Reames2016-12-011-0/+20
| | | | | | | | The instcombine code which folds loads and stores into their use types can trip up if the use is a bitcast to a type which we can't directly load or store in the IR. In principle, such types shouldn't exist, but in practice they do today. This is a workaround to avoid a bug while we work towards the long term goal. Differential Revision: https://reviews.llvm.org/D24365 llvm-svn: 288415
* [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.Alexey Bataev2016-12-011-114/+62
| | | | | | | | | | | | | | | When trying to vectorize trees that start at insertelement instructions function tryToVectorizeList() uses vectorization factor calculated as MinVecRegSize/ScalarTypeSize. But sometimes it does not work as tree cost for this fixed vectorization factor is too high. Patch tries to improve the situation. It tries different vectorization factors from max(PowerOf2Floor(NumberOfVectorizedValues), MinVecRegSize/ScalarTypeSize) to MinVecRegSize/ScalarTypeSize and tries to choose the best one. Differential Revision: https://reviews.llvm.org/D27215 llvm-svn: 288412
* [tablegen] Delete duplicates from a vector without skipping elementsVedant Kumar2016-12-011-0/+84
| | | | | | | | | | | | | | Tablegen's -gen-instr-info pass has a bug in its emitEnums() routine. The function intends for values in a vector to be deduplicated, but it accidentally skips over elements after performing a deletion. I think there are smarter ways of doing this deduplication, but we can do that in a follow-up commit if there's interest. See the thread: [PATCH] TableGen InstrMapping Bug fix. Patch by Tyler Kenney! llvm-svn: 288408
* Fix a bug with llvm-size and the -m option with multiple files not printing ↵Kevin Enderby2016-12-012-0/+4
| | | | | | the file names. llvm-svn: 288402
* [SLP] Fixed cost model for horizontal reduction.Alexey Bataev2016-12-012-5/+5
| | | | | | | | | | | | | | Currently when cost of scalar operations is evaluated the vector type is used for scalar operations. Patch fixes this issue and fixes evaluation of the vector operations cost. Several test showed that vector cost model is too optimistic. It allowed vectorization of 8 or less add/fadd operations, though scalar code is faster. Actually, only for 16 or more operations vector code provides better performance. Differential Revision: https://reviews.llvm.org/D26277 llvm-svn: 288398
* [AsmParser] Diagnose empty symbol for .set directiveWeiming Zhao2016-12-011-1/+2
| | | | | | | | | | | | Summary: Diagnose empty symbol to avoid hitting assertion in MCContext::getOrCreateSymbol Reviewers: eli.friedman, rengolin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26728 llvm-svn: 288390
* [GVN, OptDiag] Print the interesting instructions involved in missed ↵Adam Nemet2016-12-011-1/+44
| | | | | | | | | | | | | | | | | | | | | load-elimination [recommitting after the fix in r288307] This includes the intervening store and the load/store that we're trying to forward from in the optimization remark for the missed load elimination. This is hooked up under a new mode in ORE that allows for compile-time budget for a bit more analysis to print more insightful messages. This mode is currently enabled for -fsave-optimization-record (-Rpass is trickier since it is controlled in the front-end). With this we can now print the red remark in http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L446 Differential Revision: https://reviews.llvm.org/D26490 llvm-svn: 288381
* [GVN, OptDiag] Include the value that is forwarded in load eliminationAdam Nemet2016-12-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | [recommitting after the fix in r288307] This requires some changes to the opt-diag API. Hal and I have discussed this at the Dev Meeting and came up with a streaming delimiter (setExtraArgs) to solve this. Arguments after this delimiter are only included in the optimization records and not in the remarks printed in the compiler output. (Note, how in the test the content of the YAML file changes but the remarks on the compiler output don't.) This implements the green GVN message with a bug fix at line http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L446 The fix is that now we properly include the constant value in the message: "load of type i32 eliminated in favor of 7" Differential Revision: https://reviews.llvm.org/D26489 llvm-svn: 288380
* [SLP] Additional tests with the cost of vector operations.Alexey Bataev2016-12-012-1/+21
| | | | llvm-svn: 288377
* Revert "[SLP] Additional tests with the cost of vector operations."Alexey Bataev2016-12-012-20/+1
| | | | | | This reverts commit a61718435fc4118c82f8aa6133fd81f803789c1e. llvm-svn: 288371
* [GVN] Basic optimization remark supportAdam Nemet2016-12-011-0/+59
| | | | | | | | | | | | | | | | [recommitting after the fix in r288307] Follow-on patches will add more interesting cases. The goal of this patch-set is to get the GVN messages printed in opt-viewer from Dhrystone as was presented in my Dev Meeting talk. This is the optimization view for the function (the last remark in the function has a bug which is fixed in this series): http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L430 Differential Revision: https://reviews.llvm.org/D26488 llvm-svn: 288370
* [SLP] Additional tests with the cost of vector operations.Alexey Bataev2016-12-012-1/+20
| | | | llvm-svn: 288369
* [X86][SSE] Classify AND bitmasks as variable shuffle masksSimon Pilgrim2016-12-011-6/+0
| | | | | | They are loading the bitmasks from the constant pool so the cost is similar to loading a shuffle mask. llvm-svn: 288367
* [X86][SSE] Add support for combining AND bitmasks to shuffles.Simon Pilgrim2016-12-016-53/+91
| | | | llvm-svn: 288365
* [LMT] Restrict nop length to oneAsaf Badouh2016-12-011-3/+22
| | | | | | | | | not all lakemont MCU support long nop. we can't assume we can generate long nop by default for MCU. Differential Revision: https://reviews.llvm.org/D26895 llvm-svn: 288363
* [X86][SSE] Tidied up filecheck prefixes for uitofp fast-math tests.Simon Pilgrim2016-12-011-3/+3
| | | | | | They should be in 'narrowing' order from common to more specific test prefixes. llvm-svn: 288338
* [X86][SSE] Add support for combining target shuffles to AND bitmasks.Simon Pilgrim2016-12-013-8/+8
| | | | llvm-svn: 288335
* [X86][SSE] Add support for combining ISD::AND with shuffles.Simon Pilgrim2016-12-012-4/+1
| | | | | | Attempts to convert an AND with a vector of 255 or 0 values into a shuffle (blend) mask. llvm-svn: 288333
* [X86][SSE] Added tests showing missed combines of shuffles with ANDs.Simon Pilgrim2016-12-012-0/+40
| | | | llvm-svn: 288330
* [GVN] When merging blocks update LoopInfo if it's availableAdam Nemet2016-12-011-0/+50
| | | | | | | | | | | | | If LoopInfo is available during GVN, BasicAA will use it. However MergeBlockIntoPredecessor does not update LI as it merges blocks. This didn't use to cause problems because LI was freed before GVN/BasicAA. Now with OptimizationRemarkEmitter, the lifetime of LI is extended so LI needs to be kept up-to-date during GVN. Differential Revision: https://reviews.llvm.org/D27288 llvm-svn: 288307
* revert r288283 as it causes debug info (line numbers) to be lost in ↵Kostya Serebryany2016-12-013-85/+6
| | | | | | instrumented code. also revert r288299 which was a workaround for the problem. llvm-svn: 288300
* [WebAssembly] Emit .import_global assembler directivesDerek Schuff2016-12-011-0/+4
| | | | | | | | | | | | Support a new assembler directive, .import_global, to declare imported global variables (i.e. those with external linkage and no initializer). The linker turns these into wasm imports. Patch by Jacob Gravelle Differential Revision: https://reviews.llvm.org/D26875 llvm-svn: 288296
* MCStreamer: Use "cfi" for CFI related temp labels.Matthias Braun2016-11-3042-382/+382
| | | | | | | | | | | | | Choosing a "cfi" name makes the intend a bit clearer in an assembly dump and more importantly the assembly dumps are slightly more stable as the numbers don't move around anymore when unrelated code calls createTempSymbol() more or less often. As they are temp labels the name doesn't influence the generated object code. Differential Revision: https://reviews.llvm.org/D27244 llvm-svn: 288290
* llvm-lto2: Simpler workaround for PR30396.Peter Collingbourne2016-11-301-0/+1
| | | | | | | | | | | Maintain the command line resolutions as a map to a list of resolutions rather than a single resolution, and apply the resolutions in the order observed. This is not only simpler but allows us to test the scenario where the two symbols have different resolutions. Differential Revision: https://reviews.llvm.org/D27285 llvm-svn: 288288
* Recommit r288212: Emit 'no line' information for interesting 'orphan' ↵Paul Robinson2016-11-303-6/+85
| | | | | | | | | | | | | | | | instructions. The LLDB tests are now ready for this patch. DWARF specifies that "line 0" really means "no appropriate source location" in the line table. Use this for branch targets and some other cases that have no specified source location, to prevent inheriting unfortunate line numbers from physically preceding instructions (which might be from completely unrelated source). Differential Revision: http://reviews.llvm.org/D24180 llvm-svn: 288283
* Only computeRelativePath() on new membersDavid Callahan2016-11-301-0/+14
| | | | | | | | | | | | | | | Summary: When using thin archives, and processing the same archive multiple times, we were mangling existing entries. The root cause is that we were calling computeRelativePath() more than once. Here, we only call it when adding new members to an archive. Note that D27218 changes the way thin archives are printed, and will break the new unit test included here. Depending on which one lands first, the other will need to be slightly modified. Reviewers: rafael, davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27217 llvm-svn: 288280
* [AArch64] Refactor LSE support as feature separate from V8.1a support.Joel Jones2016-11-303-0/+25
| | | | | | | | | | | | | | | | | | | Summary: This is preparation for ThunderX processors that have Large System Extension (LSE) atomic instructions, but not the other instructions introduced by V8.1a. This will mimic changes to GCC as described here: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00388.html LSE instructions are: LD/ST<op>, CAS*, SWP Reviewers: t.p.northover, echristo, jmolloy, rengolin Subscribers: aemerson, mehdi_amini Differential Revision: https://reviews.llvm.org/D26621 llvm-svn: 288279
* [LoopUnroll] Implement profile-based loop peelingMichael Kuperstein2016-11-302-0/+143
| | | | | | | | | | | | | | | | | | | This implements PGO-driven loop peeling. The basic idea is that when the average dynamic trip-count of a loop is known, based on PGO, to be low, we can expect a performance win by peeling off the first several iterations of that loop. Unlike unrolling based on a known trip count, or a trip count multiple, this doesn't save us the conditional check and branch on each iteration. However, it does allow us to simplify the straight-line code we get (constant-folding, etc.). This is important given that we know that we will usually only hit this code, and not the actual loop. This is currently disabled by default. Differential Revision: https://reviews.llvm.org/D25963 llvm-svn: 288274
* [InstCombine] allow more narrowing transforms for logic opsSanjay Patel2016-11-301-12/+12
| | | | | | | We had a limited version of this for scalar 'and'; this expands the transform to 'or' and 'xor' and allows vectors types too. llvm-svn: 288273
* [InstCombine] add tests to show potentially missed logic+trunc transforms; NFCSanjay Patel2016-11-301-1/+81
| | | | llvm-svn: 288270
* AMDGPU: Move mir tests into mir test directoryMatt Arsenault2016-11-305-0/+0
| | | | llvm-svn: 288262
* [InstCombine] update test to use FileCheck and auto-generate checks; NFCSanjay Patel2016-11-301-14/+15
| | | | llvm-svn: 288261
* [X86][SSE] Added tests showing missed combines of ANDs with shuffles.Simon Pilgrim2016-11-302-0/+40
| | | | llvm-svn: 288259
* [InstCombine] auto-generate checks for select+bitwise logic tests; NFCSanjay Patel2016-11-302-259/+297
| | | | llvm-svn: 288254
* [AArch64] Fix useful bits detection for BFM instructionsSilviu Baranga2016-11-301-0/+30
| | | | | | | | | | | | | | | | | | | Summary: When computing useful bits for a BFM instruction, we need to take into consideration the case where both operands of the BFM are equal and provide data that we need to track. Not doing this can cause us to miss useful bits. Fixes PR31138 (https://llvm.org/bugs/show_bug.cgi?id=31138) Reviewers: t.p.northover, jmolloy Subscribers: evandro, gberry, srhines, pirama, mcrosier, aemerson, llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D27130 llvm-svn: 288253
* [WebAssembly] Add llvm-objdump support for wasm file formatDerek Schuff2016-11-302-0/+24
| | | | | | | | | | | This is the first part of an effort to add wasm binary support across all llvm tools. Patch by Sam Clegg Differential Revision: https://reviews.llvm.org/D26172 llvm-svn: 288251
* [X86][SSE] Add support for target shuffle constant foldingSimon Pilgrim2016-11-308-91/+44
| | | | | | | | | | Initial support for target shuffle constant folding in cases where all shuffle inputs are constant. We may be able to relax this and merge shuffles with only some constant inputs in the future. I've added the helper function getTargetConstantBitsFromNode (based off a similar function in X86ShuffleDecodeConstantPool.cpp) that could be reused for other cases requiring constant vector extraction. Differential Revision: https://reviews.llvm.org/D27220 llvm-svn: 288250
* [AArch64] use exact checks; NFCSanjay Patel2016-11-301-5/+6
| | | | llvm-svn: 288245
* Updated test with -verify-machineinstrs to check for PR21931Simon Pilgrim2016-11-301-1/+1
| | | | llvm-svn: 288242
* [X86][SSE] Add tests demonstrating missed opportunities to combine 64-bit ↵Simon Pilgrim2016-11-301-0/+513
| | | | | | element unpacks with horizontal pair ops. llvm-svn: 288240
* Revert "[GVN] Basic optimization remark support"Adam Nemet2016-11-301-59/+0
| | | | | | | | This reverts commit r288210. The failure on the stage2 LTO build is back. llvm-svn: 288226
* Revert r288212 due to lldb failure.Paul Robinson2016-11-293-85/+6
| | | | llvm-svn: 288216
* [lanai] Manually match 0/-1 with R0/R1.Jacques Pienaar2016-11-291-4/+4
| | | | | | | | | | | | Summary: Previously 0 and -1 was matched via tablegen rules. But this could cause problems where a physical register was being used where a virtual register was expected (seen in optimizeSelect and TwoAddressInstructionPass). Instead follow AArch64 and match in DAGToDAGISel. Reviewers: eliben, majnemer Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D27171 llvm-svn: 288215
* Revert https://reviews.llvm.org/rL287679Nemanja Ivanovic2016-11-295-83/+59
| | | | | | | This commit caused some miscompiles that did not show up on any of the bots. Reverting until we can investigate the cause of those failures. llvm-svn: 288214
* Emit 'no line' information for interesting 'orphan' instructions.Paul Robinson2016-11-293-6/+85
| | | | | | | | | | | | DWARF specifies that "line 0" really means "no appropriate source location" in the line table. Use this for branch targets and some other cases that have no specified source location, to prevent inheriting unfortunate line numbers from physically preceding instructions (which might be from completely unrelated source). Differential Revision: http://reviews.llvm.org/D24180 llvm-svn: 288212
* [X86][AVX512VL] Improved testing of vcvtpd2ps, vcvtpd2dq/vcvtpd2udq and ↵Simon Pilgrim2016-11-291-20/+35
| | | | | | | | vcvttpd2dq/vcvttpd2udq implicit zeroing of upper 64-bits of xmm result Ensure that masked instruction doesn't assume implicit zeroing. llvm-svn: 288211
* [GVN] Basic optimization remark supportAdam Nemet2016-11-291-0/+59
| | | | | | | | | | | | | | | | [recommiting patches one-by-one to see which breaks the stage2 LTO bot] Follow-on patches will add more interesting cases. The goal of this patch-set is to get the GVN messages printed in opt-viewer from Dhrystone as was presented in my Dev Meeting talk. This is the optimization view for the function (the last remark in the function has a bug which is fixed in this series): http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L430 Differential Revision: https://reviews.llvm.org/D26488 llvm-svn: 288210
* [X86][AVX512DQVL] Improved testing of vcvtqq2ps/vcvtuqq2ps implicit zeroing ↵Simon Pilgrim2016-11-291-8/+14
| | | | | | | | of upper 64-bits of xmm result Ensure that masked instruction doesn't assume implicit zeroing. llvm-svn: 288209
OpenPOWER on IntegriCloud