[PATCH] D152067: [ConstraintElimination] Handle equality predicates
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 07:55:08 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:134
+
+ ConstraintImpliedTy isImpliedBy(const ConstraintSystem &CS) const;
+
----------------
Might be cleaner to return `std::optional<bool>`? The use-site then becomes:
```
if (auto ImpliedCondition = R.isImpliedBy(CSToUse))
return ReplaceCmpWithConstant(Cmp, *ImpliedCondition);
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152067/new/
https://reviews.llvm.org/D152067
More information about the llvm-commits
mailing list