From 8990b06eaa88fd42f6d6bc7487eae57cef823f79 Mon Sep 17 00:00:00 2001 From: James Molloy Date: Wed, 12 Aug 2015 15:11:43 +0000 Subject: [PATCH] [ValueTracking] Tweak a comment slightly Hal asked for this change in D11146, but I missed it when I committed originally. llvm-svn: 244754 --- llvm/lib/Analysis/ValueTracking.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index ace60fa..87ab3bb 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -3545,7 +3545,7 @@ static SelectPatternResult matchSelectPattern(CmpInst::Predicate Pred, // 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 matchSelectPattern(CmpInst::Predicate Pred, // 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; -- 2.7.4