diff src/cpu/ppc/vm/ppc.ad @ 22888:aefa2e84b424

8074869: C2 code generator can replace -0.0f with +0.0f on Linux Summary: Instead of 'fpclass', use cast float->int and double->long to check if value is +0.0f and +0.0d, respectively. Reviewed-by: kvn, simonis, dlong
author zmajo
date Thu, 19 Mar 2015 19:53:34 +0100
parents c5e86c5cd22e
children 37a5a1341478
line wrap: on
line diff
--- a/src/cpu/ppc/vm/ppc.ad	Wed Mar 18 18:12:01 2015 -0700
+++ b/src/cpu/ppc/vm/ppc.ad	Thu Mar 19 19:53:34 2015 +0100
@@ -4418,11 +4418,11 @@
   interface(CONST_INTER);
 %}
 
-// constant 'float +0.0'.
+// Float Immediate: +0.0f.
 operand immF_0() %{
-  predicate((n->getf() == 0) &&
-            (fpclassify(n->getf()) == FP_ZERO) && (signbit(n->getf()) == 0));
+  predicate(jint_cast(n->getf()) == 0);
   match(ConF);
+  
   op_cost(0);
   format %{ %}
   interface(CONST_INTER);