[llvm] r244754 - [ValueTracking] Tweak a comment slightly

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 08:11:43 PDT 2015


Author: jamesm
Date: Wed Aug 12 10:11:43 2015
New Revision: 244754

URL: http://llvm.org/viewvc/llvm-project?rev=244754&view=rev
Log:
[ValueTracking] Tweak a comment slightly

Hal asked for this change in D11146, but I missed it when I committed originally.

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

Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=244754&r1=244753&r2=244754&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Wed Aug 12 10:11:43 2015
@@ -3545,7 +3545,7 @@ static SelectPatternResult matchSelectPa
       // returns the RHS.
       Ordered = true;
       if (LHSSafe)
-        // LHS is non-NaN, so RHS is NaN.
+        // LHS is non-NaN, so if RHS is NaN then NaN will be returned.
         NaNBehavior = SPNB_RETURNS_NAN;
       else if (RHSSafe)
         NaNBehavior = SPNB_RETURNS_OTHER;
@@ -3557,7 +3557,7 @@ static SelectPatternResult matchSelectPa
       // An unordered comparison will return true when given a NaN, so it
       // returns the LHS.
       if (LHSSafe)
-        // LHS is non-NaN.
+        // LHS is non-NaN, so if RHS is NaN then non-NaN will be returned.
         NaNBehavior = SPNB_RETURNS_OTHER;
       else if (RHSSafe)
         NaNBehavior = SPNB_RETURNS_NAN;




More information about the llvm-commits mailing list