src/share/vm/opto/divnode.cpp

Print this page

        

@@ -708,15 +708,22 @@
       return TypeD::ONE;
 
   if( t2 == TypeD::ONE )
     return t1;
 
+#if defined(IA32)
+  if (!phase->C->method()->is_strict())
+    // Can't trust native compilers to properly fold strict double
+    // multiplication with round-to-zero on this platform.
+#endif
+    {
   // If divisor is a constant and not zero, divide them numbers
   if( t1->base() == Type::DoubleCon &&
       t2->base() == Type::DoubleCon &&
       t2->getd() != 0.0 ) // could be negative zero
     return TypeD::make( t1->getd()/t2->getd() );
+    }
 
   // If the dividend is a constant zero
   // Note: if t1 and t2 are zero then result is NaN (JVMS page 213)
   // Test TypeF::ZERO is not sufficient as it could be negative zero
   if( t1 == TypeD::ZERO && !g_isnan(t2->getd()) && t2->getd() != 0.0 )