[llvm] r196462 - Try harder to get a consistent floating point results.

Rafael Espindola rafael.espindola at gmail.com
Wed Dec 4 20:14:33 PST 2013


Author: rafael
Date: Wed Dec  4 22:14:33 2013
New Revision: 196462

URL: http://llvm.org/viewvc/llvm-project?rev=196462&view=rev
Log:
Try harder to get a consistent floating point results.

This just extends the existing hack. It should be enough to get a reproducible bootstrap
on 32 bits.

I will open a bug to track getting a real fix for this.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=196462&r1=196461&r2=196462&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Wed Dec  4 22:14:33 2013
@@ -2351,7 +2351,7 @@ bool SelectionDAGBuilder::handleBTSplitS
     volatile double RDensity =
       (double)RSize.roundToDouble() /
                            (Last - RBegin + 1ULL).roundToDouble();
-    double Metric = Range.logBase2()*(LDensity+RDensity);
+    volatile double Metric = Range.logBase2()*(LDensity+RDensity);
     // Should always split in some non-trivial place
     DEBUG(dbgs() <<"=>Step\n"
                  << "LEnd: " << LEnd << ", RBegin: " << RBegin << '\n'





More information about the llvm-commits mailing list