summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* Update test to expect nuw flag in SDAG dump, fixes test after r315690Reid Kleckner2017-10-131-2/+2
| | | | llvm-svn: 315698
* [RS4GC] Look through vector bitcasts when looking for base pointerDaniel Neilson2017-10-131-0/+26
| | | | | | | | | | | | | | | | | | Summary: In RS4GC it is possible that a base pointer is contained in a vector that has undergone a bitcast from one element-pointertype to another. We teach RS4GC how to look through bitcasts of vector types when looking for a base pointer. Reviewers: anna Reviewed By: anna Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38849 llvm-svn: 315694
* [llvm-cov] Temporary delete sources-specified.test, it is failing on some bots.Max Moroz2017-10-131-27/+0
| | | | | | | | | | | | | | Summary: http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/5950/steps/test-stage1-compiler/logs/stdio Reviewers: vsk, Dor1s Reviewed By: Dor1s Subscribers: mehdi_amini Differential Revision: https://reviews.llvm.org/D38888 llvm-svn: 315693
* [Hexagon] Add patterns for cmpb/cmph with immediate argumentsKrzysztof Parzyszek2017-10-132-0/+76
| | | | | | Patch by Sumanth Gundapaneni. llvm-svn: 315692
* [llvm-cov] Fix sources-specified.test so it ignores the order of files printed.Max Moroz2017-10-131-7/+6
| | | | | | | | | | | | Summary: https://reviews.llvm.org/D38884#896964 Reviewers: vsk, Dor1s Reviewed By: Dor1s Differential Revision: https://reviews.llvm.org/D38887 llvm-svn: 315691
* [llvm-cov] An attempt to fix sources_specified.test failing on some buildbots.Max Moroz2017-10-131-4/+4
| | | | | | | | | | | | Summary: https://reviews.llvm.org/rL315685#115380 Reviewers: vsk, Dor1s Reviewed By: Dor1s Differential Revision: https://reviews.llvm.org/D38884 llvm-svn: 315687
* [llvm-cov] Generate "report" for given source paths if sources are specified.Max Moroz2017-10-137-0/+48
| | | | | | | | | | | | | | | | Summary: Documentation says that user can specify sources for both "show" and "report" commands. "Show" command respects specified sources, but "report" does not. It is useful to have both "show" and "report" generated for specified sources. Also added tests to for both commands with sources specified. Reviewers: vsk, kcc Reviewed By: vsk Differential Revision: https://reviews.llvm.org/D38860 llvm-svn: 315685
* Re-land "[dsymutil] Timestmap verification for __swift_ast"Jonas Devlieghere2017-10-131-3/+8
| | | | | | | | | | This patch adds timestamp verification for swiftmodule files. A new flag is provided to allows us to disable this check in order to allow testing of this feature. Differential revision: https://reviews.llvm.org/D38686 llvm-svn: 315684
* [SCEV] Teach SCEV to find maxBECount when loop endbound is variantAnna Thomas2017-10-132-2/+145
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch teaches SCEV to calculate the maxBECount when the end bound of the loop can vary. Note that we cannot calculate the exactBECount. This will only be done when both conditions are satisfied: 1. the loop termination condition is strictly LT. 2. the IV is proven to not overflow. This provides more information to users of SCEV and can be used to improve identification of finite loops. Reviewers: sanjoy, mkazantsev, silviu.baranga, atrick Reviewed by: mkazantsev Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38825 llvm-svn: 315683
* [InstCombine] add tests for boolean extend + add; NFCSanjay Patel2017-10-131-0/+32
| | | | llvm-svn: 315681
* Revert r314923: "Recommit : Use the basic cost if a GEP is not used as ↵Daniel Jasper2017-10-133-75/+1
| | | | | | | | | | | | | addressing mode" Significantly reduces performancei (~30%) of gipfeli (https://github.com/google/gipfeli) I have not yet managed to reproduce this regression with the open-source version of the benchmark on github, but will work with others to get a reproducer to you later today. llvm-svn: 315680
* [X86] Remove patterns that select unmasked vbroadcastf2x32/vbroadcasti2x32. ↵Craig Topper2017-10-133-15/+9
| | | | | | | | Prefer vbroadcastsd/vpbroadcastq instead. There's no advantage to using these instructions when they aren't masked. This enables some additional execution domain switching without needing to update the table. llvm-svn: 315674
* [X86] Add the test case for r315613 that I forgot to 'git add'.Craig Topper2017-10-131-0/+13
| | | | llvm-svn: 315649
* [llvm-isel-fuzzer] Use "--" as separator rather than '='.Matt Morehouse2017-10-132-12/+12
| | | | | | | | | | | | | | Summary: OSS-Fuzz doesn't support '=' in filenames. Reviewers: bogner, kcc Reviewed By: kcc Subscribers: javed.absar, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D38866 llvm-svn: 315647
* llvm-isel-fuzzer: Use the right REQUIRES line for r315599Justin Bogner2017-10-133-5/+2
| | | | | | | I'd mixed up ENABLE_SHARED and BUILD_SHARED_LIBS before, so these tests were being disabled in too many places. llvm-svn: 315646
* [CVP] Process binary operations even when def is localAnna Thomas2017-10-124-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds processing of binary operations when the def of operands are in the same block (i.e. local processing). Earlier we bailed out in such cases (the bail out was introduced in rL252032) because LVI at that time was more precise about context at the end of basic blocks, which implied local def and use analysis didn't benefit CVP. Since then we've added support for LVI in presence of assumes and guards. The test cases added show how local def processing in CVP helps adding more information to the ashr, sdiv, srem and add operators. Note: processCmp which suffers from the same problem will be handled in a later patch. Reviewers: philip, apilipenko, SjoerdMeijer, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38766 llvm-svn: 315634
* [LoopPredication] Check whether the loop is already guarded by the first ↵Artur Pilipenko2017-10-123-35/+71
| | | | | | iteration check condition llvm-svn: 315623
* Revert "Reintroduce "[SCCP] Propagate integer range info for parameters in ↵Bruno Cardoso Lopes2017-10-121-117/+0
| | | | | | | | | | | IPSCCP."" This reverts commit r315593: still affect two bots: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/5308 http://green.lab.llvm.org/green/job/clang-stage2-configure-Rlto/21751/ llvm-svn: 315618
* [LoopPredication] Support ule, sle latch predicatesArtur Pilipenko2017-10-121-0/+108
| | | | | | | | | | This is a follow up for the loop predication change 313981 to support ule, sle latch predicates. Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D38177 llvm-svn: 315616
* Implement custom lowering for ISD::CTTZ_ZERO_UNDEF and ISD::CTTZ.Wei Ding2017-10-121-3/+191
| | | | | | Differential Revision: http://reviews.llvm.org/D37348 llvm-svn: 315610
* [X86] Add a bunch of -mcpu strings to the cpus.ll test.Craig Topper2017-10-121-0/+11
| | | | | | We were missing most of the "core" aliases as well as skylake, cannonlake, and knights landing. llvm-svn: 315606
* [NVPTX] Implemented wmma intrinsics and instructions.Artem Belevich2017-10-121-0/+201
| | | | | | | | | | WMMA = "Warp Level Matrix Multiply-Accumulate". These are the new instructions introduced in PTX6.0 and available on sm_70 GPUs. Differential Revision: https://reviews.llvm.org/D38645 llvm-svn: 315601
* [codeview] Don't emit FPO data in funclet prologuesReid Kleckner2017-10-121-0/+85
| | | | | | Attempt 3 to work around bugs in FPO data with funclets. llvm-svn: 315600
* llvm-isel-fuzzer: Work around BUILD_SHARED_LIBS testing issuesJustin Bogner2017-10-123-0/+10
| | | | | | | | | | | | | | | Building with BUILD_SHARED_LIBS makes it tricky to copy around executables at will, since they won't be able to find the LLVM libraries any more. This makes testing a feature that's based on the executable name problematic, so we'll just disable these two tests in that configuration. We could potentially fix this by symlinking the lib directory into the test directory, but that wouldn't work on windows, and losing testing on windows would be far worse than losing testing on a configuration that's barely even supported. llvm-svn: 315599
* [TableGen] Allow intrinsics to have up to 8 return values.Artem Belevich2017-10-121-0/+32
| | | | | | Differential Revision: https://reviews.llvm.org/D38633 llvm-svn: 315598
* [ValueTracking] return zero when there's conflict in known bits of a shift ↵Sanjay Patel2017-10-122-28/+7
| | | | | | | | (PR34838) Poison allows us to return a better result than undef. llvm-svn: 315595
* Reintroduce "[SCCP] Propagate integer range info for parameters in IPSCCP."Bruno Cardoso Lopes2017-10-121-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is r315288 & r315294, which were reverted due to stage2 bot failures. Summary: This updates the SCCP solver to use of the ValueElement lattice for parameters, which provides integer range information. The range information is used to remove unneeded icmp instructions. For the following function, f() can be optimized to `ret i32 2` with this change source_filename = "sccp.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: norecurse nounwind readnone uwtable define i32 @main() local_unnamed_addr #0 { entry: %call = tail call fastcc i32 @f(i32 1) %call1 = tail call fastcc i32 @f(i32 47) %add3 = add nsw i32 %call, %call1 ret i32 %add3 } ; Function Attrs: noinline norecurse nounwind readnone uwtable define internal fastcc i32 @f(i32 %x) unnamed_addr #1 { entry: %c1 = icmp sle i32 %x, 100 %cmp = icmp sgt i32 %x, 300 %. = select i1 %cmp, i32 1, i32 2 ret i32 %. } attributes #1 = { noinline } Reviewers: davide, sanjoy, efriedma, dberlin Reviewed By: davide, dberlin Subscribers: mcrosier, gberry, mssimpso, dberlin, llvm-commits Differential Revision: https://reviews.llvm.org/D36656 llvm-svn: 315593
* [PowerPC] Add profitablilty check for conversion to mtctr loopsLei Huang2017-10-122-5/+158
| | | | | | | | | | | | | | | Add profitability checks for modifying counted loops to use the mtctr instruction. The latency of mtctr is only justified if there are more than 4 comparisons that will be removed as a result. Usually counted loops are formed relatively early and before unrolling, so most low trip count loops often don't survive. However we want to ensure that if they do, we do not mistakenly update them to mtctr loops. Use CodeMetrics to ensure we are only doing this for small loops with small trip counts. Differential Revision: https://reviews.llvm.org/D38212 llvm-svn: 315592
* [AMDGPU] For amdpal, widen interpolation mode workaroundTim Renouf2017-10-121-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The interpolation mode workaround ensures that at least one interpolation mode is enabled in PSInputAddr. It does not also check PSInputEna on the basis that the user might enable bits in that depending on run-time state. However, for amdpal os type, the user does not enable some bits after compilation based on run-time states; the register values being generated here are the final ones set in the hardware. Therefore, apply the workaround to PSInputAddr and PSInputEnable together. (The case where a bit is set in PSInputAddr but not in PSInputEnable is where the frontend set up an input arg for a particular interpolation mode, but nothing uses that input arg. Really we should have an earlier pass that removes such an arg.) Reviewers: arsenm, nhaehnle, dstuttard Subscribers: kzhuravl, wdng, yaxunl, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D37758 llvm-svn: 315591
* [RegisterCoalescer] Don't set read-undef in pruneValues, only clearMikael Holmen2017-10-121-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The comments in the code said // Remove <def,read-undef> flags. This def is now a partial redef. but the code didn't just remove read-undef, it could introduce new ones which could cause errors. E.g. if we have something like %vreg1<def> = IMPLICIT_DEF %vreg2:subreg1<def, read-undef> = op %vreg3, %vreg4 %vreg2:subreg2<def> = op %vreg6, %vreg7 and we merge %vreg1 and %vreg2 then we should not set undef on the second subreg def, which the old code did. Now we solve this by actually do what the code comment says. We remove read-undef flags rather than remove or introduce them. Reviewers: qcolombet, MatzeB Reviewed By: MatzeB Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38616 llvm-svn: 315564
* Re-commit "llvm-isel-fuzzer: Handle a subset of backend flags in the exec name"Justin Bogner2017-10-122-0/+30
| | | | | | | | | | | | | | | | | | Here we add a secondary option parser to llvm-isel-fuzzer (and provide it for use with other fuzzers). With this, you can copy the fuzzer to a name like llvm-isel-fuzzer=aarch64-gisel for a fuzzer that fuzzer AArch64 with GlobalISel enabled, or fuzzer=x86_64 to fuzz x86, with no flags required. This should be useful for running these in OSS-Fuzz. Note that this handrolls a subset of cl::opts to recognize, rather than embedding a complete command parser for argv[0]. If we find we really need the flexibility of handling arbitrary options at some point we can rethink this. This re-applies 315545 using "=" instead of ":" as a separator for arguments. llvm-svn: 315557
* Revert r315545 "llvm-isel-fuzzer: Handle a subset of backend flags in the ↵Hans Wennborg2017-10-122-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | executable name" It broke some tests on Windows: Failing Tests (4): LLVM :: tools/llvm-isel-fuzzer/execname-options.ll LLVM :: tools/llvm-isel-fuzzer/missing-triple.ll LLVM :: tools/llvm-isel-fuzzer/x86-empty-bc.ll LLVM :: tools/llvm-isel-fuzzer/x86-empty.ll > llvm-isel-fuzzer: Handle a subset of backend flags in the executable name > > Here we add a secondary option parser to llvm-isel-fuzzer (and provide > it for use with other fuzzers). With this, you can copy the fuzzer to > a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer > AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no > flags required. This should be useful for running these in OSS-Fuzz. > > Note that this handrolls a subset of cl::opts to recognize, rather > than embedding a complete command parser for argv[0]. If we find we > really need the flexibility of handling arbitrary options at some > point we can rethink this. llvm-svn: 315554
* [SimplifyIndVar] Replace IVUsers with loop invariant whenever possibleHongbin Zheng2017-10-122-39/+88
| | | | | | Differential Revision: https://reviews.llvm.org/D38415 llvm-svn: 315551
* llvm-isel-fuzzer: Handle a subset of backend flags in the executable nameJustin Bogner2017-10-122-0/+30
| | | | | | | | | | | | | | | Here we add a secondary option parser to llvm-isel-fuzzer (and provide it for use with other fuzzers). With this, you can copy the fuzzer to a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no flags required. This should be useful for running these in OSS-Fuzz. Note that this handrolls a subset of cl::opts to recognize, rather than embedding a complete command parser for argv[0]. If we find we really need the flexibility of handling arbitrary options at some point we can rethink this. llvm-svn: 315545
* Revert r307036 because of PR34919.Wei Mi2017-10-127-743/+1589
| | | | llvm-svn: 315540
* AMDGPU/NFC: Minor clean ups in PAL metadataKonstantin Zhuravlyov2017-10-118-9/+9
| | | | | | | | | - Move PAL metadata definitions to AMDGPUMetadata - Make naming consistent with HSA metadata Differential Revision: https://reviews.llvm.org/D38745 llvm-svn: 315523
* AMDGPU/NFC: Rename code object metadata as HSA metadataKonstantin Zhuravlyov2017-10-1114-27/+27
| | | | | | | | | - Rename AMDGPUCodeObjectMetadata to AMDGPUMetadata (PAL metadata will be included in this file in the follow up change) - Rename AMDGPUCodeObjectMetadataStreamer to AMDGPUHSAMetadataStreamer - Introduce HSAMD namespace - Other minor name changes in function and test names llvm-svn: 315522
* Really fix llvm-rc include-paths.testReid Kleckner2017-10-111-3/+3
| | | | llvm-svn: 315515
* Attempt to fix failing llvm-rc include-paths.textReid Kleckner2017-10-111-1/+1
| | | | llvm-svn: 315514
* [codeview] Implement FPO data assembler directivesReid Kleckner2017-10-1111-5/+1753
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds a set of new directives that describe 32-bit x86 prologues. The directives are limited and do not expose the full complexity of codeview FPO data. They are merely a convenience for the compiler to generate more readable assembly so we don't need to generate tons of labels in CodeGen. If our prologue emission changes in the future, we can change the set of available directives to suit our needs. These are modelled after the .seh_ directives, which use a different format that interacts with exception handling. The directives are: .cv_fpo_proc _foo .cv_fpo_pushreg ebp/ebx/etc .cv_fpo_setframe ebp/esi/etc .cv_fpo_stackalloc 200 .cv_fpo_endprologue .cv_fpo_endproc .cv_fpo_data _foo I tried to follow the implementation of ARM EHABI CFI directives by sinking most directives out of MCStreamer and into X86TargetStreamer. This helps avoid polluting non-X86 code with WinCOFF specific logic. I used cdb to confirm that this can show locals in parent CSRs in a few cases, most importantly the one where we use ESI as a frame pointer, i.e. the one in http://crbug.com/756153#c28 Once we have cdb integration in debuginfo-tests, we can add integration tests there. Reviewers: majnemer, hans Subscribers: aemerson, mgorny, kristof.beyls, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D38776 llvm-svn: 315513
* [Hexagon] Make sure that new-value jump is packetized with producerKrzysztof Parzyszek2017-10-111-0/+31
| | | | llvm-svn: 315510
* [MachineCombiner] Fix initialisation of LastUpdate for incremental update.Florian Hahn2017-10-111-0/+48
| | | | | | | | | | | | | | | | | Summary: Fixes a bogus iterator resulting from the removal of a block's first instruction at the point that incremental update is enabled. Patch by Paul Walker. Reviewers: fhahn, Gerolf, efriedma, MatzeB Reviewed By: fhahn Subscribers: aemerson, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D38734 llvm-svn: 315502
* [PowerPC] Utilize DQ-Form instructions for spill/restore and fix FrameIndex ↵Lei Huang2017-10-114-238/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | elimination to only use `lis/addi` if necessary. Currently we produce a bunch of unnecessary code when emitting the prologue/epilogue for spills/restores. Namely, if the load from stack slot/store to stack slot instruction is an X-Form instruction, we will always produce an LIS/ORI sequence for the stack offset. Furthermore, we have not exploited the P9 vector D-Form loads/stores for this purpose. This patch address both issues. Specifying the D-Form load as the instruction to use for stack spills/reloads should be safe because: 1. The stack should be aligned according to the ABI 2. If the stack isn't aligned, PPCRegisterInfo::eliminateFrameIndex() will check for the offset being a multiple of 16 and will convert it to an X-Form instruction if it isn't. Differential Revision : https://reviews.llvm.org/D38758 llvm-svn: 315500
* [llvm-rc] Use proper search algorithm for finding resources.Zachary Turner2017-10-115-6/+50
| | | | | | | | | | | | Previously we would only look in the current directory for a resource, which might not be the same as the directory of the rc file. Furthermore, MSVC rc supports a /I option, and can also look in the system environment. This patch adds support for this search algorithm. Differential Revision: https://reviews.llvm.org/D38740 llvm-svn: 315499
* [x86] avoid infinite loop from SoftenFloatOperand (PR34866)Sanjay Patel2017-10-111-0/+65
| | | | | | | | | Legalization of fp128 assumes things that we should have asserts for, so that's another potential improvement. Differential Revision: https://reviews.llvm.org/D38771 llvm-svn: 315485
* Reland "[llvm-objcopy] Add support for --strip-sections to remove all ↵Jake Ehrlich2017-10-111-0/+66
| | | | | | | | | | | | | | | | | | | | | section headers leaving only program headers and loadable segment data" ubsan caught an issue I made where I was converting a null pointer to a reference. elf utils implements a particularly extreme form of stripping that I'd like to support. eu-strip has an option called "strip-sections" that removes all section headers and leaves only program headers and the segment data. I have implemented this option partly as a test but mainly because in Fuchsia we would like to use this option to minimize the size of our executables. The other strip options that are on my list include --strip-all and --strip-debug. This is a preliminary implementation that I'd like to start using in Fuchsia builds if possible. This change implements such a stripping option for llvm-objcopy Differential Revision: https://reviews.llvm.org/D38335 llvm-svn: 315484
* [NFC] update test case so checks are not order dependent when not neededLei Huang2017-10-111-5/+5
| | | | llvm-svn: 315482
* Convert an ErrorOr to Expected.Rafael Espindola2017-10-111-1/+3
| | | | | | | getRelocationAddend should never be called on non SHT_RELA sections, but changing that requires changing RelocVisitor.h. llvm-svn: 315473
* [Pipeliner] Improve serialization order for post-incrementsKrzysztof Parzyszek2017-10-111-0/+37
| | | | | | | | | | | | | | | | | | | The pipeliner is generating a serial sequence that causes poor register allocation when a post-increment instruction appears prior to the use of the post-increment register. This occurs when there is a circular set of dependences involved with a sequence of instructions in the same cycle. In this case, there is no serialization of the parallel semantics that will not cause an additional register to be allocated. This patch fixes the problem by changing the instructions so that the post-increment instruction is used by the subsequent instruction, which enables the register allocator to make a better decision and not require another register. Patch by Brendon Cahoon. llvm-svn: 315466
* [InstCombine] add baseline tests for D38531; NFCSanjay Patel2017-10-111-1/+103
| | | | llvm-svn: 315461
OpenPOWER on IntegriCloud