projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c04d08c
)
[ConstraintElim] Allow and check preconditions in doesHold.
author
Florian Hahn
<flo@fhahn.com>
Thu, 29 Jun 2023 08:17:37 +0000
(09:17 +0100)
committer
Florian Hahn
<flo@fhahn.com>
Thu, 29 Jun 2023 08:17:37 +0000
(09:17 +0100)
Delegate checking of the constraint & its preconditions to the existing
::isValid. This reduces duplication and allows additional optimizations
together with D152730.
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
index
afa554c
..
864f0a1
100644
(file)
--- a/
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+++ b/
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
@@
-693,7
+693,7
@@
ConstraintTy::isImpliedBy(const ConstraintSystem &CS) const {
bool ConstraintInfo::doesHold(CmpInst::Predicate Pred, Value *A,
Value *B) const {
auto R = getConstraintForSolving(Pred, A, B);
- return R.
Preconditions.empty() && !R.empty(
) &&
+ return R.
isValid(*this
) &&
getCS(R.IsSigned).isConditionImplied(R.Coefficients);
}