Author: mramalho
Date: Wed May 30 04:17:55 2018
New Revision: 333529

URL: http://llvm.org/viewvc/llvm-project?rev=333529&view=rev
Log:
Fix a (possible) division by zero check in the CmpRuns script

I missed updating the check in r333375

Modified:
    cfe/trunk/utils/analyzer/CmpRuns.py

Modified: cfe/trunk/utils/analyzer/CmpRuns.py
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/CmpRuns.py?rev=333529&r1=333528&r2=333529&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/CmpRuns.py (original)
+++ cfe/trunk/utils/analyzer/CmpRuns.py Wed May 30 04:17:55 2018
@@ -311,7 +311,7 @@ def compareStats(resultsA, resultsB):
             report = "%.3f -> %.3f" % (valA, valB)
             # Only apply highlighting when writing to TTY and it's not Windows
             if sys.stdout.isatty() and os.name != 'nt':
-                if valA != 0:
+                if valB != 0:
                   ratio = (valB - valA) / valB
                   if ratio < -0.2:
                       report = Colors.GREEN + report + Colors.CLEAR


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to