From 32f1e1a01d9ad8d00345eb005e362eedf47bb1fb Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Wed, 14 Aug 2019 09:57:20 +0000 Subject: [InstCombine] Refactor getFlippedStrictnessPredicateAndConstant() out of canonicalizeCmpWithConstant(), NFCI I'd like to use it elsewhere, hopefully without reinventing the wheel. No functional change intended so far. llvm-svn: 368820 --- llvm/lib/Transforms/InstCombine/InstCombineInternal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h index 957fcd1b9f5..f8225b82ed1 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h +++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h @@ -113,6 +113,9 @@ static inline bool isCanonicalPredicate(CmpInst::Predicate Pred) { } } +llvm::Optional> +getFlippedStrictnessPredicateAndConstant(CmpInst::Predicate Pred, Constant *C); + /// Return the source operand of a potentially bitcasted value while optionally /// checking if it has one use. If there is no bitcast or the one use check is /// not met, return the input value itself. -- cgit v1.2.3