- Sep 23, 2020
-
-
Michael Kruse authored
Like in D87961, msvc has difficulties deducing the template argument. The error message is: ``` expr-parsers.cpp(383): error C2672: 'applyLambda': no matching overloaded function found ``` Explicitly pass the first template argument to help it. This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>. Reviewed By: DavidTruby Differential Revision: https://reviews.llvm.org/D88001
-
Michael Kruse authored
Msvc has difficulties deducing the template argument here. The error message is: ``` basic-parsers.h(790,12): error C2672: 'applyFunction': no matching overloaded function found ``` Explicitly pass the first template argument to help it. This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>. Reviewed By: DavidTruby Differential Revision: https://reviews.llvm.org/D87961
-
Raphael Isemann authored
This reverts commit 7518006d. This test apparently works on the Swift CI ubuntu bot, so it shouldn't be XFAIL'd on Linux.
-
Mehdi Amini authored
Instead of performing a transformation, such pass yields a new pass pipeline to run on the currently visited operation. This feature can be used for example to implement a sub-pipeline that would run only on an operation with specific attributes. Another example would be to compute a cost model and dynamic schedule a pipeline based on the result of this analysis. Discussion: https://llvm.discourse.group/t/rfc-dynamic-pass-pipeline/1637 Recommit after fixing an ASAN issue: the callback lambda needs to be allocated to a temporary to have its lifetime extended to the end of the current block instead of just the current call expression. Reviewed By: silvas Differential Revision: https://reviews.llvm.org/D86392
-
Roman Lebedev authored
This is practically identical to what we already do for UDiv/URem: https://rise4fun.com/Alive/04K Name: narrow udiv Pre: C0 u<= 255 && C1 u<= 255 %r = udiv i16 C0, C1 => %t0 = trunc i16 C0 to i8 %t1 = trunc i16 C1 to i8 %t2 = udiv i8 %t0, %t1 %r = zext i8 %t2 to i16 Name: narrow exact udiv Pre: C0 u<= 255 && C1 u<= 255 %r = udiv exact i16 C0, C1 => %t0 = trunc i16 C0 to i8 %t1 = trunc i16 C1 to i8 %t2 = udiv exact i8 %t0, %t1 %r = zext i8 %t2 to i16 Name: narrow urem Pre: C0 u<= 255 && C1 u<= 255 %r = urem i16 C0, C1 => %t0 = trunc i16 C0 to i8 %t1 = trunc i16 C1 to i8 %t2 = urem i8 %t0, %t1 %r = zext i8 %t2 to i16 ... only here we need to look for 'min signed bits', not 'active bits', and there's an UB to be aware of: https://rise4fun.com/Alive/KG86 https://rise4fun.com/Alive/LwR Name: narrow sdiv Pre: C0 <= 127 && C1 <= 127 && C0 >= -128 && C1 >= -128 %r = sdiv i16 C0, C1 => %t0 = trunc i16 C0 to i9 %t1 = trunc i16 C1 to i9 %t2 = sdiv i9 %t0, %t1 %r = sext i9 %t2 to i16 Name: narrow exact sdiv Pre: C0 <= 127 && C1 <= 127 && C0 >= -128 && C1 >= -128 %r = sdiv exact i16 C0, C1 => %t0 = trunc i16 C0 to i9 %t1 = trunc i16 C1 to i9 %t2 = sdiv exact i9 %t0, %t1 %r = sext i9 %t2 to i16 Name: narrow srem Pre: C0 <= 127 && C1 <= 127 && C0 >= -128 && C1 >= -128 %r = srem i16 C0, C1 => %t0 = trunc i16 C0 to i9 %t1 = trunc i16 C1 to i9 %t2 = srem i9 %t0, %t1 %r = sext i9 %t2 to i16 Name: narrow sdiv Pre: C0 <= 127 && C1 <= 127 && C0 >= -128 && C1 >= -128 && !(C0 == -128 && C1 == -1) %r = sdiv i16 C0, C1 => %t0 = trunc i16 C0 to i8 %t1 = trunc i16 C1 to i8 %t2 = sdiv i8 %t0, %t1 %r = sext i8 %t2 to i16 Name: narrow exact sdiv Pre: C0 <= 127 && C1 <= 127 && C0 >= -128 && C1 >= -128 && !(C0 == -128 && C1 == -1) %r = sdiv exact i16 C0, C1 => %t0 = trunc i16 C0 to i8 %t1 = trunc i16 C1 to i8 %t2 = sdiv exact i8 %t0, %t1 %r = sext i8 %t2 to i16 Name: narrow srem Pre: C0 <= 127 && C1 <= 127 && C0 >= -128 && C1 >= -128 && !(C0 == -128 && C1 == -1) %r = srem i16 C0, C1 => %t0 = trunc i16 C0 to i8 %t1 = trunc i16 C1 to i8 %t2 = srem i8 %t0, %t1 %r = sext i8 %t2 to i16 The ConstantRangeTest.losslessSignedTruncationSignext test sanity-checks the logic, that we can losslessly truncate ConstantRange to `getMinSignedBits()` and signext it back, and it will be identical to the original CR. On vanilla llvm test-suite + RawSpeed, this fires 1262 times, while the same fold for UDiv/URem only fires 384 times. Sic! Additionally, this causes +606.18% (+1079) extra cases of aggressive-instcombine.NumDAGsReduced, and +473.14% (+1145) of aggressive-instcombine.NumInstrsReduced folds.
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Roman Lebedev authored
Similar to the ConstantRange::getActiveBits(), and to similarly-named methods in APInt, returns the bitwidth needed to represent the given signed constant range
-
Roman Lebedev authored
This is fully identical to the old implementation, just easier to read.
-
Roman Lebedev authored
As an exhaustive test shows, this logic is fully identical to the old implementation, with exception of the case where both of the operands had empty ranges: ``` TEST_F(ConstantRangeTest, CVP_UDiv) { unsigned Bits = 4; EnumerateConstantRanges(Bits, [&](const ConstantRange &CR0) { if(CR0.isEmptySet()) return; EnumerateConstantRanges(Bits, [&](const ConstantRange &CR1) { if(CR0.isEmptySet()) return; unsigned MaxActiveBits = 0; for (const ConstantRange &CR : {CR0, CR1}) MaxActiveBits = std::max(MaxActiveBits, CR.getActiveBits()); ConstantRange OperandRange(Bits, /*isFullSet=*/false); for (const ConstantRange &CR : {CR0, CR1}) OperandRange = OperandRange.unionWith(CR); unsigned NewWidth = OperandRange.getUnsignedMax().getActiveBits(); EXPECT_EQ(MaxActiveBits, NewWidth) << CR0 << " " << CR1; }); }); } ``` -
Roman Lebedev authored
Much like APInt::getActiveBits(), computes how many bits are needed to be able to represent every value in this constant range, treating the values as unsigned.
-
Roman Lebedev authored
Use the fact that `~X` is equivalent to `-1 - X`, which gives us fully-precise answer, and we only need to special-handle the wrapped case. This fires ~16k times for vanilla llvm test-suite + RawSpeed.
-
Roman Lebedev authored
This is a continuation of 8d487668, the logic is pretty much identical for SRem: Name: pos pos Pre: C0 >= 0 && C1 >= 0 %r = srem i8 C0, C1 => %r = urem i8 C0, C1 Name: pos neg Pre: C0 >= 0 && C1 <= 0 %r = srem i8 C0, C1 => %r = urem i8 C0, -C1 Name: neg pos Pre: C0 <= 0 && C1 >= 0 %r = srem i8 C0, C1 => %t0 = urem i8 -C0, C1 %r = sub i8 0, %t0 Name: neg neg Pre: C0 <= 0 && C1 <= 0 %r = srem i8 C0, C1 => %t0 = urem i8 -C0, -C1 %r = sub i8 0, %t0 https://rise4fun.com/Alive/Vd6 Now, this new logic does not result in any new catches as of vanilla llvm test-suite + RawSpeed. but it should be virtually compile-time free, and it may be important to be consistent in their handling, because if we had a pair of sdiv-srem, and only converted one of them, -divrempairs will no longer see them as a pair, and thus not "merge" them.
-
Roman Lebedev authored
-
Arthur Eubanks authored
It tests CallGraph infra around the legacy PM which isn't relevant in NPM.
-
Arthur Eubanks authored
-
Jonas Devlieghere authored
The modules not getting orphaned is wreaking havoc when the UUIDs match between tests.
-
Jonas Devlieghere authored
This test launches a subprocess which will have a different PID during capture and replay.
-
Hubert Tong authored
The current code for handling pow(x, y) where y is an integer plus 0.5 is not explicitly guarded against attempting to transform the case where abs(y) is exactly 0.5. The latter case is meant to be handled by `replacePowWithSqrt`. Indeed, if the pow(x, integer+0.5) case proceeds past a certain point, it will hit an assertion by attempting to form pow(x, 0) using `getPow`. This patch adds an explicit check to prevent attempting the pow(x, integer+0.5) transformation on pow(x, +/-0.5) as suggested during the review of D87877. This has the effect of retaining the shrinking of `pow` to `powf` when the `sqrt` libcall cannot be formed. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D88066
-
Hubert Tong authored
-
Hubert Tong authored
The subject test was not actually running. This patch adds the relevant suffix to the list of lit case filename extensions for the enclosing directory. Minor adjustments are also made to deal with bit rot. Reviewed By: daltenty Differential Revision: https://reviews.llvm.org/D87122
-
Haojian Wu authored
We leave a dangling TypoExpr when typo-correction is performed successfully in `checkArgsForPlaceholders`, which leads a crash in the later TypoCorrection. This code was added in https://github.com/llvm/llvm-project/commit/1586782767938df3a20f7abc4d8335c48b100bc4, and it didn't seem to have enough test coverage. The fix is to remove this part, and no failuer tests. Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D87815
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Jan Korous authored
Differential Review: https://reviews.llvm.org/D83259
-
Paul C. Anagnostopoulos authored
Files modified to take comments into account. MLIR documentation updated for new TableGen documentation files.
-
Mircea Trofin authored
Differential Revision: https://reviews.llvm.org/D88055
-
Sam McCall authored
A recent change increased the stack size of memoizedMatchesAncestorOfRecursively leading to stack overflows on real code involving large fold expressions. It's not totally unreasonable to choke on very deep ASTs, but as common infrastructure it's be nice if ASTMatchFinder is more robust. (It already uses data recursion for the regular "downward" traversal.) Differential Revision: https://reviews.llvm.org/D86964
-
Eduardo Caldas authored
Differential Revision: https://reviews.llvm.org/D87839
-
Jacques Pienaar authored
The OpBuilder is required to start with OpBuilder and OperationState, so remove the need for the user to specify it. To make it simpler to update callers, retain the legacy behavior for now and skip injecting OpBuilder/OperationState when params start with OpBuilder. Related to bug 47442. Differential Revision: https://reviews.llvm.org/D88050
-
Kazuaki Ishizaki authored
Reviewed By: mravishankar, jpienaar Differential Revision: https://reviews.llvm.org/D88040
-
Amy Kwan authored
This patch implements the vector string isolate (predicate and non-predicate versions) builtins. The predicate builtins are custom selected within PPCISelDAGToDAG. Differential Revision: https://reviews.llvm.org/D87671
-
Amy Kwan authored
This patch implements the 128-bit vector divide extended builtins in Clang/LLVM. These builtins map to the vdivesq and vdiveuq instructions respectively. Differential Revision: https://reviews.llvm.org/D87729
-
Simon Pilgrim authored
Just scalarize trunc stores - GenWidenVectorTruncStores does the same thing but is flawed (PR42046) and unused. Differential Revision: https://reviews.llvm.org/D87708
-
Alexandre Ganea authored
-
Matt Morehouse authored
-
- Sep 22, 2020
-
-
Greg McGary authored
ld64 is cool with leading `0x` for hex command-line args, and we should be also. Reviewed By: #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D88065
-
Hamilton Tobon Mosquera authored
Refactored __tgt_target_data_begin_mapper_<issue|wait> to receive the handle as an input/output argument. This given the compiler warning of returning the handle as copy. Differential Revision: https://reviews.llvm.org/D88029
-
Saleem Abdulrasool authored
This introduces the new `swift_name` attribute that allows annotating APIs with an alternate spelling for Swift. This is used as part of the importing mechanism to allow interfaces to be imported with a new name into Swift. It takes a parameter which is the Swift function name. This parameter is validated to check if it matches the possible transformed signature in Swift. This is based on the work of the original changes in https://github.com/llvm/llvm-project-staging/commit/8afaf3aad2af43cfedca7a24cd817848c4e95c0c Differential Revision: https://reviews.llvm.org/D87534 Reviewed By: Aaron Ballman, Dmitri Gribenko
-
Arthur Eubanks authored
-