[llvm] r289332 - [InstSimplify] improve function name; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 10 09:40:47 PST 2016


Author: spatel
Date: Sat Dec 10 11:40:47 2016
New Revision: 289332

URL: http://llvm.org/viewvc/llvm-project?rev=289332&view=rev
Log:
[InstSimplify] improve function name; NFC

Modified:
    llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=289332&r1=289331&r2=289332&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Sat Dec 10 11:40:47 2016
@@ -2804,9 +2804,11 @@ static Value *simplifyICmpWithBinOp(CmpI
   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
   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




More information about the llvm-commits mailing list