- Apr 07, 2021
-
-
Nico Weber authored
This reverts commit 6951b723. Breaks several bots, see comments on https://reviews.llvm.org/D99409
-
Simon Pilgrim authored
Extend D94856 to handle 'and', 'or' and 'xor' instructions as well We still fail on many i8/i16 cases as the test and the logic-op are performed on different widths
-
Alexey Bataev authored
No need to lookup through and/or try to vectorize operands of the CmpInst instructions during attempts to find/vectorize min/max reductions. Compiler implements postanalysis of the CmpInsts so we can skip extra attempts in tryToVectorizeHorReductionOrInstOperands and save compile time. Differential Revision: https://reviews.llvm.org/D99950
-
Andrzej Warzynski authored
The -fdebug-dump-provenance flag is meant to be used with needProvenanceRangeToCharBlockMappings set to true. This way, extra mapping is generated that allows e.g. IDEs to retrieve symbol's scope (offset into cooked character stream) based on symbol's source code location. This patch makes sure that this option is set when using -fdebug-dump-provenance. With this patch, the implementation of -fdebug-dump-provenance in `flang-new -fc1` becomes consistent with `f18`. The corresponding LIT test is updated so that it can be shared with `f18`. I refined it a bit so that: * it becomes a frontend-only test * it's stricter about the expected output Differential Revision: https://reviews.llvm.org/D98847
-
Jay Foad authored
-
Andrzej Warzynski authored
This patch adds support for the `-cpp` and `-nocpp` flags. The implemented semantics match f18 (i.e. the "throwaway" driver), but are different to gfortran. In Flang the preprocessor is always run. Instead, `-cpp/-nocpp` are used to control whether predefined and command-line preprocessor macro definitions are enabled or not. In practice this is sufficient to model gfortran`s `-cpp/-nocpp`. In the absence of `-cpp/-nocpp`, the driver will use the extension of the input file to decide whether to include the standard macro predefinitions. gfortran's documentation [1] was used to decide which file extension to use for this. The logic mentioned above was added in FrontendAction::BeginSourceFile. That's relatively late in the driver set-up, but this roughly where the name of the input file becomes available. The logic for deciding between fixed and free form works in a similar way and was also moved to FrontendAction::BeginSourceFile for consistency (and to reduce code-duplication). The `-cpp/-nocpp` flags are respected also when the input is read from stdin. This is different to: * gfortran (behaves as if `-cpp` was used) * f18 (behaves as if `-nocpp` was used) Starting with this patch, file extensions are significant and some test files had to be renamed to reflect that. Where possible, preprocessor tests were updated so that they can be shared between `f18` and `flang-new`. This was implemented on top of adding new test for `-cpp/-nocpp`. [1] https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D99292
-
oToToT authored
D97493 separate target creation out to a single function `CompilerInstance::createTarget`. However, it would overwrite AuxTarget even if it has been set. As @kadircet recommended in D98128, this patch check the existence of AuxTarget and not overwrite it when it has been set. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D100024
-
Sanjay Patel authored
The swap of the operands can affect later transforms that are expecting a constant as operand 1. I don't think we can trigger a bug with the current code, but I hit that problem while drafting a new transform for min/max intrinsics.
-
Sanjay Patel authored
-
Matthias Springer authored
Also factors out out-of-bounds mask generation from vector.transfer_read/write into a new MaterializeTransferMask pattern. Differential Revision: https://reviews.llvm.org/D100001
-
Simon Pilgrim authored
D94856 covered the BMI cases where we had existing tests, this adds missing AND/OR/XOR test cases
-
Florian Hahn authored
Extend test coverage by checking various standard versions with -f[no-]finite-loops. Suggested as part of D96418.
-
serge-sans-paille authored
Clang spends a decent amount of time in the LineOffsetMapping::get(...) function. This function used to be vectorized (through SSE2) then the optimization got dropped because the sequential version was on-par performance wise. This provides an optimization of the sequential version that works on a word at a time, using (documented) bithacks to provide a portable vectorization. When preprocessing the sqlite amalgamation, this yields a sweet 3% speedup. Differential Revision: https://reviews.llvm.org/D99409
-
Balazs Benics authored
If we allocate memory, the extent of the MemRegion will be the symbolic value of the size parameter. This way, if that symbol gets constrained, the extent will be also constrained. This test demonstrates that the extent is indeed the same symbol. Reviewed By: NoQ Differential Revision: https://reviews.llvm.org/D99959
-
Simon Pilgrim authored
Extend D94856 to handle 'bzhi' instructions as well
-
Valeriy Savchenko authored
rdar://75704162 Differential Revision: https://reviews.llvm.org/D99601
-
Yevgeny Rouban authored
I do not see any bit-width restriction from the point of the LLVM Lang Ref - Operand Bundles on the types of the deopt bundle operands. Statepoint Lowering seems to be able to work with any types. This patch relaxes the two related assertions and adds a new test for this change. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D100006
-
Valeriy Savchenko authored
When property is declared in a superclass (or in a protocol), it still can be of CXXRecord type and Sema could've already generated a body for us. This patch joins two branches and two ways of acquiring IVar in order to reuse the existing code. And prevent us from generating l-value to r-value casts for C++ types. rdar://67416721 Differential Revision: https://reviews.llvm.org/D99194
-
Simon Pilgrim authored
D94856 covered the BMI cases where we had existing tests, this adds a missing BZHI test case
-
crr0004 authored
When you pass in a payload with an invalid URI in a build with assertions enabled, it will crash. Consuming the error from the failed URI parse prevents the error. The crash is caused by the [llvm::expected](https://llvm.org/doxygen/classllvm_1_1Expected.html) having protection around trying to deconstruct without consuming the error first. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D99872
-
Kirill Bobyrev authored
//-E create_symlink// is available on windows since CMake 3.13 (LLVM now uses 3.13.4) It may needs administrator privileges or enabled developer mode (Windows 10) See https://cmake.org/cmake/help/latest/release/3.13.html Reviewed By: kbobyrev Differential Revision: https://reviews.llvm.org/D99170
-
Utkarsh Saxena authored
Differential Revision: https://reviews.llvm.org/D99934
-
Sven van Haastregt authored
size_t and friends are built-in scalar data types and s6.4.4.2 of the OpenCL C Specification says the as_type() operator must be available for these data types. Differential Revision: https://reviews.llvm.org/D98959
-
Stefan Gränitz authored
-
Roman Lebedev authored
This reverts commit a547b4e2, relanding commit 31d219d2, which was reverted because there was a conflicting inverse transform, which was causing an endless combine loop, which has now been adjusted. Original commit message: https://alive2.llvm.org/ce/z/67w-wQ We prefer `add`s over `sub`, and this particular xform allows further folds to happen: Fixes https://bugs.llvm.org/show_bug.cgi?id=49858
-
Roman Lebedev authored
I.e., if any/all of the consants is an expression, don't do it. Since those constants won't reduce into an immediate, but would be left as an constant expression, they could cause endless combine loops after 31d219d2 added an inverse transformation.
-
Roman Lebedev authored
These would cause endless combine loop after 31d219d2.
-
Thomas Preud'homme authored
LLVM test CodeGen/PowerPC/ppc-disable-non-volatile-cr.ll tries to check for the absence of a sequence of instructions with several CHECK-NOT with one of those directives using a variable defined in another. However CHECK-NOT are checked independently so that is using a variable defined in a pattern that should not occur in the input. This commit changes occurence of the variable for the regex used in its definition, thereby making each CHECK-NOT independent. Reviewed By: NeHuang, nemanjai Differential Revision: https://reviews.llvm.org/D99880
-
Thomas Preud'homme authored
Clang test CodeGen/libcalls.c contains CHECK-NOT directives using a variable defined in a CHECK directive with a different prefix never enabled together, therefore causing the variable to be undefined in that CHECK-NOT. The intent of the test is to check that some declaration do not have the same attribute as when compiling the test without -fmath-errno. This commits instead changes all CHECK-NOT to CHECK directive, checking that they all use the same attribute. It also adds an extra CHECK for that prefix to check the expected attributes these functions should have when compiling with -fmath-errno. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D99898
-
Thomas Preud'homme authored
LLVM test Transforms/Coroutine/coro-split-sink-lifetime-O2.ll tries to check for the absence of a sequence of instructions with several CHECK-NOT with one of those directives using a variable defined in another. However CHECK-NOT are checked independently so that is using a variable defined in a pattern that should not occur in the input. This commit simplifies the CHECK-NOT block to only check for the presence of any lifetime start marker since that is effectively what the test was testing at the moment. Reviewed By: junparser Differential Revision: https://reviews.llvm.org/D99856
-
Roman Lebedev authored
As it is being noted in D99249, lack of alignment information on `this` has been preventing LICM from happening. For some time now, lack of alignment attribute does *not* imply natural alignment, but an alignment of `1`. Also, we used to treat dereferenceable as implying alignment, but we no longer do, so it's a bugfix. Differential Revision: https://reviews.llvm.org/D99790
-
Qiu Chaofan authored
This will fix swap-reduction in DAGISel for cases where COPY_TO_REGCLASS has multiple uses.
-
Stefan Gränitz authored
The test case added in 258f055e was lacking two important details for the test infrastructure. ae217bf1 added the executable to LLVM_TEST_DEPENDS in CMake to make sure the exectubale gets built before we run the test suite. This patch adds a ToolSubst for the executable in LIT, which replaces the tool invokation in the RUN line with an absolute path. It makes sure we don't run accidentally run some other tool from the user's PATH. The test works without it in case LLVM's main binary directory happens to be the working directory (which is default apparently). Configurations that don't build the examples ignore failures for this ToolSubst (and won't run the test). Reviewed By: echristo Differential Revision: https://reviews.llvm.org/D99931
-
LemonBoy authored
D88631 introduced a set of knobs to tweak how the stack protector is codegen'd for x86 targets, including the offset from the base register where the stack cookie is located. The `StackProtectorGuardOffset` field in `TargetOptions` was left uninitialized instead of being reset to its neutral value -1, making it possible to emit nonsensical code if the frontend doesn't change the field value at all before feeding the `TargetOptions` to the target machine initializer. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D99952
-
Max Kazantsev authored
A value from reachable block may come to a Phi node as its input from unreachable block. This may confuse matchSimpleRecurrence which has no access to DomTree and can falsely recognize something as a recurrency because of this effect, as the attached test shows. Patch `ae7b1e` deals with half of this problem, but it only accounts from the case when an unreachable instruction comes to Phi as an input. This patch provides a generalization by checking that no Phi block's predecessor is unreachable (no matter what the input is). Differential Revision: https://reviews.llvm.org/D99929 Reviewed By: reames
-
Petr Hosek authored
This reverts commit 849d3729 which depends on 31d219d2 that was reverted.
-
Christopher Di Bella authored
LWG3175 identifies that the `common_reference` requirement for `swappable_with` is over-constraining and doesn't need to concern itself with cv- or reference qualifiers. Differential Revision: https://reviews.llvm.org/D99817
-
Petr Hosek authored
This reverts commit 31d219d2 which causes an infinite loop when compiling the XRay runtime.
-
Jacques Pienaar authored
When both arguments are the same for these ops, propagate this argument.
-
Jonas Devlieghere authored
Stop emulating dsymutil-classic which only cached the last used CIE for reuse.
-