summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors.Evgeniy Stepanov2019-03-014-21/+29
| | | | | | They return void, unlike memset/memcpy/memmove. llvm-svn: 355225
* [TableGen][SelectionDAG][X86] Add specific isel matchers for ↵Craig Topper2019-03-0112-68/+137
| | | | | | | | | | | | | | immAllZerosV/immAllOnesV. Remove bitcasts from X86 patterns that are no longer necessary. Previously we had build_vector PatFrags that called ISD::isBuildVectorAllZeros/Ones. Internally the ISD::isBuildVectorAllZeros/Ones look through bitcasts, but we aren't able to take advantage of that in isel. Instead of we have to canonicalize the types of the all zeros/ones build_vectors and insert bitcasts. Then we have to pattern match those exact bitcasts. By emitting specific matchers for these 2 nodes, we can make isel look through any bitcasts without needing to explicitly match them. We should also be able to remove the canonicalization to vXi32 from lowering, but I've left that for a follow up. This removes something like 40,000 bytes from the X86 isel table. Differential Revision: https://reviews.llvm.org/D58595 llvm-svn: 355224
* [ValueTracking] Known bits support for unsigned saturating add/subNikita Popov2019-03-012-0/+102
| | | | | | | | | | | | | | | | We have two sources of known bits: 1. For adds leading ones of either operand are preserved. For sub leading zeros of LHS and leading ones of RHS become leading zeros in the result. 2. The saturating math is a select between add/sub and an all-ones/ zero value. As such we can carry out the add/sub known bits calculation, and only preseve the known one/zero bits respectively. Differential Revision: https://reviews.llvm.org/D58329 llvm-svn: 355223
* [InstCombine] Extend saturating idempotent atomicrmw transform to FPPhilip Reames2019-03-012-5/+13
| | | | | | | | I'm assuming that the nan propogation logic for InstructonSimplify's handling of fadd and fsub is correct, and applying the same to atomicrmw. Differential Revision: https://reviews.llvm.org/D58836 llvm-svn: 355222
* [InstCombine] move add after umin/umaxSanjay Patel2019-03-012-33/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the motivating cases from PR14613: https://bugs.llvm.org/show_bug.cgi?id=14613 ...moving the add enables us to narrow the min/max which eliminates zext/trunc which enables signficantly better vectorization. But that bug is still not completely fixed. https://rise4fun.com/Alive/5KQ Name: umax Pre: C1 u>= C0 %a = add nuw i8 %x, C0 %cond = icmp ugt i8 %a, C1 %r = select i1 %cond, i8 %a, i8 C1 => %c2 = icmp ugt i8 %x, C1-C0 %u2 = select i1 %c2, i8 %x, i8 C1-C0 %r = add nuw i8 %u2, C0 Name: umin Pre: C1 u>= C0 %a = add nuw i32 %x, C0 %cond = icmp ult i32 %a, C1 %r = select i1 %cond, i32 %a, i32 C1 => %c2 = icmp ult i32 %x, C1-C0 %u2 = select i1 %c2, i32 %x, i32 C1-C0 %r = add nuw i32 %u2, C0 llvm-svn: 355221
* [InstCombine] add tests for umin/umax narrowing (PR14613); NFCSanjay Patel2019-03-011-0/+34
| | | | llvm-svn: 355220
* Revert "[MIPS GlobalISel] Fix mul operands"Vlad Tsyrklevich2019-03-015-60/+35
| | | | | | | This reverts commit r355178, it is causing ASan failures on the sanitizer bots. llvm-svn: 355219
* ELF: Change FileSize back to a uint64_t.Peter Collingbourne2019-03-015-3/+24
| | | | | | | | | This lets us detect file size overflows when creating a 64-bit binary on a 32-bit machine. Differential Revision: https://reviews.llvm.org/D58840 llvm-svn: 355218
* [LICM] Infer proper alignment from loads during scalar promotionPhilip Reames2019-03-013-15/+33
| | | | | | | | | | This patch fixes an issue where we would compute an unnecessarily small alignment during scalar promotion when no store is not to be guaranteed to execute, but we've proven load speculation safety. Since speculating a load requires proving the existing alignment is valid at the new location (see Loads.cpp), we can use the alignment fact from the load. For non-atomics, this is a performance problem. For atomics, this is a correctness issue, though an *incredibly* rare one to see in practice. For atomics, we might not be able to lower an improperly aligned load or store (i.e. i32 align 1). If such an instruction makes it all the way to codegen, we *may* fail to codegen the operation, or we may simply generate a slow call to a library function. The part that makes this super hard to see in practice is that the memory location actually *is* well aligned, and instcombine knows that. So, to see a failure, you have to have a) hit the bug in LICM, b) somehow hit a depth limit in InstCombine/ValueTracking to avoid fixing the alignment, and c) then have generated an instruction which fails codegen rather than simply emitting a slow libcall. All around, pretty hard to hit. Differential Revision: https://reviews.llvm.org/D58809 llvm-svn: 355217
* [PGO] Remove the default parameter in ProfileSummary API. NFCRong Xu2019-03-012-5/+2
| | | | | | | Remove the default parameter in setProfileSummary() and getSummary(). This is a follow-up of r355131. llvm-svn: 355216
* [Tests] More missing atomicrmw combinesPhilip Reames2019-03-011-0/+25
| | | | llvm-svn: 355215
* [msan] Add an interceptor for ttyname().Evgeniy Stepanov2019-03-013-3/+22
| | | | llvm-svn: 355214
* Resubmit r354706 with a fix for process launch.Jim Ingham2019-03-0112-63/+121
| | | | | | | | | | | | | | | When the debugger is run in sync mode, you need to be able to tell whether a hijacked resume is for some special purpose (like waiting for the SIGSTOP on attach) or just to perform a synchronous resume. Target::Launch was doing that wrong, and that caused stop-hooks on process launch in source files to behave incorrectly. <rdar://problem/48115661> Differential Revision: https://reviews.llvm.org/D58727 llvm-svn: 355213
* [Tests] Add tests for missed optimizations of saturating and idempotent FP ↵Philip Reames2019-03-011-0/+23
| | | | | | atomicrmws llvm-svn: 355212
* [lld][test] Fix tests. llvm-readobj now emits symbol section names.Matt Davis2019-03-012-2/+2
| | | | | | | This is the result of patch 99e9c4cad08164b9c0ca565ab9ad48ce132e98e5 See the related patch https://reviews.llvm.org/D58796 llvm-svn: 355211
* [InstCombine] Extend "idempotent" atomicrmw optimizations to floating pointPhilip Reames2019-03-012-2/+40
| | | | | | | | | | An idempotent atomicrmw is one that does not change memory in the process of execution. We have already added handling for the various integer operations; this patch extends the same handling to floating point operations which were recently added to IR. Note: At the moment, we canonicalize idempotent fsub to fadd when ordering requirements prevent us from using a load. As discussed in the review, I will be replacing this with canonicalizing both floating point ops to integer ops in the near future. Differential Revision: https://reviews.llvm.org/D58251 llvm-svn: 355210
* [PGO] Use the explicit parameter in ProfileSummary API. NFCRong Xu2019-03-011-1/+4
| | | | | | | Use the explicit parameter in setProfileSummary() and getSummary(). This is a follow-up of r355131. llvm-svn: 355209
* Revert "[WebAssembly] Lower SIMD shifts since they are fixed in V8"Thomas Lively2019-03-011-0/+5
| | | | | | They weren't fixed in V8. Oops. llvm-svn: 355208
* [llvm-readobj] Display section names for STT_SECTION symbols.Matt Davis2019-03-0110-25/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch will obtain the section name for symbols that refer to a section. Prior to this patch the Name field for STT_SECTIONs was blank, now it is populated. Before: ``` Symbol table '.symtab' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_ 5: 0000000000000000 0 TLS GLOBAL DEFAULT UND sym ``` With this patch: ``` Symbol table '.symtab' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1 .text 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 .data 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 .bss 4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_ 5: 0000000000000000 0 TLS GLOBAL DEFAULT UND sym ``` This fixes PR40788 Reviewers: jhenderson, rupprecht, espindola Reviewed By: rupprecht Subscribers: emaste, javed.absar, arichardson, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58796 llvm-svn: 355207
* [InstCombine] add tests for add+umin/umax canonicalization; NFCSanjay Patel2019-03-011-0/+227
| | | | | | | Fixing this should solve the biggest part of the vector problems seen in: https://bugs.llvm.org/show_bug.cgi?id=14613 llvm-svn: 355206
* Hide two unused debugging methods, NFCI.Jonas Hahnfeld2019-03-012-0/+8
| | | | | | | | GCC correctly moans that PlainCFGBuilder::isExternalDef(llvm::Value*) and StackSafetyDataFlowAnalysis::verifyFixedPoint() are defined but not used in Release builds. Hide them behind 'ifndef NDEBUG'. llvm-svn: 355205
* Reland "[compiler-rt] Intercept the bcmp() function."Clement Courbet2019-03-018-28/+89
| | | | | | | Fix test issues on darwin: The REQUIRES for the test should be the same as the guard for whether we intercept bcmp. llvm-svn: 355204
* [scudo][standalone] Fix tests makefileKostya Kortchinsky2019-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: A missing `STATIC` entailed some annoying to debug failures wrt 32 vs 64 binaries. Additionally I noticed I was using the wrong variable (the Scudo one as opposed to the Scudo Standalone one). See https://reviews.llvm.org/D58184#1412417 and below for discussion. Reviewers: vitalybuka, eugenis, brzycki Reviewed By: vitalybuka, brzycki Subscribers: mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D58794 llvm-svn: 355203
* Try to fix NetBSD buildbot breakage introduced in D57463.Manman Ren2019-03-011-0/+1
| | | | | | By including the header file in the source. llvm-svn: 355202
* [ARM] Fix FP16 stack loads/stores for Thumb2 with frame pointerOliver Stannard2019-03-012-2/+24
| | | | | | | | | | The new addressing mode added for the v8.2A FP16 instructions uses bit 8 of the immediate to encode the sign of the offset, like the other FP loads/stores, so need to be treated the same way. Differential revision: https://reviews.llvm.org/D58816 llvm-svn: 355201
* [clangd] Enable SuggestMissingIncludes by default.Eric Liu2019-03-011-1/+1
| | | | | | | | | | | | | | Summary: This seems to work stably now. Turn on by default. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58772 llvm-svn: 355200
* [ARM] Consider undefined-on-NaN conditions in checkVSELConstraintsOliver Stannard2019-03-012-39/+257
| | | | | | | | | | This function was not checking for the condition code variants which are undefined if either input is NaN, so we were missing selection of the VSEL instruction in some cases when using -fno-honor-nans or -ffast-math. Differential revision: https://reviews.llvm.org/D58812 llvm-svn: 355199
* [X86] Regenerate legalize test filesSimon Pilgrim2019-03-012-84/+151
| | | | | | Noticed while getting update_mir_test_checks.py to work on python3 llvm-svn: 355198
* [Thumb] Add some integer abs testcases for different typesizes.Simon Pilgrim2019-03-011-15/+53
| | | | | | | | Committed on behalf of @ikulagin (Ivan Kulagin) Differential Revision: https://reviews.llvm.org/D52138 llvm-svn: 355197
* [LLD][ELF] - Convert 3 testcases to use yaml instead of binaries.George Rimar2019-03-015-13/+59
| | | | | | | | This change makes 3 tests to use yaml instead of binaries. Differential revision: https://reviews.llvm.org/D58780 llvm-svn: 355196
* [ELF][ARM] Fix clang-armv7-linux-build-cache builds of LLD [NFC]Peter Smith2019-03-011-1/+1
| | | | | | | | r355153 introduced a build failure on a build bot that uses clang natively on an armv7-a machine. This a temporary fix to use size_t rather than uint64_t. llvm-svn: 355195
* [LLD][ELF] - Convert invalid/undefined-local-symbol-in-dso.test to use YAMLGeorge Rimar2019-03-012-56/+17
| | | | | | | | This removes a binary from the inputs and reduces the test case. Differential revision: https://reviews.llvm.org/D58783 llvm-svn: 355194
* [yaml2obj] - Allow setting custom sh_info for RawContentSection sections.George Rimar2019-03-017-7/+98
| | | | | | | | | | | This is for tweaking SHT_SYMTAB sections. Their sh_info contains the (number of symbols + 1) usually. But for creating invalid inputs for test cases it would be convenient to allow explicitly override this field from YAML. Differential revision: https://reviews.llvm.org/D58779 llvm-svn: 355193
* Attempt to fix buildbot after r354972 [#2]. NFCI.Alexey Lapshin2019-03-011-1/+14
| | | | llvm-svn: 355192
* [ARM GlobalISel] Support G_CTLZ for Thumb2Diana Picus2019-03-013-7/+34
| | | | | | Same as ARM mode but with different opcode. llvm-svn: 355191
* [Driver] Allow enum SanitizerOrdinal to represent more than 64 different ↵Pierre Gousseau2019-03-0111-145/+323
| | | | | | | | | | | | | | | sanitizer checks, NFC. enum SanitizerOrdinal has reached maximum capacity, this change extends the capacity to 128 sanitizer checks. This can eventually allow us to add gcc 8's options "-fsanitize=pointer-substract" and "-fsanitize=pointer-compare". This is a recommit of r354873 but with a fix for unqualified lookup error in lldb cmake build bot. Fixes: https://llvm.org/PR39425 Differential Revision: https://reviews.llvm.org/D57914 llvm-svn: 355190
* [ARM GlobalISel] Check target flags in test. NFCIDiana Picus2019-03-012-12/+12
| | | | | | | | There was a time when we couldn't dump target-specific flags such as arm-sbrel etc, so the tests didn't check for them. We can now be more specific in our tests. llvm-svn: 355189
* Fix file headers. NFCFangrui Song2019-03-0122-22/+22
| | | | llvm-svn: 355188
* [Tablegen] Add support for the !mul operator.Nicola Zaghen2019-03-018-8/+30
| | | | | | | | | This is a small addition to arithmetic operations that improves expressiveness of the language. Differential Revision: https://reviews.llvm.org/D58775 llvm-svn: 355187
* [ARM] Add armv8a triple to test check updatersOliver Stannard2019-03-011-0/+1
| | | | llvm-svn: 355186
* [CommandLine] Allow grouping options which can have values.Igor Kudrin2019-03-015-52/+236
| | | | | | | | | | | | | | | | This patch allows all forms of values for options to be used at the end of a group. With the fix, it is possible to follow the way GNU binutils tools handle grouping options better. For example, the -j option can be used with objdump in any of the following ways: $ objdump -d -j .text a.o $ objdump -d -j.text a.o $ objdump -dj .text a.o $ objdump -dj.text a.o Differential Revision: https://reviews.llvm.org/D58711 llvm-svn: 355185
* [CommandLine] Do not crash if an option has both ValueRequired and Grouping.Igor Kudrin2019-03-013-5/+31
| | | | | | | | | | | | If an option, which requires a value, has a `cl::Grouping` formatting modifier, it works well as far as it is used at the end of a group, or as a separate argument. However, if the option appears accidentally in the middle of a group, the program just crashes. This patch prints an error message instead. Differential Revision: https://reviews.llvm.org/D58499 llvm-svn: 355184
* [llvm-readobj]Add test showing behaviour of thin archive member path printingJames Henderson2019-03-011-0/+33
| | | | | | | | | | This was a test requested in https://reviews.llvm.org/D58677. Reviewed by: rupprecht, grimar, Higuoxing Differential Revision: https://reviews.llvm.org/D5877 llvm-svn: 355183
* [clang-format] [NFC] clang-format the Format libraryPaul Hoad2019-03-0112-123/+96
| | | | | | | | | | | Previously revisions commited non-clang-formatted changes to the Format library, this means submitting any revision e.g. {D55170} can cause additional whitespace changes to potentially be included in a revision. Commit a non functional change using latest build Windows clang-format r351376 with no other changes, to remove these differences All FormatTests pass [==========] 652 tests from 20 test cases ran. llvm-svn: 355182
* CodeGen: Fix PR40605 by splitting constant struct initializersAlexander Potapenko2019-03-012-160/+323
| | | | | | | | | | | | | | When emitting initializers for local structures for code built with -ftrivial-auto-var-init, replace constant structures with sequences of stores. This appears to greatly help removing dead initialization stores to those locals that are later overwritten by other data. This also removes a lot of .rodata constants (see PR40605), replacing most of them with immediate values (for Linux kernel the .rodata size is reduced by ~1.9%) llvm-svn: 355181
* [sanitizers] Explicitly use GetModuleFileNameW with wchar_tMartin Storsjo2019-03-011-1/+1
| | | | | | | | Alternatively we could define the string as TCHAR. Differential Revision: https://reviews.llvm.org/D58766 llvm-svn: 355180
* [AMDGPU] Mark ds instructions as meybeAtomicStanislav Mekhanoshin2019-03-012-46/+47
| | | | | | | | | | | | These were not recognized as potential atomics by memory legalizer. The test was working not because legalizer did a right thing, but because it has skipped all these instructions. When I have fixed DS desciption test started to fail because region address has changed from 4 to 2 a while ago. Differential Revision: https://reviews.llvm.org/D58802 llvm-svn: 355179
* [MIPS GlobalISel] Fix mul operandsPetar Avramovic2019-03-015-35/+60
| | | | | | | | | | | | | | | | | Unsigned mul high for MIPS32 is selected into two PseudoInstructions: PseudoMULTu and PseudoMFHI that use accumulator register class ACC64 for some of its operands. Registers in this class have appropriate hi and lo register as subregisters: $lo0 and $hi0 are subregisters of $ac0 etc. mul instruction implicit-defs $lo0 and $hi0 according to MipsInstrInfo.td. In functions where mul and PseudoMULTu are present fastRegisterAllocator will "run out of registers during register allocation" because 'calcSpillCost' for $ac0 will return spillImpossible because subregisters $lo0 and $hi0 of $ac0 are reserved by mul instruction above. A solution is to mark implicit-defs of $lo0 and $hi0 as dead in mul instruction. Differential Revision: https://reviews.llvm.org/D58715 llvm-svn: 355178
* [MIPS GlobalISel] Select G_UMULHPetar Avramovic2019-03-017-1/+153
| | | | | | | | Legalize G_UMULO and select G_UMULH for MIPS32. Differential Revision: https://reviews.llvm.org/D58714 llvm-svn: 355177
* Fix file headers. NFCFangrui Song2019-03-0129-51/+50
| | | | llvm-svn: 355176
OpenPOWER on IntegriCloud