summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SystemZ] Make better use of VLDEBUlrich Weigand2018-12-203-4/+65
| | | | | | | | | | | We already have special code (DAG combine support for FP_ROUND) to recognize cases where we an use a vector version of VLEDB to perform two floating-point truncates in parallel, but equivalent support for VLEDB (vector floating-point extends) has been missing so far. This patch adds corresponding DAG combine support for FP_EXTEND. llvm-svn: 349746
* Revert "[sanitizer] Support running without fd 0,1,2."Ilya Biryukov2018-12-208-76/+10
| | | | | | | | This reverts commit r349699. Reason: the commit breaks compilation of sanitizer_rtems.cc when building for RTEMS. llvm-svn: 349745
* [X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic ↵Simon Pilgrim2018-12-205-30/+898
| | | | | | | | | | intrinsics (llvm) Pulled out of D55894 to match the clang changes in D55890. Differential Revision: https://reviews.llvm.org/D55890 llvm-svn: 349744
* [X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic ↵Simon Pilgrim2018-12-205-42/+57
| | | | | | | | | | | | intrinsics (clang) This emits SADD_SAT/SSUB_SAT generic intrinsics for the SSE signed saturated math intrinsics. LLVM counterpart: https://reviews.llvm.org/D55894 Differential Revision: https://reviews.llvm.org/D55890 llvm-svn: 349743
* [X86] Update PADDSW/PSUBSW intrinsic usage with generic saturated intrinsics.Simon Pilgrim2018-12-201-11/+11
| | | | | | As discussed on D55894, this makes no difference to the actual test. llvm-svn: 349742
* [llvm-objcopy] Use ELFOSABI_NONE instead of 0. NFC.George Rimar2018-12-201-1/+1
| | | | | | | This was requested during the review of D55886. (sorry, forgot to address this) llvm-svn: 349741
* [asan] Revert still Androind incompatible tests enabled in r349736Vitaly Buka2018-12-202-0/+4
| | | | llvm-svn: 349740
* [X86] Change 'simple nonmem' intrinsic test to not use PADDSWSimon Pilgrim2018-12-201-5/+5
| | | | | | Those intrinsics will be autoupgraded soon to @llvm.sadd.sat generics (D55894), so to keep a x86-specific case I'm replacing it with @llvm.x86.sse2.pmulhu.w llvm-svn: 349739
* [llvm-objcopy] - Do not drop the OS/ABI and ABIVersion fields of ELF headerGeorge Rimar2018-12-203-2/+24
| | | | | | | | | | | This is https://bugs.llvm.org/show_bug.cgi?id=40005, Patch teaches llvm-objcopy to preserve OS/ABI and ABIVersion fields of ELF header. (Currently, it drops them to zero). Differential revision: https://reviews.llvm.org/D55886 llvm-svn: 349738
* [yaml2obj/obj2yaml] - Support dumping/parsing ABI version.George Rimar2018-12-205-1/+20
| | | | | | | | | | | These tools were assuming ABI version is 0, that is not always true. Patch teaches them to work with that field. Differential revision: https://reviews.llvm.org/D55884 llvm-svn: 349737
* [asan] Fix and re-enable few test on AndroidVitaly Buka2018-12-206-38/+23
| | | | llvm-svn: 349736
* [InstCombine][AMDGPU] Handle more buffer intrinsicsPiotr Sobczak2018-12-202-0/+964
| | | | | | | | | | | | | | | | | | | | | | | Summary: Include the following intrinsics in the InsctCombine simplification: * amdgcn_raw_buffer_load * amdgcn_raw_buffer_load_format * amdgcn_struct_buffer_load * amdgcn_struct_buffer_load_format Change-Id: I14deceff74bcb21179baf6aa6e94bf39e7d63d5d Reviewers: arsenm Reviewed By: arsenm Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D55882 llvm-svn: 349735
* [MSan] Don't emit __msan_instrument_asm_load() callsAlexander Potapenko2018-12-202-16/+4
| | | | | | | | | | | LLVM treats void* pointers passed to assembly routines as pointers to sized types. We used to emit calls to __msan_instrument_asm_load() for every such void*, which sometimes led to false positives. A less error-prone (and truly "conservative") approach is to unpoison only assembly output arguments. llvm-svn: 349734
* Revert r349731 "[CodeGen][ExpandMemcmp] Add an option for allowing ↵Clement Courbet2018-12-206-639/+265
| | | | | | | | overlapping loads." Forgot to update PowerPC tests for the GEP->bitcast change. llvm-svn: 349733
* [NFC] Fix trailing comma after function.Clement Courbet2018-12-201-1/+1
| | | | | | lib/Analysis/VectorUtils.cpp:482:2: warning: extra ‘;’ [-Wpedantic] llvm-svn: 349732
* [CodeGen][ExpandMemcmp] Add an option for allowing overlapping loads.Clement Courbet2018-12-206-265/+639
| | | | | | | | | | | | | | Summary: This allows expanding {7,11,13,14,15,21,22,23,25,26,27,28,29,30,31}-byte memcmp in just two loads on X86. These were previously calling memcmp. Reviewers: spatel, gchatelet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D55263 llvm-svn: 349731
* [HWASAN] Add support for memory intrinsicsEugene Leviant2018-12-206-60/+172
| | | | | | | | | This is patch complements D55117 implementing __hwasan_mem* functions in runtime Differential revision: https://reviews.llvm.org/D55554 llvm-svn: 349730
* [Sema] Better static assert diagnostics for expressions involving ↵Clement Courbet2018-12-206-14/+92
| | | | | | | | | | | | | | | | | | temporaries/casts/.... Summary: Handles expressions such as: - `std::is_const<T>()` - `std::is_const<T>()()`; - `std::is_same(decltype(U()), V>::value`; Reviewers: aaron.ballman, Quuxplusone Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D55552 llvm-svn: 349729
* [HWASAN] Add support for memory intrinsicsEugene Leviant2018-12-202-0/+82
| | | | | | Differential revision: https://reviews.llvm.org/D55117 llvm-svn: 349728
* [PowerPC] Implement the isSelectSupported() target hookKang Zhang2018-12-202-12/+13
| | | | | | | | | | | | | | | | Summary: PowerPC has scalar selects (isel) and vector mask selects (xxsel). But PowerPC does not have vector CR selects, PowerPC does not support scalar condition selects on vectors. In addition to implementing this hook, isSelectSupported() should return false when the SelectSupportKind is ScalarCondVectorVal, so that predictable selects are converted into branch sequences. Reviewed By: steven.zhang, hfinkel Differential Revision: https://reviews.llvm.org/D55754 llvm-svn: 349727
* [DAGCombiner] Fix a place that was creating a SIGN_EXTEND with an extra operand.Craig Topper2018-12-201-1/+1
| | | | llvm-svn: 349726
* Introduce llvm.loop.parallel_accesses and llvm.access.group metadata.Michael Kruse2018-12-2040-244/+868
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current llvm.mem.parallel_loop_access metadata has a problem in that it uses LoopIDs. LoopID unfortunately is not loop identifier. It is neither unique (there's even a regression test assigning the some LoopID to multiple loops; can otherwise happen if passes such as LoopVersioning make copies of entire loops) nor persistent (every time a property is removed/added from a LoopID's MDNode, it will also receive a new LoopID; this happens e.g. when calling Loop::setLoopAlreadyUnrolled()). Since most loop transformation passes change the loop attributes (even if it just to mark that a loop should not be processed again as llvm.loop.isvectorized does, for the versioned and unversioned loop), the parallel access information is lost for any subsequent pass. This patch unlinks LoopIDs and parallel accesses. llvm.mem.parallel_loop_access metadata on instruction is replaced by llvm.access.group metadata. llvm.access.group points to a distinct MDNode with no operands (avoiding the problem to ever need to add/remove operands), called "access group". Alternatively, it can point to a list of access groups. The LoopID then has an attribute llvm.loop.parallel_accesses with all the access groups that are parallel (no dependencies carries by this loop). This intentionally avoid any kind of "ID". Loops that are clones/have their attributes modifies retain the llvm.loop.parallel_accesses attribute. Access instructions that a cloned point to the same access group. It is not necessary for each access to have it's own "ID" MDNode, but those memory access instructions with the same behavior can be grouped together. The behavior of llvm.mem.parallel_loop_access is not changed by this patch, but should be considered deprecated. Differential Revision: https://reviews.llvm.org/D52116 llvm-svn: 349725
* [WebAssembly] Emit a splat for v128 IMPLICIT_DEFThomas Lively2018-12-202-8/+12
| | | | | | | | | | | | | | Summary: This is a code size savings and is also important to get runnable code while engines do not support v128.const. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D55910 llvm-svn: 349724
* Fix build errors introduced by r349712 on aarch64 bots.Amara Emerson2018-12-202-7/+6
| | | | llvm-svn: 349723
* [lldbsuite] Un-xfail TestRedefinitionsInInlines on WindowsStella Stamenova2018-12-201-6/+4
| | | | llvm-svn: 349722
* [lldbsuite] Un-xfail TestDataFormatterSynthVal on WindowsStella Stamenova2018-12-201-3/+0
| | | | llvm-svn: 349721
* [WebAssembly] Gate unimplemented SIMD ops on flagThomas Lively2018-12-207-16/+39
| | | | | | | | | | | | | | | Summary: Gates v128.const, f32x4.sqrt, f32x4.div, i8x16.extract_lane_u, and i16x8.extract_lane_u on the --wasm-enable-unimplemented-simd flag, since these ops are not implemented yet in V8. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D55904 llvm-svn: 349720
* [lldbsuite] Un-xfail tests on Windows that are now passing (pt.5)Stella Stamenova2018-12-206-18/+5
| | | | | | This is a set of tests that were all marked as failing becuse of pr24764. The bug is not fixed (as in more of the tests that were marked this way are failing), but this set is passing. It is possible that some of them are false positives, but there's a large number of unexpectedly passing tests on Windows, so I am doing a bulk un-xfail to get the buildbot to green. llvm-svn: 349719
* [lldb] Retrieve currently handled Obj-C exception via ↵Kuba Mracek2018-12-2014-35/+355
| | | | | | | | | | | | __cxa_current_exception_type and add GetCurrentExceptionBacktrace SB ABI This builds on https://reviews.llvm.org/D43884 and https://reviews.llvm.org/D43886 and extends LLDB support of Obj-C exceptions to also look for a "current exception" for a thread in the C++ exception handling runtime metadata (via call to __cxa_current_exception_type). We also construct an actual historical SBThread/ThreadSP that contains frames from the backtrace in the Obj-C exception object. The high level goal this achieves is that when we're already crashed (because an unhandled exception occurred), we can still access the exception object and retrieve the backtrace from the throw point. In Obj-C, this is particularly useful because a catch+rethrow is very common and in those cases you currently don't have any access to the throw point backtrace. Differential Revision: https://reviews.llvm.org/D44072 llvm-svn: 349718
* Remove pointless casts.Evgeniy Stepanov2018-12-201-2/+2
| | | | llvm-svn: 349717
* AMDGPU: Make i1/i64/v2i32 and/or/xor legalMatt Arsenault2018-12-208-36/+354
| | | | | | | The 64-bit types do depend on the register bank, but that's another issue to deal with later. llvm-svn: 349716
* AMDGPU/GlobalISel: Fix ValueMapping tables for i1Matt Arsenault2018-12-203-28/+98
| | | | | | | This was incorrectly selecting SGPR for any i1 values, e.g. G_TRUNC to i1 from a VGPR was still an SGPR. llvm-svn: 349715
* [X86] Disable custom widening of signed/unsigned add/sub saturation ↵Craig Topper2018-12-201-7/+10
| | | | | | | | intrinsics under -x86-experimental-vector-widening-legalization. Generic legalization should take care of this. llvm-svn: 349714
* [lldbsuite] Un-xfail tests on Windows that are now passing (pt.4)Stella Stamenova2018-12-2014-41/+2
| | | | | | This is a set of tests that were all marked as failing becuse of several different bugs. A couple of the bugs are now resolved as fixed since all the tests that were failing associated with the bug are now passing. It is possible that some of them are false positives, but there's a large number of unexpectedly passing tests on Windows, so I am doing a bulk un-xfail to get the buildbot to green. llvm-svn: 349713
* [AArch64][GlobalISel] Implement selection og G_MERGE of two s32s into s64.Amara Emerson2018-12-202-0/+84
| | | | | | | | | | | | | This code pattern is an unfortunate side effect of the way some types get split at call lowering. Ideally we'd either not generate it at all or combine it away in the legalizer artifact combiner. Until then, add selection support anyway which is a significant proportion of our current fallbacks on CTMark. rdar://46491420 llvm-svn: 349712
* [lldbsuite] Un-xfail tests on Windows that are now passing (pt.3)Stella Stamenova2018-12-205-12/+4
| | | | | | This is a set of tests that were all marked as failing becuse of several different bugs. A couple of the bugs are now resolved as fixed since all the tests that were failing associated with the bug are now passing. It is possible that some of them are false positives, but there's a large number of unexpectedly passing tests on Windows, so I am doing a bulk un-xfail to get the buildbot to green. llvm-svn: 349711
* [binutils] NFC: fix clang-tidy warning: use empty() instead of size() == 0Jordan Rupprecht2018-12-2011-31/+30
| | | | llvm-svn: 349710
* AMDGPU/GlobalISel: RegBankSelect for fp conversionsMatt Arsenault2018-12-206-0/+119
| | | | llvm-svn: 349709
* AMDGPU/GlobalISel: Legality/regbankselect for atomicrmw/atomic_cmpxchgMatt Arsenault2018-12-2027-0/+1436
| | | | llvm-svn: 349708
* [asan] Undo special treatment of linkonce_odr and weak_odrVitaly Buka2018-12-202-5/+3
| | | | | | | | | | | | | | Summary: On non-Windows these are already removed by ShouldInstrumentGlobal. On Window we will wait until we get actual issues with that. Reviewers: pcc Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55899 llvm-svn: 349707
* [asan] Prevent folding of globals with redzonesVitaly Buka2018-12-206-10/+14
| | | | | | | | | | | | | | | | | | | | | Summary: ICF prevented by removing unnamed_addr and local_unnamed_addr for all sanitized globals. Also in general unnamed_addr is not valid here as address now is important for ODR violation detector and redzone poisoning. Before the patch ICF on globals caused: 1. false ODR reports when we register global on the same address more than once 2. globals buffer overflow if we fold variables of smaller type inside of large type. Then the smaller one will poison redzone which overlaps with the larger one. Reviewers: eugenis, pcc Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55857 llvm-svn: 349706
* [asan] Disable test incompatible with new AndroidVitaly Buka2018-12-201-0/+4
| | | | llvm-svn: 349705
* [gn build] Make `ninja check-lld` also run LLD's unit testsNico Weber2018-12-206-2/+107
| | | | | | | | | | And add build files for gtest. With this, the build files for //lld are complete. Differential Revision: https://reviews.llvm.org/D55838 llvm-svn: 349704
* [DwarfExpression] Fix a typo in a doxygen comment. NFC.Matt Davis2018-12-201-1/+1
| | | | llvm-svn: 349703
* [gn build] Add check-lld target and make it workNico Weber2018-12-196-20/+327
| | | | | | | | | | | | | | | | | | | | | | Also add a build file for llvm-lit, which in turn needs llvm/tools/llvm-config. With this, check-lld runs and passes all of lld's lit tests. It doesn't run any of its unit tests yet. Running just ninja -C out/gn will build all prerequisites needed to run tests, but it won't run the tests (so that the build becomes clean after one build). Running ninja -C out/gn check-lld will build prerequisites if needed and run the tests. The check-lld target never becomes clean and runs tests every time. llvm-config's build file is a bit gnarly: Everything not needed to run tests is basically stubbed out. Also, to generate LibraryDependencies.inc we shell out to llvm-build at build-time. It would be much nicer to get the library dependencies by using the dependency data the GN build contains (http://llvm-cs.pcc.me.uk/gen/tools/llvm-config/LibraryDependencies.inc#1). Differential Revision: https://reviews.llvm.org/D55836 llvm-svn: 349702
* [analyzer] pr38668: Do not attempt to cast loaded values of non-scalar types.Artem Dergachev2018-12-193-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | It is expected to have the same object (memory region) treated as if it has different types in different program points. The correct behavior for RegionStore when an object is stored as an object of type T1 but loaded as an object of type T2 is to store the object as if it has type T1 but cast it to T2 during load. Note that the cast here is some sort of a "reinterpret_cast" (even in C). For instance, if you store a float and load an integer, you won't have your float rounded to an integer; instead, you will have garbage. Admit that we cannot perform the cast as long as types we're dealing with are non-trivial (neither integers, nor pointers). Of course, if the cast is not necessary (eg, T1 == T2), we can still load the value just fine. Differential Revision: https://reviews.llvm.org/D55875 rdar://problem/45062567 llvm-svn: 349701
* Simplify code for readability. (NFC)Adrian Prantl2018-12-191-6/+3
| | | | llvm-svn: 349700
* [sanitizer] Support running without fd 0,1,2.Evgeniy Stepanov2018-12-198-10/+76
| | | | | | | | | | | | | | | | | Summary: Support running with no open file descriptors (as may happen to "init" process on linux). * Remove a check that writing to stderr succeeds. * When opening a file (ex. for log_path option), dup the new fd out of [0, 2] range to avoid confusing the program. Reviewers: pcc, vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D55801 llvm-svn: 349699
* [analyzer] GenericTaint: Fix formatting to prepare for incoming improvements.Artem Dergachev2018-12-191-107/+107
| | | | | | | | Patch by Gábor Borsik! Differential Revision: https://reviews.llvm.org/D54918 llvm-svn: 349698
* Simplify. NFC.Rui Ueyama2018-12-191-7/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D55903 llvm-svn: 349697
OpenPOWER on IntegriCloud