[llvm] r266998 - Address Philip's post-commit feedback for r266987. NFC.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 21 09:18:02 PDT 2016
Author: mcrosier
Date: Thu Apr 21 11:18:02 2016
New Revision: 266998
URL: http://llvm.org/viewvc/llvm-project?rev=266998&view=rev
Log:
Address Philip's post-commit feedback for r266987. NFC.
Modified:
llvm/trunk/include/llvm/IR/InstrTypes.h
llvm/trunk/lib/Analysis/ValueTracking.cpp
llvm/trunk/lib/IR/Instructions.cpp
Modified: llvm/trunk/include/llvm/IR/InstrTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/InstrTypes.h?rev=266998&r1=266997&r2=266998&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/InstrTypes.h (original)
+++ llvm/trunk/include/llvm/IR/InstrTypes.h Thu Apr 21 11:18:02 2016
@@ -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) {
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=266998&r1=266997&r2=266998&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Thu Apr 21 11:18:02 2016
@@ -3935,9 +3935,9 @@ static Optional<bool> isImpliedCondMatch
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;
Modified: llvm/trunk/lib/IR/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Instructions.cpp?rev=266998&r1=266997&r2=266998&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Instructions.cpp (original)
+++ llvm/trunk/lib/IR/Instructions.cpp Thu Apr 21 11:18:02 2016
@@ -3597,7 +3597,7 @@ bool CmpInst::isFalseWhenEqual(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(Pr
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)
More information about the llvm-commits
mailing list