- Aug 27, 2021
-
-
Kazushi (Jam) Marukawa authored
Previous "simplify scan_eh_tab" patch, https://reviews.llvm.org/D93190, saves landingpad if and only if the target is not using SjLj exceptions. However, the landingpad is used by SjLj exception handler also. This patch changes to set landingpad for both exception handlers. Differential Revision: https://reviews.llvm.org/D108082 (cherry picked from commit 9d2740f3)
-
- Aug 25, 2021
-
-
Dawid Jurczak authored
This change fixes issue found by Markus: https://reviews.llvm.org/rG11338e998df1 Before this patch following code was transformed to memmove: for (int i = 15; i >= 1; i--) { p[i] = p[i-1]; sum += p[i-1]; } However load from p[i-1] is used not only by store to p[i] but also by sum computation. Therefore we cannot emit memmove in loop header. Differential Revision: https://reviews.llvm.org/D107964 (cherry picked from commit bdcf0424)
-
Dawid Jurczak authored
That's precommit test for D107964. Differential Revision: https://reviews.llvm.org/D108537
-
Tom Stellard authored
This reverts commit a7933290. This commit caused some bot failures: clang-with-thin-lto-ubuntu-release lld-x86_64-win-release llvm-clang-x86_64-expensive-checks-debian-release
-
Sami Tolvanen authored
Create an internal alias with the original name for static functions that are renamed in promoteInternals to avoid breaking inline assembly references to them. Relands 700d07f8 with -msvc targets fixed. Link: https://github.com/ClangBuiltLinux/linux/issues/1354 Reviewed By: nickdesaulniers, pcc Differential Revision: https://reviews.llvm.org/D104058 (cherry picked from commit 7ce1c4da)
-
Whisperity authored
As identified by @RKSimon, there was a missing comma in the default value for the "ignored parameter type suffixes" array, resulting in bogus concatenation of two elements. (cherry picked from commit 8d50a847)
-
Fraser Cormack authored
This patch fixes an issue where RISCV's `findCommutedOpIndices` would incorrectly return the pseudo `CommuteAnyOperandIndex` as a commutable operand index, rather than fixing a specific index. Reviewed By: rogfer01 Differential Revision: https://reviews.llvm.org/D108206 (cherry picked from commit 5b06cbac)
-
- Aug 24, 2021
-
-
Christian Fetzer authored
Commit 9f2967bc introduced support for branch coverage including export to the LCOV format. This commit corrects the LCOV field name for branches from BFH to BRH. The mistake seems to have slipped in as typo because the correct field name BRH is used in the comment section at the beginning of the file. Differential Revision: https://reviews.llvm.org/D108358 (cherry picked from commit 9116211d)
-
Nikita Popov authored
At least when compiling with gcc, this is not supported and will result in errors when linking against the profiler runtime. Only use the pragma comment linker based code with MSVC, but not with a mingw toolchain. This also undoes D107620, which shouldn't be relevant anymore. Differential Revision: https://reviews.llvm.org/D108095 (cherry picked from commit 4cfb047d)
-
Arthur Eubanks authored
/alternatename should use the mangled name. On x86 we need an extra underscore. Copied from sanitizer_win_defs.h Fixes https://crbug.com/1233589. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D107000 (cherry picked from commit ef2627e1)
-
Martin Storsjö authored
54902e00 added a use of /alternatename via a #pragma comment(linker); in MinGW mode, this requires building with -fms-extensions. (This flag is added to SANITIZER_COMMON_CFLAGS in the toplevel CMakeLists.txt.) This avoids a warning when building in MinGW mode (about an unknown pragma being ignored), and presumably also makes the code work as intended. Differential Revision: https://reviews.llvm.org/D107620 (cherry picked from commit 94c001d6)
-
Amy Kwan authored
It is possible that libatomic does not exist on some systems. This patch updates the scudo standalone tests to link against libatomic if the library exists. This is an update to the original patch: https://reviews.llvm.org/D64134 and aims to resolve https://bugs.llvm.org/show_bug.cgi?id=51431. Differential Revision: https://reviews.llvm.org/D108503 (cherry picked from commit 4cd8dd3f)
-
Jon Chesterfield authored
(cherry picked from commit f420939b)
-
Joachim Protze authored
This patch should fix the build we observe when building LLVM from scratch. Differential Revision: https://reviews.llvm.org/D107156 (cherry picked from commit 4ffa1478)
-
Jon Chesterfield authored
Asm is a gnu extension for C, so at present -fopenmp -std=c99 and similar fail to compile on nvptx, bug 51344 Changing to `__asm__` or `__asm` works for openmp, all three appear to work for cuda. Suggesting `__asm__` here as `__asm` is used by MSVC with different syntax, so this should make for better error diagnostics if the header is passed to a compiler other than clang. Reviewed By: tra, emankov Differential Revision: https://reviews.llvm.org/D107492 (cherry picked from commit 509854b6)
-
Jon Chesterfield authored
Fixes miscompile of calls into ocml. Bug 51445. The stack variable `double __tmp` is moved to dynamically allocated shared memory by CGOpenMPRuntimeGPU. This is usually fine, but when the variable is passed to a function that is explicitly annotated address_space(5) then allocating the variable off-stack leads to a miscompile in the back end, which cannot decide to move the variable back to the stack from shared. This could be fixed by removing the AS(5) annotation from the math library or by explicitly marking the variables as thread_mem_alloc. The cast to AS(5) is still a no-op once IR is reached. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D107971 (cherry picked from commit dbd7bad9)
-
Pushpinder Singh authored
This fixes the issue https://bugs.llvm.org/show_bug.cgi?id=51337 Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D107468 (cherry picked from commit f3eb5f90)
-
Pushpinder Singh authored
This fixes the 'unused linker option: -lm' warning when compiling program with -c. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D107952 (cherry picked from commit 60e07a95)
-
Pushpinder Singh authored
With this patch, OpenMP on AMDGCN will use the math functions provided by ROCm ocml library. Linking device code to the ocml will be done in the next patch. Reviewed By: JonChesterfield, jdoerfert, scchan Differential Revision: https://reviews.llvm.org/D104904 (cherry picked from commit 713a5d12)
-
Pushpinder Singh authored
Math libraries are linked only when -lm is specified. This is because host system could be missing rocm-device-libs. Reviewed By: JonChesterfield, yaxunl Differential Revision: https://reviews.llvm.org/D105981 (cherry picked from commit 9830f902)
-
Jeremy Morse authored
This patch is a revert of e08f205f. In that patch, DW_TAG_subprograms were permitted to be referenced across CU boundaries, to improve stack trace construction using call site information. Unfortunately, as documented in PR48790, the way that subprograms are "owned" by dwarf units is sufficiently complicated that subprograms end up in unexpected units, invalidating cross-unit references. There's no obvious way to easily fix this, and several attempts have failed. Revert this to ensure correct DWARF is always emitted. Three tests change in addition to the reversion, but they're all very light alterations. Differential Revision: https://reviews.llvm.org/D107076 (cherry picked from commit d4ce9e46 ) Signed-off-by:
Jeremy Morse <jeremy.morse@sony.com> Conflicts: llvm/test/DebugInfo/X86/convert-loclist.ll
-
Louis Dionne authored
basic_string and vector currently have a hard dependency on the compiled library because they need to call __vector_base_common::__throw_xxx(), which are externally instantiated in the compiled library. That makes sense when exceptions are enabled (because we're trying to localize the exception-throwing code to the compiled library), but it doesn't really make sense when exceptions are disabled, and the __throw_xxx functions are just calling abort() anyways. This patch simply overrides the __throw_xxx() functions so that they don't rely on the compiled library when exceptions are disabled. Differential Revision: https://reviews.llvm.org/D108389 (cherry picked from commit f3bc0e51)
-
- Aug 21, 2021
-
-
Albion Fung authored
The test case is not ran unless libcxx is used, and a macro may be undefined. This patch checks for the definition of the macro before using it. Fixes http://llvm.org/PR51430 Differential Revision: https://reviews.llvm.org/D108352 (cherry picked from commit 4bef7a8f)
-
- Aug 20, 2021
-
-
Louis Dionne authored
The triple can sometimes be arm64-apple-macos, where the previous XFAIL annotation wouldn't match (and hence the test would fail unexpectedly). (cherry picked from commit e8118e6c)
-
Raphael Isemann authored
Regression tests for D108088 . Reviewed By: mib Differential Revision: https://reviews.llvm.org/D108121 (cherry picked from commit cf521e78)
-
Dimitry Andric authored
When assertions are turned off, the `llvm::Error` value created at the start of this function is overwritten using the move-assignment operator, but the success value is never checked. Whenever a TypeSystem cannot be found or created, this can lead to lldb core dumping with: Program aborted due to an unhandled Error: Error value was Success. (Note: Success values must still be checked prior to being destroyed). Fix this by not creating a `llvm::Error` value in advance, and directly returning the result of `llvm::make_error` instead, whenever an error is encountered. See also: <https://bugs.freebsd.org/253881> and <https://bugs.freebsd.org/257829>. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D108088 (cherry picked from commit 5033f079) -
Martin Storsjö authored
The code is based on the same __mulh and __umulh intrinsics for x86. This should fix PR51128. Differential Revision: https://reviews.llvm.org/D106721 (cherry picked from commit cc3affd8)
-
Zahira Ammarguellat authored
This reverts commit 48ad446a. (cherry picked from commit 4389a413)
-
- Aug 19, 2021
-
-
Nikita Popov authored
This is a non-intrusive fix for https://bugs.llvm.org/show_bug.cgi?id=51476 intended for backport to the 13.x release branch. It expands on the current hack by distinguishing between CmpValue of 0, 1 and 2, where 0 and 1 have the obvious meaning and 2 means "anything else". The new optimization from D98564 should only be performed for CmpValue of 0 or 1. For main, I think we should switch the analyzeCompare() and optimizeCompare() APIs to use int64_t instead of int, which is in line with MachineOperand's notion of an immediate, and avoids this problem altogether. Differential Revision: https://reviews.llvm.org/D108076 (cherry picked from commit 81b10658)
-
Rainer Orth authored
The Solaris buildbots have been broken for some time by the unconditional use of `NT_GNU_BUILD_ID`, e.g. Solaris/sparcv9 <https://lab.llvm.org/staging/#/builders/50/builds/4910> and Solaris/amd64 <https://lab.llvm.org/staging/#/builders/101/builds/3751>. Being a GNU extension, it is not defined in `<sys/elf.h>`. However, providing a fallback definition doesn't help because the code also relies on `__ehdr_start`, another unportable GNU extension that most likely never will be implemented in Solaris `ld`. Besides, there's reallly no point in supporting build ids since they aren't used on Solaris at all. This patch fixes this by making the relevant code conditional on the definition of `NT_GNU_BUILD_ID`. Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D107556 (cherry picked from commit 779714f8)
-
Simon Pilgrim authored
As reported on PR51281, an internal fuzz test encountered an issue when extracting constant bits from a SUBV_BROADCAST node from a constant pool source larger than the broadcasted subvector width. The getTargetConstantBitsFromNode was assuming that the Constant would the same size as the subvector, resulting in the incorrect packing of the per-element bits data. This patch attempts to solve this by using the SUBV_BROADCAST node to determine the subvector width, and then ensuring we extract only the lowest bits from Constant of that subvector bitsize. Differential Revision: https://reviews.llvm.org/D107158 (cherry picked from commit 18e6a03b)
-
Tomas Matheson authored
This assert is intended to ensure that the high registers are not selected when it is passed to one of the thumb UXT instructions. However it was triggering even for 32 bit where no UXT instruction is emitted. Fixes PR51313. Differential Revision: https://reviews.llvm.org/D107363 (cherry picked from commit 40650f27)
-
- Aug 18, 2021
-
-
Louis Dionne authored
In the future, we'll want to rely exclusively on using_if_exists for this job, but for now, only rely on it when the compiler supports that attribute. That removes the possibility for getting the logic wrong. Differential Revision: https://reviews.llvm.org/D108297 (cherry picked from commit ebc01bbc)
-
Louis Dionne authored
This allows testing the rest of those headers on most platforms, instead of XFAILing the whole test just because of a few functions. As a fly-by fix, remove std/utilities/time/date.time/ctime.pass.cpp, which was a duplicate of std/language.support/support.runtime/ctime.pass.cpp. Differential Revision: https://reviews.llvm.org/D108295 (cherry picked from commit ec574f5d)
-
Louis Dionne authored
Instead of trying to sniff out what features are supported by the library being tested, the way we normally handle these things is with Lit annotations. This should not be treated differently. Differential Revision: https://reviews.llvm.org/D108209 (cherry picked from commit ed7c81d1)
-
Kiran Chandramohan authored
std::clock_t can be an unsigned value on some platforms like MacOS and therefore needs a cast when initializing an std::clock_t value with -1. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D107972 (cherry picked from commit 4573c31f)
-
Amy Kwan authored
It is possible to generate the llvm.fmuladd.ppcf128 intrinsic, and there is no actual FMA instruction that corresponds to this intrinsic call for ppcf128. Thus, this intrinsic needs to remain as a call as it cannot be lowered to any instruction, which also means we need to disable CTR loop generation for fma involving the ppcf128 type. This patch accomplishes this behaviour. Differential Revision: https://reviews.llvm.org/D107914 (cherry picked from commit 581a8030)
-
Fangrui Song authored
For the release/13.x branch. Differential Revision: https://reviews.llvm.org/D107782
-
- Aug 17, 2021
-
-
Paul Walker authored
visitEXTRACT_SUBVECTOR can sometimes create illegal BITCASTs when removing "redundant" INSERT_SUBVECTOR operations. This patch adds an extra check to ensure such combines only occur after operation legalisation if any resulting BITBAST is itself legal. Differential Revision: https://reviews.llvm.org/D108086 (cherry picked from commit cd0e1964)
-
Martin Storsjö authored
In e72403f9, we added the flag "--no-dynamicbase" for disabling the dynamicbase flag which we set by default. At the time, ld.bfd didn't have any corresponding option (as ld.bfd defaulted to not setting the flag). Almost at the same time, corresponding options were added to ld.bfd for disabling it (while it was being enabled by default), with a different name, "--disable-dynamicbase". Thus add the "--disable-dynamicbase" option. Make this default one advertised in the help listing, but keep the "--no-dynamicbase" form as an alias. Also improve checking for the last option set if there are multiple ones on the same command line. Also add corresponding disable options for a lot of other flags that we set by default, also added in ld.bfd in the same commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=514b4e191d5f46de8e142fe216e677a35fa9c4bb Differential Revision: https://reviews.llvm.org/D107930 (cherry picked from commit f8340c8c)
-