- Jul 21, 2020
-
-
Jameson Nash authored
The getAllOnesValue can only handle things that are bitcast from a ConstantInt, while here we bitcast through a pointer, so we may see more complex objects (like Array or Struct). Differential Revision: https://reviews.llvm.org/D83870 (cherry picked from commit 8b354cc8)
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D84070 (cherry picked from commit f07ddbc9)
-
- Jul 20, 2020
-
-
Hans Wennborg authored
The test fails in 32-bit Windows builds for unclear reasons: ld.lld: error: failed to open C:\src\llvm_package_1100-rc1\build32_stage0\tools\lld\test\ELF\Output\arm-exidx-range.s.tmp: The parameter is incorrect. (cherry picked from commit 8a197e0b)
-
Eric Astor authored
Summary: Remove unused function Reviewed By: lbenes Differential Revision: https://reviews.llvm.org/D83898 (cherry picked from commit 47a3b85a)
-
Craig Topper authored
This matches GNU assembler behavior. Operand size is determined only from the destination register. (cherry picked from commit 71b49aa4)
-
Craig Topper authored
[X86] Teach assembler parser to accept lsl and lar with a 64 or 32 source register when the destination is a 64 register. Previously we only accepted a 32-bit source with a 64-bit dest. Accepting 64-bit as well is more consistent with gas behavior. I think maybe we should accept 16 bit register as well, but I'm not sure. (cherry picked from commit 3c2a56a8)
-
Zakk Chen authored
Summary: 1. gcc uses `-march` and `-mtune` flag to chose arch and pipeline model, but clang does not have `-mtune` flag, we uses `-mcpu` to chose both infos. 2. Add SiFive e31 and u54 cpu which have default march and pipeline model. 3. Specific `-mcpu` with rocket-rv[32|64] would select pipeline model only, and use the driver's arch choosing logic to get default arch. Reviewers: lenary, asb, evandro, HsiangKai Reviewed By: lenary, asb, evandro Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D71124 (cherry picked from commit 294d1eae)
-
Max Kazantsev authored
An additional test that allows to check the correctness of handling the case of the same branch labels in the dominator when trying to replace select with phi-node. Patch By: Kirill Polushin Differential Revision: https://reviews.llvm.org/D84006 Reviewed By: mkazantsev (cherry picked from commit df6e185e)
-
Max Kazantsev authored
``` define i32 @test(i1 %cond) { entry: br i1 %cond, label %exit, label %exit exit: %result = select i1 %cond, i32 123, i32 456 ret i32 %result } ``` In this test, after applying transformation of replacing select with Phis, the result will be: ``` define i32 @test(i1 %cond) { entry: br i1 %cond, label %exit, label %exit exit: %result = i32 phi [123, %exit], [123, %exit] ret i32 %result } ``` That is, select is transformed into an invalid Phi, which will then be reduced to 123 and the second value will be lost. But it is worth noting that this problem will arise only if select is in the InstCombine worklist will be before the branch. Otherwise, InstCombine will replace the branch condition with false and transformation will not be applied. The fix is to check the target labels in the branch condition for equality. Patch By: Kirill Polushin Differential Revision: https://reviews.llvm.org/D84003 Reviewed By: mkazantsev (cherry picked from commit c9898810) -
Joachim Protze authored
This patch splits the handling of racy address and racy stack into separate functions. If a race was already reported for the address, we can avoid the cost for collecting the involved stacks. This patch also removes the race condition in storing the racy address / racy stack. This race condition allowed all threads to report the race. This patch changes the transitive suppression of reports. Previously suppression could transitively chain memory location and racy stacks. Now racy memory and racy stack are separate suppressions. Commit again, now with fixed tests. Reviewed by: dvyukov Differential Revision: https://reviews.llvm.org/D83625 (cherry picked from commit 7358a110)
-
- Jul 19, 2020
-
-
Fangrui Song authored
Code from D83800 by Yichao Yu (cherry picked from commit 3073a3aa)
-
Fangrui Song authored
This suppresses `failed to compute relocation: R_PPC_REL32, Invalid data was encountered while parsing the file` and its 64-bit variants when running llvm-dwarfdump on a PowerPC object file with .eh_frame Unfortunately it is difficult to test the computation: DWARFDataExtractor::getEncodedPointer does not use the relocated value and even if it does, we need to teach llvm-dwarfdump --eh-frame to do some linker job to report a reasonable address. (cherry picked from commit b922004e)
-
- Jul 18, 2020
-
-
James Y Knight authored
This function has a bug which will incorrectly reschedule instructions after an INLINEASM_BR (which can branch). (The bug may also allow scheduling past a throwing-CALL, I'm not certain.) I could fix that bug, but, as the removed FIXME notes, it's better to attempt rescheduling before converting to 3-addr form, as that may remove the need to convert in the first place. In fact, the code to do such reordering was added to this pass only a few months later, in 2011, via the addition of the function rescheduleMIBelowKill. That code does not contain the same bug. The removal of the sink3AddrInstruction function is not a no-op: in some cases it would move an instruction post-conversion, when rescheduleMIBelowKill would not move the instruction pre-converison. However, this does not appear to be important: the machine instruction scheduler can reorder the after-conversion instructions, in any case. This patch fixes a kernel panic 4.4 LTS x86_64 Linux kernels, when built with clang after 4b0aa572. Link: https://github.com/ClangBuiltLinux/linux/issues/1085 Differential Revision: https://reviews.llvm.org/D83708 (cherry picked from commit 60433c63)
-
- Jul 17, 2020
-
-
Jinsong Ji authored
This is brought up in https://reviews.llvm.org/D83915. We would like to remove some feature in PowerPC. We did send RFC before, but we think it might be a better idea that we indicate planned removal in the Release Notes for version 11 and actual removal in those for version 12.. Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D83968
-
Hans Wennborg authored
The flag is off by default. (cherry picked from commit 033ef842)
-
Vitaly Buka authored
Revert D83719 and explicitly set locate to "C". (cherry picked from commit 650baf22)
-
Pavel Labath authored
Summary: With D81784, lld has started debug info resolving relocations to garbage-collected symbols as -1 (instead of relocation addend). For an unaware consumer this generated sequences which seemingly wrap the address space -- their first entry was 0xfffff, but all other entries were low numbers. Lldb stores line sequences concatenated into one large vector, sorted by the first entry, and searched with std::lower_bound. This resulted in the low-value entries being placed at the end of the vector, which utterly confused the lower_bound algorithm, and caused it to not find a match. (Previously, these sequences would be at the start of the vector, and normally would contain addresses that are far smaller than any real address we want to look up, so std::lower_bound was fine.) This patch makes lldb ignore these kinds of sequences completely. It does that by changing the construction algorithm from iterating over the rows (as parsed by llvm), to iterating over the sequences. This is important because the llvm parsed performs validity checks when constructing the sequence array, whereas the row array contains raw data. Reviewers: JDevlieghere, MaskRay Differential Revision: https://reviews.llvm.org/D83957 (cherry picked from commit f3fab392)
-
Craig Topper authored
There was a lot of duplicate code here for checking the VT and subtarget. Moving it into a helper avoids that. It also fixes a bug that combineAdd reused Op0/Op1 after a call to isHorizontalBinOp may have changed it. The new helper function has its own local version of Op0/Op1 that aren't shared by other code. Fixes PR46455. Reviewed By: spatel, bkramer Differential Revision: https://reviews.llvm.org/D83971 (cherry picked from commit 5408024f)
-
Craig Topper authored
(cherry picked from commit 9adf7461)
-
Kadir Cetinkaya authored
Summary: Clangd is returning current working directory for overriden commands. This can cause inconsistencies between: - header and the main files, as OverlayCDB only contains entries for the main files it direct any queries for the headers to the base, creating a discrepancy between the two. - different clangd instances, as the results will be different depending on the timing of execution of the query and override of the command. hence clangd might see two different project infos for the same file between different invocations. - editors and the way user has invoked it, as current working directory of clangd will depend on those, hence even when there's no underlying base CWD might change depending on the editor, or the directory user has started the editor in. This patch gets rid of that discrepency by always directing queries to base or returning llvm::None in absence of it. For a sample bug see https://reviews.llvm.org/D83099#2154185. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D83934 (cherry picked from commit 46c92100)
-
Eric Christopher authored
due to the performance bugs filed in https://bugs.llvm.org/show_bug.cgi?id=46753. An SROA change soon may obviate some of these problems. This reverts commit 8d09f207. (cherry picked from commit 7bfaa400)
-
- Jul 16, 2020
-
-
Sanjay Patel authored
I'm not sure if the test is truly minimal, but we need to induce a situation where a value becomes a constant but is not immediately folded before getting to the 'or' transform. (cherry picked from commit d8b26868)
-
Sanjay Patel authored
We need to specify legal integer widths to trigger PR46712, so add those here. This doesn't appear to affect any existing tests, and it's not clear why a datalayout would not include any legal integer widths. While here, change some variable names that include 'tmp' to avoid warnings from the auto-generating script for CHECK lines. (cherry picked from commit efc30e59)
-
Alexey Bataev authored
Summary: If the original variable is marked for allocation in the different address space using #pragma omp allocate, need to cast the allocated variable to its original type with the original address space. Otherwise, the compiler may crash trying to bitcast the type of the new allocated variable to the original type in some cases, like passing this variable as an argument in function calls. Reviewers: jdoerfert Subscribers: jholewinski, cfe-commits, yaxunl, guansong, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D83696 (cherry picked from commit 9dc327d1)
-
Alexey Bataev authored
Summary: If user-defined reductions with the initializer are used with classes, the compiler misses the constructor call when trying to create a private copy of the reduction variable. Reviewers: jdoerfert Subscribers: cfe-commits, yaxunl, guansong, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D83334 (cherry picked from commit 41d0af00)
-
Craig Topper authored
Revert "[InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms" and subsequent patches This reverts most of the following patches due to reports of miscompiles. I've left the added test cases with comments updated to be FIXMEs. 1cf6f210 [IR] Disable select ? C : undef -> C fold in ConstantFoldSelectInstruction unless we know C isn't poison. 469da663 [InstSimplify] Re-enable select ?, undef, X -> X transform when X is provably not poison 122b0640 [InstSimplify] Don't fold vectors of partial undef in SimplifySelectInst if the non-undef element value might produce poison ac0af12e [InstSimplify] Add test cases for opportunities to fold select ?, X, undef -> X when we can prove X isn't poison 9b1e9532 [InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms (cherry picked from commit 00f3579a)
-
David Truby authored
Summary: These link dependencies are required for shared library builds to work correctly. Reviewers: clementval Reviewed By: clementval Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83938
-
David Truby authored
Summary: This adds missing definitions for functions in the Lower directory that were causing failures in shared library builds. The definitions for these are taken from the fir-dev branch on github. Reviewers: sscalpone, schweitz, jeanPerier, klausler Reviewed By: schweitz Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83771
-
Eugene Zelenko authored
-
Richard Smith authored
(cherry picked from commit 268025e2)
-
- Jul 15, 2020
-
-
Hans Wennborg authored
-
Georgii Rymar authored
Names of YAML keys changed in rG7a587ca9
-
Jessica Clarke authored
Follow-on from D77443. Although we're not fixing any of these pseudo-instructions, the potential for them to be out of sync still exists.
-
Jessica Clarke authored
Summary: Without these, the generic branch relaxation pass will underestimate the range required for branches spanning these and we can end up with "fixup value out of range" errors rather than relaxing the branches. Some of the instructions in the expansion may end up being compressed but exactly determining that is awkward, and these conservative values should be safe, if slightly suboptimal in rare cases. Reviewers: asb, lenary, luismarques, lewis-revill Reviewed By: asb, luismarques Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, jfb, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, evandro, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77443
-
Georgii Rymar authored
In D83482 we agreed to name e_* fields that are used for overriding values (like e_phoff) as EPh* (e.g. EPhOff). Currently we have a set of e_sh* fields that are named inconsistently with this rule. This patch renames all of them. Differential revision: https://reviews.llvm.org/D83766
-
Florian Hahn authored
In 2b3c505d, the pointer arguments for the matrix load and store intrinsics was changed to always be the element type of the vector argument. This patch updates the MatrixBuilder to not add the pointer type to the overloaded types and adjusts the clang/mlir tests. This should fix a few build failures on GreenDragon, including http://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-x86_64-O0-g/7891/
-
Georgii Rymar authored
This improves condition in the ELFFile::program_headers(). Previously if was possible to read the headers from the wrong place when the value of e_phoff was so large that computation overflowed. Differential revision: https://reviews.llvm.org/D83774
-
Andrew Ng authored
Fix incorrect use of the size of Path when accessing PathUTF16, as the UTF-16 path can be shorter. Added unit test for coverage of this test case. Thanks to Ding Fei (danix800) for the code fix, see https://reviews.llvm.org/D83321. Differential Revision: https://reviews.llvm.org/D83689
-
Sam McCall authored
-
Tim Northover authored
-