|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
dcd09467 |
| 26-Jul-2022 |
Sanjay Patel <[email protected]> |
[InstSimplify] remove redundant calls to 'isImplied'; NFCI
We already call the more general isImpliedCondition() (which calls isImpliedTrueByMatchingCmp() internally) from simplifyAndInst() and simp
[InstSimplify] remove redundant calls to 'isImplied'; NFCI
We already call the more general isImpliedCondition() (which calls isImpliedTrueByMatchingCmp() internally) from simplifyAndInst() and simplifyOrInst().
There was a difference visible with this change on a vector test before a925bef70c6c, but I can't find any gaps now.
show more ...
|
| #
611ffcf4 |
| 14-Jul-2022 |
Kazu Hirata <[email protected]> |
[llvm] Use value instead of getValue (NFC)
|
| #
8ee913d8 |
| 06-Jul-2022 |
Nikita Popov <[email protected]> |
[IR] Remove Constant::canTrap() (NFC)
As integer div/rem constant expressions are no longer supported, constants can no longer trap and are always safe to speculate. Remove the Constant::canTrap() m
[IR] Remove Constant::canTrap() (NFC)
As integer div/rem constant expressions are no longer supported, constants can no longer trap and are always safe to speculate. Remove the Constant::canTrap() method and its usages.
show more ...
|
| #
758de0e9 |
| 27-Jun-2022 |
Chen Zheng <[email protected]> |
[InstructionSimplify] handle denormal input for fcmp
Handle denormal constant input for fcmp instructions based on the denormal handling mode.
Reviewed By: spatel, dcandler
Differential Revision:
[InstructionSimplify] handle denormal input for fcmp
Handle denormal constant input for fcmp instructions based on the denormal handling mode.
Reviewed By: spatel, dcandler
Differential Revision: https://reviews.llvm.org/D128647
show more ...
|
| #
0445c340 |
| 30-Jun-2022 |
Nikita Popov <[email protected]> |
[ConstantFold] Support loads in ConstantFoldInstOperands()
This allows all constant folding to happen through a single function, without requiring special handling for loads at each call-site.
This
[ConstantFold] Support loads in ConstantFoldInstOperands()
This allows all constant folding to happen through a single function, without requiring special handling for loads at each call-site.
This may not be NFC because some callers currently don't do that special handling.
show more ...
|
| #
a6d4b413 |
| 30-Jun-2022 |
Nikita Popov <[email protected]> |
[ConstantFold] Supports compares in ConstantFoldInstOperands()
Support compares in ConstantFoldInstOperands(), instead of forcing the use of ConstantFoldCompareInstOperands(). Also handle insertvalu
[ConstantFold] Supports compares in ConstantFoldInstOperands()
Support compares in ConstantFoldInstOperands(), instead of forcing the use of ConstantFoldCompareInstOperands(). Also handle insertvalue (extractvalue was already handled).
This removes a footgun, where many uses of ConstantFoldInstOperands() need a separate check for compares beforehand. It's particularly insidious if called on a constant expression, because it doesn't fail in that case, but will just not do DL-dependent folding.
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
a83aa33d |
| 16-Jun-2022 |
Bradley Smith <[email protected]> |
[IR] Move vector.insert/vector.extract out of experimental namespace
These intrinsics are now fundemental for SVE code generation and have been present for a year and a half, hence move them out of
[IR] Move vector.insert/vector.extract out of experimental namespace
These intrinsics are now fundemental for SVE code generation and have been present for a year and a half, hence move them out of the experimental namespace.
Differential Revision: https://reviews.llvm.org/D127976
show more ...
|
| #
3b7c3a65 |
| 25-Jun-2022 |
Kazu Hirata <[email protected]> |
Revert "Don't use Optional::hasValue (NFC)"
This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.
|
| #
aa8feeef |
| 25-Jun-2022 |
Kazu Hirata <[email protected]> |
Don't use Optional::hasValue (NFC)
|
| #
d3919a8c |
| 20-Jun-2022 |
David Candler <[email protected]> |
[ConstantFolding] Respect denormal handling mode attributes when folding instructions
Depending on the environment, a floating point instruction should treat denormal inputs as zero, and/or flush a
[ConstantFolding] Respect denormal handling mode attributes when folding instructions
Depending on the environment, a floating point instruction should treat denormal inputs as zero, and/or flush a denormal output to zero. Denormals are not currently accounted for when an instruction gets folded to a constant, which can lead to differences in output between a folded and a unfolded instruction when running on the target. The denormal handling mode can be set by the function level attribute denormal-fp-math, which this patch uses to determine whether any denormal inputs to or outputs from folding should be zero, and that the sign is set appropriately.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D116952
show more ...
|
| #
129b531c |
| 19-Jun-2022 |
Kazu Hirata <[email protected]> |
[llvm] Use value_or instead of getValueOr (NFC)
|
| #
7e64a29e |
| 13-Jun-2022 |
Nikita Popov <[email protected]> |
[InstSimplify][IR] Handle trapping constant aggregate (PR49839)
Unfortunately, it's not just constant expressions that can trap, we might also have a trapping constant expression nested inside a con
[InstSimplify][IR] Handle trapping constant aggregate (PR49839)
Unfortunately, it's not just constant expressions that can trap, we might also have a trapping constant expression nested inside a constant aggregate.
Perform the check during phi folding on Constant rather than ConstantExpr, and extend the Constant::mayTrap() implementation to also recursive into ConstantAggregates, not just ConstantExprs.
Fixes https://github.com/llvm/llvm-project/issues/49839.
show more ...
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
b8c2781f |
| 09-Jun-2022 |
Simon Moll <[email protected]> |
[NFC] format InstructionSimplify & lowerCaseFunctionNames
Clang-format InstructionSimplify and convert all "FunctionName"s to "functionName". This patch does touch a lot of files but gets done with
[NFC] format InstructionSimplify & lowerCaseFunctionNames
Clang-format InstructionSimplify and convert all "FunctionName"s to "functionName". This patch does touch a lot of files but gets done with the cleanup of InstructionSimplify in one commit.
This is the alternative to the less invasive clang-format only patch: D126783
Reviewed By: spatel, rengolin
Differential Revision: https://reviews.llvm.org/D126889
show more ...
|
|
Revision tags: llvmorg-14.0.4 |
|
| #
e8c20d99 |
| 23-May-2022 |
Sanjay Patel <[email protected]> |
[IR] add and use pattern match specialization for sqrt intrinsic; NFC
This was included in D126190 originally, but it's independent and a useful change for readability.
|
| #
f2df53b7 |
| 20-May-2022 |
Craig Topper <[email protected]> |
[InstructionSimplify] Remove multiple 'break' after 'return'. NFC
|
| #
ddfee075 |
| 13-May-2022 |
Nikita Popov <[email protected]> |
[InstSimplify] Fold and/or using implied conditions
This adds two conjugated folds:
* A | B -> B if A implies B (https://alive2.llvm.org/ce/z/R6GU4j) * A & B -> A if A implies B (https://alive2.l
[InstSimplify] Fold and/or using implied conditions
This adds two conjugated folds:
* A | B -> B if A implies B (https://alive2.llvm.org/ce/z/R6GU4j) * A & B -> A if A implies B (https://alive2.llvm.org/ce/z/EGMqyy)
If A and B are icmps themselves, we will usually fold this through other logic already (though the tests show a couple additional cases we previously missed). However, isImpliedCond() also supports A being of the form X & Y, which allows us to handle cases like (X & Y) | B where X implies B. This addresses the regression from D125398.
Something that notably doesn't work yet is the (X | Y) & B case. This is due to an asymmetry in the isImpliedCondition() implementation that will have to be addressed separately.
Differential Revision: https://reviews.llvm.org/D125530
show more ...
|
| #
c077510b |
| 10-May-2022 |
Nikita Popov <[email protected]> |
[InstSimplify] Handle unknown function context in pointer icmp fold (PR54615)
This issue reproduces in the context of LoopDeletion, because the bitcast does not get simplified away there. For a plai
[InstSimplify] Handle unknown function context in pointer icmp fold (PR54615)
This issue reproduces in the context of LoopDeletion, because the bitcast does not get simplified away there. For a plain -inst-simplify run the bitcast would get folded away first.
Fixes https://github.com/llvm/llvm-project/issues/54615.
show more ...
|
| #
eb28da89 |
| 05-May-2022 |
Serge Pavlov <[email protected]> |
[InstCombine] Remove side effect of replaced constrained intrinsics
If a constrained intrinsic call was replaced by some value, it was not removed in some cases. The dangling instruction resulted in
[InstCombine] Remove side effect of replaced constrained intrinsics
If a constrained intrinsic call was replaced by some value, it was not removed in some cases. The dangling instruction resulted in useless instructions executed in runtime. It happened because constrained intrinsics usually have side effect, it is used to model the interaction with floating-point environment. In some cases side effect is actually absent or can be ignored.
This change adds specific treatment of constrained intrinsics so that their side effect can be removed if it actually absents.
Differential Revision: https://reviews.llvm.org/D118426
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
d43d9e1d |
| 08-Apr-2022 |
Kevin P. Neal <[email protected]> |
[FPEnv][InstSimplify] Fold fsub -0.0, -X ==> X
Currently the fsub optimizations in InstSimplify don't know how to fold -0.0 - (-X) to X when the constrained intrinsics are used. This adds partial su
[FPEnv][InstSimplify] Fold fsub -0.0, -X ==> X
Currently the fsub optimizations in InstSimplify don't know how to fold -0.0 - (-X) to X when the constrained intrinsics are used. This adds partial support. The rest of the support will come later with work on the IR matchers.
This review is split out from D107285.
Differential Revision: https://reviews.llvm.org/D123396
show more ...
|
| #
1d530b91 |
| 12-Apr-2022 |
Nikita Popov <[email protected]> |
[InstSimplify] Don't fold phi of poison and trapping const expr (PR49839)
Folding this case would result in the constant expression being executed unconditionally, which may introduce a new trap.
F
[InstSimplify] Don't fold phi of poison and trapping const expr (PR49839)
Folding this case would result in the constant expression being executed unconditionally, which may introduce a new trap.
Fixes https://github.com/llvm/llvm-project/issues/49839.
show more ...
|
| #
447a4485 |
| 30-Mar-2022 |
Hirochika Matsumoto <[email protected]> |
[InstSimplify] Fold (ctpop(X) == N) || (X != 0) into X != 0 where N > 0
(ctpop(X) == N) || (X != 0) --> (X != 0) https://alive2.llvm.org/ce/z/udgUVV (ctpop(X) != N) && (X == 0) --> (X == 0) https://
[InstSimplify] Fold (ctpop(X) == N) || (X != 0) into X != 0 where N > 0
(ctpop(X) == N) || (X != 0) --> (X != 0) https://alive2.llvm.org/ce/z/udgUVV (ctpop(X) != N) && (X == 0) --> (X == 0) https://alive2.llvm.org/ce/z/9dq-cR
Differential Revision: https://reviews.llvm.org/D122757
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4 |
|
| #
02c21060 |
| 11-Mar-2022 |
Nikita Popov <[email protected]> |
[InstSimplify] Handle vector GEP when simplifying zero indices
If the base is a scalar and the index is a vector, we can't simplify, as this is effectively a splat operation.
|
|
Revision tags: llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
71c3a551 |
| 28-Feb-2022 |
serge-sans-paille <[email protected]> |
Cleanup includes: LLVMAnalysis
Number of lines output by preprocessor: before: 1065940348 after: 1065307662
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Diff
Cleanup includes: LLVMAnalysis
Number of lines output by preprocessor: before: 1065940348 after: 1065307662
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120659
show more ...
|
| #
fc3b34c5 |
| 23-Feb-2022 |
Sanjay Patel <[email protected]> |
[InstSimplify] remove shift that is redundant with part of funnel shift
In D111530, I suggested that we add some relatively basic pattern-matching folds for shifts and funnel shifts and avoid a more
[InstSimplify] remove shift that is redundant with part of funnel shift
In D111530, I suggested that we add some relatively basic pattern-matching folds for shifts and funnel shifts and avoid a more specialized solution if possible.
We can start by implementing at least one of these in IR because it's easier to write the code and verify with Alive2: https://alive2.llvm.org/ce/z/qHpmNn
This will need to be adapted/extended for SDAG to handle the motivating bug ( #49541 ) because the patterns only appear later with that example (added some tests: bb850d422b64)
This can be extended within InstSimplify to handle cases where we 'and' with a shift too (in that case, kill the funnel shift). We could also handle patterns where the shift and funnel shift directions are inverted, but I think it's better to canonicalize that instead to avoid pattern-match case explosion.
Differential Revision: https://reviews.llvm.org/D120253
show more ...
|
| #
34a9642a |
| 18-Feb-2022 |
Philip Reames <[email protected]> |
Revert "[instsimplify] Simplify HaveNonOverlappingStorage per review suggestion on D120133 [NFC]"
This reverts commit 3a6be124cc01191ec52192017791bb04a6c7295a. This appears to have caused a stage2
Revert "[instsimplify] Simplify HaveNonOverlappingStorage per review suggestion on D120133 [NFC]"
This reverts commit 3a6be124cc01191ec52192017791bb04a6c7295a. This appears to have caused a stage2 build failure: https://lab.llvm.org/buildbot/#/builders/168/builds/4813
Will investigate further on Monday and recommit.
show more ...
|