diff options
| author | Chad Rosier <mcrosier@codeaurora.org> | 2016-04-21 16:18:02 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@codeaurora.org> | 2016-04-21 16:18:02 +0000 |
| commit | 99bc480bc31b39c98a5192b2b9b145a692ad1207 (patch) | |
| tree | 2c349b8335d540480a10c750698369660020a55b | |
| parent | 6ffe718c6459e4cb500dd432bf11bd19c082295c (diff) | |
| download | bcm5719-llvm-99bc480bc31b39c98a5192b2b9b145a692ad1207.tar.gz bcm5719-llvm-99bc480bc31b39c98a5192b2b9b145a692ad1207.zip | |
Address Philip's post-commit feedback for r266987. NFC.
llvm-svn: 266998
| -rw-r--r-- | llvm/include/llvm/IR/InstrTypes.h | 12 | ||||
| -rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/IR/Instructions.cpp | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h index ebf9ab0a707..4e85d830d2c 100644 --- a/llvm/include/llvm/IR/InstrTypes.h +++ b/llvm/include/llvm/IR/InstrTypes.h @@ -1069,14 +1069,14 @@ public: /// @brief Determine if Pred1 implies Pred2 is true when two compares have /// matching operands. - bool isTrueWhenOperandsMatch(Predicate Pred2) { - return isTrueWhenOperandsMatch(getPredicate(), Pred2); + bool isImpliedTrueByMatchingCmp(Predicate Pred2) { + return isImpliedTrueByMatchingCmp(getPredicate(), Pred2); } /// @brief Determine if Pred1 implies Pred2 is false when two compares have /// matching operands. - bool isFalseWhenOperandsMatch(Predicate Pred2) { - return isFalseWhenOperandsMatch(getPredicate(), Pred2); + bool isImpliedFalseByMatchingCmp(Predicate Pred2) { + return isImpliedFalseByMatchingCmp(getPredicate(), Pred2); } /// @returns true if the predicate is unsigned, false otherwise. @@ -1101,11 +1101,11 @@ public: /// Determine if Pred1 implies Pred2 is true when two compares have matching /// operands. - static bool isTrueWhenOperandsMatch(Predicate Pred1, Predicate Pred2); + static bool isImpliedTrueByMatchingCmp(Predicate Pred1, Predicate Pred2); /// Determine if Pred1 implies Pred2 is false when two compares have matching /// operands. - static bool isFalseWhenOperandsMatch(Predicate Pred1, Predicate Pred2); + static bool isImpliedFalseByMatchingCmp(Predicate Pred1, Predicate Pred2); /// @brief Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const Instruction *I) { diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 0f6b0ec3629..8d52a186b91 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -3935,9 +3935,9 @@ static Optional<bool> isImpliedCondMatchingOperands(CmpInst::Predicate APred, std::swap(BLHS, BRHS); BPred = ICmpInst::getSwappedPredicate(BPred); } - if (CmpInst::isTrueWhenOperandsMatch(APred, BPred)) + if (CmpInst::isImpliedTrueByMatchingCmp(APred, BPred)) return true; - if (CmpInst::isFalseWhenOperandsMatch(APred, BPred)) + if (CmpInst::isImpliedFalseByMatchingCmp(APred, BPred)) return false; return None; diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 02005cfbad9..4f2fbeef5cb 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -3597,7 +3597,7 @@ bool CmpInst::isFalseWhenEqual(Predicate predicate) { } } -bool CmpInst::isTrueWhenOperandsMatch(Predicate Pred1, Predicate Pred2) { +bool CmpInst::isImpliedTrueByMatchingCmp(Predicate Pred1, Predicate Pred2) { // If the predicates match, then we know the first condition implies the // second is true. if (Pred1 == Pred2) @@ -3615,7 +3615,7 @@ bool CmpInst::isTrueWhenOperandsMatch(Predicate Pred1, Predicate Pred2) { return false; } -bool CmpInst::isFalseWhenOperandsMatch(Predicate Pred1, Predicate Pred2) { +bool CmpInst::isImpliedFalseByMatchingCmp(Predicate Pred1, Predicate Pred2) { // If an inverted Pred1 matches Pred2, we can infer the second condition is // false. if (getInversePredicate(Pred1) == Pred2) |

