diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2019-08-14 09:57:20 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2019-08-14 09:57:20 +0000 |
commit | 32f1e1a01d9ad8d00345eb005e362eedf47bb1fb (patch) | |
tree | 7f2809ee1c63d708e1e5d677cd5bc14e3ce9d3aa /llvm/lib/Transforms/InstCombine/InstCombineInternal.h | |
parent | c50959431928097bbd675ff3a2346813982db176 (diff) | |
download | bcm5719-llvm-32f1e1a01d9ad8d00345eb005e362eedf47bb1fb.tar.gz bcm5719-llvm-32f1e1a01d9ad8d00345eb005e362eedf47bb1fb.zip |
[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
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineInternal.h | 3 |
1 files changed, 3 insertions, 0 deletions
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<std::pair<CmpInst::Predicate, Constant *>> +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. |