summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-12-10 17:40:47 +0000
committerSanjay Patel <spatel@rotateright.com>2016-12-10 17:40:47 +0000
commit35289c62a8884d57b2c9c6cc7f50dbf41ccef15c (patch)
tree946fef36691a1d01642b4338c86b57c4715a89d5 /llvm/lib
parentedd7a7bb40a64b2dc58b3e9fd92259acd20f62d1 (diff)
downloadbcm5719-llvm-35289c62a8884d57b2c9c6cc7f50dbf41ccef15c.tar.gz
bcm5719-llvm-35289c62a8884d57b2c9c6cc7f50dbf41ccef15c.zip
[InstSimplify] improve function name; NFC
llvm-svn: 289332
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index e620e09f5db..b4686a1ff17 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -2804,9 +2804,11 @@ static Value *simplifyICmpWithBinOp(CmpInst::Predicate Pred, Value *LHS,
return nullptr;
}
-/// Simplify comparisons corresponding to integer min/max idioms.
-static Value *simplifyMinMax(CmpInst::Predicate Pred, Value *LHS, Value *RHS,
- const Query &Q, unsigned MaxRecurse) {
+/// Simplify integer comparisons where at least one operand of the compare
+/// matches an integer min/max idiom.
+static Value *simplifyICmpWithMinMax(CmpInst::Predicate Pred, Value *LHS,
+ Value *RHS, const Query &Q,
+ unsigned MaxRecurse) {
Type *ITy = GetCompareTy(LHS); // The return type.
Value *A, *B;
CmpInst::Predicate P = CmpInst::BAD_ICMP_PREDICATE;
@@ -3233,7 +3235,7 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
if (Value *V = simplifyICmpWithBinOp(Pred, LHS, RHS, Q, MaxRecurse))
return V;
- if (Value *V = simplifyMinMax(Pred, LHS, RHS, Q, MaxRecurse))
+ if (Value *V = simplifyICmpWithMinMax(Pred, LHS, RHS, Q, MaxRecurse))
return V;
// Simplify comparisons of related pointers using a powerful, recursive
OpenPOWER on IntegriCloud