summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Improve legalization of vXi16/vXi8 selects.Craig Topper2018-01-146-73/+84
| | | | | | | | Extend vXi1 conditions of vXi8/vXi16 selects even before type legalization gets a chance to split wide vectors. Previously we would only extend 128 and 256 bit vectors. But if we start with a 512 bit vector or wider that needs to be split we wouldn't extend until after the split had taken place. By extending early we improve the results of type legalization. Don't widen condition of 128/256 bit vXi16/vXi8 selects when we have BWI but not VLX. We can still use a mask register by widening the select to 512-bits instead. This is similar to what we do for compares already. llvm-svn: 322450
* [X86] Add an avx512bw command line to the avx512-vec-cmp.ll test. Add some ↵Craig Topper2018-01-141-143/+283
| | | | | | | | additional test cases. Additional test cases cover selects with i16/i8 conditions that are only 128/256-bits wide, but the compares are 512-bits wide and can only produce k-registers. We should be able to artificially widen the selects to avoid moving the k-register to an xmm/ymm register. llvm-svn: 322449
* [clang-format] [NFC] Remove commentMark Zeren2018-01-131-2/+0
| | | | | | Remove inaccurate comment that came in with r312125. llvm-svn: 322448
* [docs] Use monospace for PCH option flagsBrian Gesiak2018-01-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use monospace for option flags in the PCH section, instead of the italics that were being used previously. I believe these used to be links, for which single backticks would have been appropriate, but since they were un-link-ified in https://reviews.llvm.org/rL275560, I believe monospace is now more appropriate, and so two backticks are needed. Test Plan: Build the `docs-clang-html` target and confirm the options are rendered using monospace font. Reviewers: sepavloff, aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42005 llvm-svn: 322447
* X86: Add pattern matching for PMADDWDZvi Rackover2018-01-132-555/+237
| | | | | | | | | | | | | | | In addition to the existing match as part of a loop-reduction, add a straightforward pattern match for DAG-contained patterns. Reviewers: RKSimon, craig.topper Subscribers: llvm-commits Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D41811 llvm-svn: 322446
* [Driver] Add "did you mean?" suggestions to -cc1asBrian Gesiak2018-01-132-1/+12
| | | | | | | | | | | | | | | | | | | | | | Summary: In https://reviews.llvm.org/D41733, the driver was modified such that, when a user provided a mispelled option such as `-hel`, it would suggest a valid option with a nearby edit distance: "did you mean '-help'?". Add these suggestions to invocations of `clang -cc1as` as well. Test Plan: `check-clang` Reviewers: v.g.vassilev, bruno Reviewed By: v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42001 llvm-svn: 322445
* [X86] Regenerate double shift testsSimon Pilgrim2018-01-133-47/+70
| | | | llvm-svn: 322444
* [clangd] Fix uninitialized-read found by asanSam McCall2018-01-132-3/+16
| | | | llvm-svn: 322443
* [WebAssembly] Fix build failures due to warningSam Clegg2018-01-131-0/+2
| | | | | | | | Oops, the waterfall tests with `-Werror -Wunused-variable`. Differential Revision: https://reviews.llvm.org/D42028 llvm-svn: 322442
* Revert "[WebAssembly] Move checking of InputSegment comdat group earlier"Sam Clegg2018-01-132-8/+6
| | | | | | This reverts commit 7421eab7ccf2e14518f4526a084a5afc76ac9c6a. llvm-svn: 322441
* [WebAssembly] Move checking of InputSegment comdat group earlierSam Clegg2018-01-132-6/+8
| | | | | | | This should also fixe an unused varaible warning in the realeae build. llvm-svn: 322440
* [InstSimplify] fold implied null ptr check (PR35790)Sanjay Patel2018-01-132-39/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This extends rL322327 to handle the pointer cast and should solve: https://bugs.llvm.org/show_bug.cgi?id=35790 Name: or_eq_zero %isnull = icmp eq i64* %p, null %x = ptrtoint i64* %p to i64 %somebits = and i64 %x, %y %somebits_are_zero = icmp eq i64 %somebits, 0 %or = or i1 %somebits_are_zero, %isnull => %or = %somebits_are_zero Name: and_ne_zero %isnotnull = icmp ne i64* %p, null %x = ptrtoint i64* %p to i64 %somebits = and i64 %x, %y %somebits_are_not_zero = icmp ne i64 %somebits, 0 %and = and i1 %somebits_are_not_zero, %isnotnull => %and = %somebits_are_not_zero https://rise4fun.com/Alive/CQ3 llvm-svn: 322439
* [Sema] Fix crash for type-dependent base classesJan Korous2018-01-132-0/+16
| | | | llvm-svn: 322438
* [Sanitizers, LSan, Darwin] Allow for lack of VM_MEMORY_OS_ALLOC_ONCEFrancis Ricci2018-01-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Some time ago, the sanitizers as of r315899 were imported into gcc mainline. This broke bootstrap on Darwin 10 and 11, as reported in GCC PR sanitizer/82824 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82824) due to the unconditional use of VM_MEMORY_OS_ALLOC_ONCE. This was only introduced in Darwin 13/Mac OS X 10.9. The use of the macro was introduced in r300450. I couldn't find any statement which Darwin versions are supposed to be supported by LLVM, but the trivial patch to use the macro only if present allowed the gcc bootstrap to finish. So far, I haven't tried building llvm/compiler-rt on Darwin 11. Maybe the patch is simple enough to go in nonetheless. Committing on behalf of ro. Reviewers: glider, fjricci, kcc, kuba, kubamracek, george.karpenkov Reviewed By: fjricci Subscribers: #sanitizers, zaks.anna, srhines, dberris, kubamracek, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D39888 llvm-svn: 322437
* [X86][MMX] Add test for MMX zero foldingSimon Pilgrim2018-01-131-0/+113
| | | | | | As discussed in D41908 llvm-svn: 322436
* Fix test/Driver/riscv32-toolchain.c for builds setting CLANG_DEFAULT_LINKERAlex Bradbury2018-01-131-2/+2
| | | | | | | | Petr Hosek reported an external buildbot was failing on riscv32-toolchain.c, seemingly as it set CLANG_DEFAULT_LINKER to lld. Address this by explicitly setting -fuse-ld=ld in the tests. llvm-svn: 322435
* X86 Tests: add more pamddwd cases. NFCZvi Rackover2018-01-131-0/+482
| | | | | | Improve coverage of D41811 llvm-svn: 322434
* [lldb] Add support to cache a PDB's global scope and fix a bug in getting ↵Aaron Smith2018-01-136-72/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the source file name for a compiland Summary: This commit is a combination of the following changes: - Cache PDB's global scope (executable) in SymbolFilePDB - Change naming of `cu` to `compiland` which is PDB specific - Change ParseCompileUnitForSymIndex to ParseCompileUnitForUID. Prefer using a common name `UID` instead of PDB's `System Index` Adding one more argument `index` to this method, which is used to specify the index of the compile unit in a cached compile unit array - Add GetPDBCompilandByUID method to simply code - Fix a bug in getting the source file name for a PDB compiland. For some reason, PDBSymbolCompiland::getSourceFileName() could return an empty name, so if that is true, we have to walk through all source files of this compiland and determine the right source file used to generate this compiland based on language indicated. The previous implementation called PDBSession::findOneSourceFile method to get its name for the compiland. This is not accurate since the `one source file` found could be a header other than source file. Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41428 llvm-svn: 322433
* [X86] Add DAG combine to promote vXi1 result of a vXi8/vXi16 setcc when we ↵Craig Topper2018-01-133-101/+87
| | | | | | | | have AVX512 but not BWI. This avoids having the result type stick around until lowering where we have to extend the setcc and insert a truncate. If we get the types converted early we can do more to optimize it. llvm-svn: 322432
* DR126: partially implement the const-correct rules for exception handler ↵Richard Smith2018-01-136-122/+224
| | | | | | | | | matching. While here, fix up the myriad other ways in which Sema's two "can this handler catch that exception?" implementations get things wrong and unify them. llvm-svn: 322431
* XFAIL a test on Darwin, line-table stuck on DWARF 2Paul Robinson2018-01-131-0/+3
| | | | llvm-svn: 322430
* [hwasan] An LLVM flag to disable stack tag randomization.Evgeniy Stepanov2018-01-135-16/+72
| | | | | | | | | | | | Summary: Necessary to achieve consistent test results. Reviewers: kcc, alekseyshl Subscribers: kubamracek, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D42023 llvm-svn: 322429
* Revert "[SanitizerCoverage][Fuchsia] Make TracePcGuardController ↵Petr Hosek2018-01-131-6/+6
| | | | | | | | linker-initialized" This reverts commit r322424: this broke the tsan lint check. llvm-svn: 322428
* Remove unused addIfPresent function.Eric Christopher2018-01-131-4/+0
| | | | llvm-svn: 322427
* Remove extraneous semicolon.Eric Christopher2018-01-131-1/+1
| | | | llvm-svn: 322426
* [MachineOutliner] Move hasAddressTaken check to MachineOutliner.cppJessica Paquette2018-01-133-6/+4
| | | | | | | | | | | | | *Mostly* NFC. Still updating the test though just for completeness. This moves the hasAddressTaken check to MachineOutliner.cpp and replaces it with a per-basic block test rather than a per-function test. The old test was too conservative and was preventing functions in C programs from being outlined even though they were safe to outline. This was mostly a problem in C sources. llvm-svn: 322425
* [SanitizerCoverage][Fuchsia] Make TracePcGuardController linker-initializedPetr Hosek2018-01-131-6/+6
| | | | | | | | | | It was always intended to be. Patch By: mcgrathr Differential Revision: https://reviews.llvm.org/D41513 llvm-svn: 322424
* [WebAssembly] Use ArrayRef over raw pointersSam Clegg2018-01-133-15/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D42013 llvm-svn: 322423
* Switch from Bourne shell to simply base shell to build libfuzzerKamil Rytarowski2018-01-121-1/+1
| | | | | | | | | | | | | | Summary: It is not necessary launching the build script with bash. Reviewers: krytarowski Reviewed By: krytarowski Subscribers: llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42008 llvm-svn: 322422
* Fix incorrect physical address on self-referencing AT command.Rafael Espindola2018-01-122-8/+71
| | | | | | | | | | | | When a section placement (AT) command references the section itself, the physical address of the section in the ELF header was calculated incorrectly due to alignment happening right after the location pointer's value was captured. The problem was diagnosed and the first version of the patch written by Erick Reyes. llvm-svn: 322421
* Try to suppress Windows testing again.Richard Trieu2018-01-121-1/+1
| | | | llvm-svn: 322420
* [AMDGPU] stop image_store being moved illegallyTim Renouf2018-01-123-26/+62
| | | | | | | | | | | | | | | | | | | | Summary: A recent change 321556: AMDGPU: Remove mayLoad/hasSideEffects from MIMG stores can allow the machine instruction scheduler to move an image store past an image load using the same descriptor. V2: Fixed by marking image ops as mayAlias and isAliased. This may be overly conservative, and we may need to revisit. V3: Reverted test change done on 321556. Reviewers: arsenm, nhaehnle, dstuttard Subscribers: llvm-commits, t-tye, yaxunl, wdng, kzhuravl Differential Revision: https://reviews.llvm.org/D41969 llvm-svn: 322419
* We have two sources for path remapping information that we get outJason Molenda2018-01-122-37/+47
| | | | | | | | | | | | | | | | | of a dSYM per-uuid plist that may be present (dsymutil does not create this plist, it is only added after the fact by additional tools) -- either the DBGBuildSourcePath + DBGSourcePath pair of k-v entries which give us the build-time and debug-time remapping, or the newer DBGSourcePathRemapping dictionary which may give us multiple remappings. I'm changing the order that we process these & add them to the list of source remappings. If the DBGSourcePathRemapping dict is present, it should be the first entries we will try. <rdar://problem/36481989> llvm-svn: 322418
* Fix test on Windows that was added in r322382.Douglas Yung2018-01-121-6/+6
| | | | | | | | The test was using "%clang++" which on Windows became "clang.exe++". Use %clangxx instead. Reviewed by Paul Robinson llvm-svn: 322417
* Do not pass an argument that can be easily inferred from other argument.Rui Ueyama2018-01-123-5/+5
| | | | llvm-svn: 322416
* [WebAssembly] Add COMDAT supportSam Clegg2018-01-1210-23/+251
| | | | | | | | | | | | | | | | | | See https://bugs.llvm.org/show_bug.cgi?id=35533, and D40844 Things covered: * Removing duplicate data segments (as determined by COMDATs emitted by the frontend) * Removing duplicate globals and functions in COMDATs * Checking that each time a COMDAT is seen it has the same symbols as at other times (ie it's a stronger check than simply giving all the symbols in the COMDAT weak linkage) Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D40845 llvm-svn: 322415
* When rebuilding an InitListExpr, don't give it a type.Richard Smith2018-01-122-16/+23
| | | | | | | | InitListExprs without types (well, with type 'void') represent not-yet-analyzed initializer lists; InitListExpr with types fool Sema into thinking they don't need further analysis in some cases (particularly C++17 copy omission). llvm-svn: 322414
* [DWARFv5] Have -gdwarf-5 generate MD5 checksumsPaul Robinson2018-01-122-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D42011 llvm-svn: 322413
* [WebAssembly] Fix typo in file headerSam Clegg2018-01-121-1/+1
| | | | llvm-svn: 322412
* [InstSimplify] add tests for implied ptr cmp with null (PR35790); NFCSanjay Patel2018-01-121-2/+155
| | | | llvm-svn: 322411
* [analyzer] Don't flag strcpy of string literals into sufficiently large buffers.Artem Dergachev2018-01-122-0/+21
| | | | | | | | | | | | | | | In the security package, we have a simple syntactic check that warns about strcpy() being insecure, due to potential buffer overflows. Suppress that check's warning in the trivial situation when the source is an immediate null-terminated string literal and the target is an immediate sufficiently large buffer. Patch by András Leitereg! Differential Revision: https://reviews.llvm.org/D41384 llvm-svn: 322410
* [libFuzzer] Fix bug introduced in r322380 that always links -lc++.Matt Morehouse2018-01-121-1/+1
| | | | llvm-svn: 322409
* [WebAssembly] Add --export flag to force a symbol to be exportedSam Clegg2018-01-125-4/+54
| | | | | | | | | | This is useful for emscripten or other tools that want to selectively exports symbols without necessarily changing the source code. Differential Revision: https://reviews.llvm.org/D42003 llvm-svn: 322408
* Allow unaligned access to ELF file data structures.Rui Ueyama2018-01-124-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ELF specification says that all ELF data structures are aligned to their natural alignments both in memory and file. That means when we access mmap'ed ELF files, we could assume that all data structures are aligned properly. However, in reality, we assume that the data structures are aligned only to two bytes because .a files only guarantee that their member files are aligned to two bytes in archive files. So the data access is already unaligned. This patch relaxes the alignment requirement even more, so that we accept unaligned access to all ELF data structures. This patch in particular makes lld bug-compatible with icc. Intel C compiler doesn't seem to care about data alignment and generates unaligned relocation sections (https://bugs.llvm.org/show_bug.cgi?id=35854). I also saw another instance of compatibility issues with our internal tool which creates unaligned section headers. Because GNU linkers are not picky about alignment, looks like it is not uncommon that ELF-generating tools create unaligned files. There is a performance penalty with this patch on host machines on which unaligned access is expensive. x86 and AArch64 are fine. ARMv6 is a problem, but I don't think using ARMv6 machines as hosts is common, so I believe it's not a real problem. Differential Revision: https://reviews.llvm.org/D41978 llvm-svn: 322407
* Allocate and access NormalCleanupDest with the natural alignment of i32.John McCall2018-01-123-10/+11
| | | | | | | | | This alignment can be less than 4 on certain embedded targets, which may not even be able to deal with 4-byte alignment on the stack. Patch by Jacob Young! llvm-svn: 322406
* Disable test for Windows to fix Windows buildbots.Richard Trieu2018-01-121-0/+2
| | | | llvm-svn: 322405
* Update MSF File Documentation.Zachary Turner2018-01-121-12/+70
| | | | | | | | | | This adds some more detail about the PDB container format, specifically surrounding the layout of the Free Page Map. Patch by Colden Cullen Differential Revision: https://reviews.llvm.org/D41825 llvm-svn: 322404
* [NFC] Change MemIntrinsicInst::setAlignment() to take an unsigned instead of ↵Daniel Neilson2018-01-129-26/+29
| | | | | | | | | | | a Constant Summary: In preparation for https://reviews.llvm.org/D41675 this NFC changes this prototype of MemIntrinsicInst::setAlignment() to accept an unsigned instead of a Constant. llvm-svn: 322403
* AMDGPU/SI: Add d16 support for buffer intrinsics.Changpeng Fang2018-01-1216-52/+778
| | | | | | | | | | Differential Revision: https://reviews.llvm.org/D38906 Reviewers: Matt and Brian. llvm-svn: 322402
* [JumpThreading] Preservation of DT and LVI across the passBrian M. Rzycki2018-01-1215-99/+1308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: See D37528 for a previous (non-deferred) version of this patch and its description. Preserves dominance in a deferred manner using a new class DeferredDominance. This reduces the performance impact of updating the DominatorTree at every edge insertion and deletion. A user may call DDT->flush() within JumpThreading for an up-to-date DT. This patch currently has one flush() at the end of runImpl() to ensure DT is preserved across the pass. LVI is also preserved to help subsequent passes such as CorrelatedValuePropagation. LVI is simpler to maintain and is done immediately (not deferred). The code to perform the preversation was minimally altered and simply marked as preserved for the PassManager to be informed. This extends the analysis available to JumpThreading for future enhancements such as threading across loop headers. Reviewers: dberlin, kuhar, sebpop Reviewed By: kuhar, sebpop Subscribers: mgorny, dmgreen, kuba, rnk, rsmith, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D40146 llvm-svn: 322401
OpenPOWER on IntegriCloud