[llvm] VT: teach isImpliedCondMatchingOperands about samesign (PR #122474)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 22:07:26 PST 2025
================
@@ -9374,12 +9374,11 @@ isImpliedCondOperands(CmpInst::Predicate Pred, const Value *ALHS,
/// Return true if "icmp1 LPred X, Y" implies "icmp2 RPred X, Y" is true.
/// Return false if "icmp1 LPred X, Y" implies "icmp2 RPred X, Y" is false.
/// Otherwise, return std::nullopt if we can't infer anything.
-static std::optional<bool>
-isImpliedCondMatchingOperands(CmpInst::Predicate LPred,
- CmpInst::Predicate RPred) {
- if (CmpInst::isImpliedTrueByMatchingCmp(LPred, RPred))
+static std::optional<bool> isImpliedCondMatchingOperands(CmpPredicate LPred,
+ CmpPredicate RPred) {
+ if (ICmpInst::isImpliedTrueByMatchingCmp(LPred, RPred))
----------------
dtcxzyw wrote:
Seems like `isImpliedTrueByMatchingCmp` and `isImpliedFalseByMatchingCmp` are always called together. We can replace them with a helper `std::optional<bool> isImpliedByMatchingCmp` in the future.
https://github.com/llvm/llvm-project/pull/122474
More information about the llvm-commits
mailing list