- Aug 19, 2021
-
-
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)
-
Matheus Izvekov authored
See PR48656. The implementation of the template instantiation of requires expressions was incorrectly trying to get the expression from an 'ExprRequirement' before checking if it was an error state. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D107399 (cherry picked from commit e64e6924)
-
Brian Cain authored
(cherry picked from commit 888876ba)
-
Johannes Doerfert authored
(cherry picked from commit 5f543919)
-
Sanjay Patel authored
The intrinsics have an extra chunk of known bits logic compared to the normal cmp+select idiom. That allows folding the icmp in each case to something better, but that then opposes the canonical form of min/max that we try to form for a select. I'm carving out a narrow exception to preserve all existing regression tests while avoiding the inf-loop. It seems unlikely that this is the only bug like this left, but this should fix: https://llvm.org/PR51419 (cherry picked from commit b267d3ce)
-
Sanjay Patel authored
This is already done within InstCombine: https://alive2.llvm.org/ce/z/MiGE22 ...but leaving it out of analysis makes it harder to avoid infinite loops there. (cherry picked from commit e260e10c)
-
Sanjay Patel authored
(cherry picked from commit 9b942a54)
-
Joseph Huber authored
Temporary files created by the offloading device toolchain are not removed after compilation when using a two-step compilation. The offload-bundler uses a different filename for the device binary than the `.o` file present in the Job's input list. This is not listed as a temporary file so it is never removed. This patch explicitly adds the device binary as a temporary file to consume it. This fixes PR50336. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D107668 (cherry picked from commit 01d59c0d)
-
David Sherwood authored
This patch adds more instructions to the Uniforms list, for example certain intrinsics that are uniform by definition or whose operands are loop invariant. This list includes: 1. The intrinsics 'experimental.noalias.scope.decl' and 'sideeffect', which are always uniform by definition. 2. If intrinsics 'lifetime.start', 'lifetime.end' and 'assume' have loop invariant input operands then these are also uniform too. Also, in VPRecipeBuilder::handleReplication we check if an instruction is uniform based purely on whether or not the instruction lives in the Uniforms list. However, there are certain cases where calls to some intrinsics can be effectively treated as uniform too. Therefore, we now also treat the following cases as uniform for scalable vectors: 1. If the 'assume' intrinsic's operand is not loop invariant, then we are free to treat this as uniform anyway since it's only a performance hint. We will get the benefit for the first lane. 2. When the input pointers for 'lifetime.start' and 'lifetime.end' are loop variant then for scalable vectors we assume these still ultimately come from the broadcast of an alloca. We do not support scalable vectorisation of loops containing alloca instructions, hence the alloca itself would be invariant. If the pointer does not come from an alloca then the intrinsic itself has no effect. I have updated the assume test for fixed width, since we now treat it as uniform: Transforms/LoopVectorize/assume.ll I've also added new scalable vectorisation tests for other intriniscs: Transforms/LoopVectorize/scalable-assume.ll Transforms/LoopVectorize/scalable-lifetime.ll Transforms/LoopVectorize/scalable-noalias-scope-decl.ll Differential Revision: https://reviews.llvm.org/D107284 (cherry picked from commit 3fd96e1b)
-
David Sherwood authored
The tests previously had lots of unnecessary CHECK lines, where all we really need to check is the presence (or absence) of the assume intrinsic and the correct input operands. Differential Revision: https://reviews.llvm.org/D107157 (cherry picked from commit 1172a8a7)
-
Jez Ng authored
I probably missed out some things, given how much work was done in the last few months... Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D107922
-
- Aug 16, 2021
-
-
Martin Storsjö authored
-
- Aug 13, 2021
-
-
Rainer Orth authored
The introduction of `SHF_GNU_RETAIN` has caused massive problems on Solaris. Initially, as reported in Bug 49437, it caused dozens of testsuite failures on both sparc and x86. The objects were marked as `ELFOSABI_NONE`, but `SHF_GNU_RETAIN` is a GNU extension. In the native Solaris ABI, that flag (in the range for OS-specific values) is `SHF_SUNW_ABSENT` with a completely different semantics, which confuses Solaris `ld` very much. Later, the objects became (correctly) marked `ELFOSABI_GNU`, which Solaris `ld` doesn't support, causing it to SEGV and break the build. The linker is currently being hardened to not accept non-native OS ABIs to avoid this. The need for linker support is already documented in `clang/include/clang/Basic/AttrDocs.td`, but not currently checked. This patch avoids all this by not emitting `SHF_GNU_RETAIN` on Solaris at all. Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and `x86_64-pc-linux-gnu`. Differential Revision: https://reviews.llvm.org/D107747 (cherry picked from commit 7bbbf295)
-
Petr Hosek authored
This fixes support for merging profiles which broke as a consequence of e50a3884. The issue was missing adjustment in merge logic to account for the binary IDs which are now included in the raw profile just after header. In addition, this change also: * Includes the version in module signature that's used for merging to avoid accidental attempts to merge incompatible profiles. * Moves the binary IDs size field after version field in the header as was suggested in the review. Differential Revision: https://reviews.llvm.org/D107143 (cherry picked from commit 83302c84)
-
- Aug 12, 2021
-
-
Liuke Gehry authored
Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum In C++, the enumeration is never Integer, and the enumeration condition judgment is added to avoid compiling errors when it is initialized to an integer. Add support for initialization check of scope enum. As the following case show, clang-tidy will give a wrong automatic fix: enum Color {Red, Green, Blue}; enum class Gender {Male, Female}; void func() { Color color; // Color color = 0; <--- fix bug Gender gender; // <--- no warning } Reviewd By: aaron.ballman, whisperity Differential Revision: http://reviews.llvm.org/D106431 (cherry picked from commit 4a097efe) -
Andrea Di Biagio authored
This fixes a bug where implicit uses of EFLAGS were not marked as ReadAdvance in the RM/MR variants of ADC/SBB (PR51318) This also fixes the absence of ReadAdvance for the register operand of RMW arithmetic instructions (PR51322). Differential Revision: https://reviews.llvm.org/D107367 (cherry picked from commit 7a1a35a1)
-
Andrea Di Biagio authored
Also, regenerate existing X86 tests using update_mca_test.py. (cherry picked from commit f0658c7a)
-
Pan, Tao authored
Same as 3bec7ed5 Reviewed By: sbc100 Differential Revision: https://reviews.llvm.org/D107422 (cherry picked from commit c70fa6da)
-
Andrea Di Biagio authored
This is related to PR51392. Before this patch, the timeline view was rounding doubles to the first decimal, using a logic similar to this: ``` double AverageTime = (double)Input / CumulativeExecutions; double Result = floor((AverageTime * 10) + 0.5) / 10 ``` Here, Input and CumulativeExecutions are both unsigned integers. The last operation is what effectively performs the rounding of AverageTime. PR51392 has been raised because - under specific -m32 configurations of GCC - one of the timeline tests reports slighlty different values (due to a different rounding choice). This patch tries to minimise the propagation of floating-point error by hoisting the multiply by 10, so that it is performed on the unsigned. ``` double AverageTime = (double)(Input * 10) / CumulativeExecutions; floor(AverageTime + 0.5) / 10 ``` So we are trading a floating point multiply for a integer multiply (which can be expanded using a simple MUL or using an `ADD + LEA` sequence). This decrease in floating point operations executed should also help with decreasing the error in the computation.. Strictly speaking, that computation will always be potentially subject to error (depending on what values are passed in input). However, this patch should improve the situation and make bug like PR51392 less frequent. (cherry picked from commit 45685a1f)
-
Arthur O'Dwyer authored
efriedma noted that D104682 broke this test case, reduced from SPEC2006. #include <istream> bool a(std::istream a) { return a.getline(0,0) == 0; } We can unbreak it by restoring the conversion to something-convertible-to-bool. We chose `void*` in order to match libstdc++. For more ancient history, see PR19460: https://bugs.llvm.org/show_bug.cgi?id=19460 Differential Revision: https://reviews.llvm.org/D107663 (cherry picked from commit c1a8f128) -
Johannes Doerfert authored
Failed for some reason, potentially because of the inner type declaration in combination with the `using`. This might help. Failure: https://lab.llvm.org/buildbot/#/builders/127/builds/15432 (cherry picked from commit fc32a5c8)
-
Johannes Doerfert authored
PHI nodes are not pass through but change their value, we have to account for that to avoid missing stores. Follow up for D107798 to fix PR51249 for good. Differential Revision: https://reviews.llvm.org/D107808 (cherry picked from commit e7e3585c)
-
Johannes Doerfert authored
AAPointerInfoFloating needs to visit all uses and some multiple times if we go through PHI nodes. Attributor::checkForAllUses keeps a visited set so we don't recurs endlessly. We now allow recursion for non-phi uses so we track all pointer offsets via PHI nodes properly without endless recursion. This replaces the first attempt D107579. Differential Revision: https://reviews.llvm.org/D107798 (cherry picked from commit 96da6dd6)
-
Johannes Doerfert authored
The bulk of the changes come from attributes but only the @phi_store function is effectively added. (cherry picked from commit f358727c)
-
- Aug 11, 2021
-
-
Matheus Izvekov authored
See PR47174. When canonicalizing nested name specifiers of the type kind, the prefix for 'DependentTemplateSpecialization' types was being dropped, leading to malformed types which would cause failures when rebuilding template names. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D107311 (cherry picked from commit 219790c1)
-
Evandro Menezes authored
Add the scheduling resources for the V extension instructions. Differential Revision: https://reviews.llvm.org/D98002 (cherry picked from commit 63a5ac4e)
-
Tom Stellard authored
-
Rainer Orth authored
Linking `libclang.so` is currently broken on Solaris: ld: fatal: option --version-script requires option -z gnu-version-script-compat to be specified While Solaris `ld` supports a considerable subset of `--version-script`, there are some elements of the syntax that aren't. The fix is equivalent to D78510 <https://reviews.llvm.org/D78510>. Additionally, use of C-style comments is a GNU extension that can easily be avoided by using `#` as comment character, which is supported by GNU `ld`, `gold`, and `lld`. Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, `x86_64-pc-linux-gnu`. Differential Revision: https://reviews.llvm.org/D107559 (cherry picked from commit a382a746)
-
Tom Stellard authored
This function is marked with CINDEX_LINKAGE, but was never added to the export list / linker script. Reviewed By: jrtc27 Differential Revision: https://reviews.llvm.org/D106974 (cherry picked from commit a4edb2b1)
-
Michał Górny authored
Include the vaue of LLVM_ENABLE_NEW_PASS_MANAGER in generated LLVMConfig.cmake since it is needed by clang's build system. This fixes test failures when the new pass manager is enabled (i.e. by default) by having clang's CMake files correctly detect that and skip relevant tests. Differential Revision: https://reviews.llvm.org/D107628 (cherry picked from commit 889a1e69)
-
Michał Górny authored
Add a LLVM_LIT_ARGS cached variable in order to make it possible to override lit arguments when doing standalone builds. Without that, the user variable is ignored and the default options are always used. Based on a similar solution found in clang. Differential Revision: https://reviews.llvm.org/D107700 (cherry picked from commit 614c7d03)
-
Michał Górny authored
Some LD_PRELOAD-ed libraries tend to interact badly with --nodefaultlib, particularly Gentoo sandbox. Do not run this test if LD_PRELOAD is present in the running environment. Differential Revision: https://reviews.llvm.org/D107701 (cherry picked from commit 15cacab7)
-