United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6717150 improper constant folding of subnormal strictfp multiplications and divides
JDK-6717150 : improper constant folding of subnormal strictfp multiplications and divides

Details
Type:
Bug
Submit Date:
2008-06-20
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris
Sub-Component:
compiler
CPU:
x86
Priority:
P1
Resolution:
Fixed
Affected Versions:
hs13
Fixed Versions:
hs13 (b03)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
JCK 6b
JDK 6u6p b01

solaris-x86 32-bit

test lang/TYPE/type044/type04404/type04404.html fails id -server -Xcomp specified.

steps to reproduce:

run the command

/export/JDK/jre1.6.0_06/bin/java -server -Xcomp -Xconcgc -Djava.awt.headless=true -Djava.ext.dirs=/net/stt-13.russia/export/stt/jck_promotions/6b/b24/binaries/JCK-runtime-6b/lib/extensions:/export/JDK/jre1.6.0_06/lib/ext:/export/JDK/jre1.6.0_06/jre/lib/ext -Xfuture -classpath /net/stt-13.russia/export/stt/jck_promotions/6b/b24/binaries/JCK-runtime-6b/classes:/export/JDK/jre1.6.0_06/lib/tools.jar -Djava.security.policy=/net/stt-13.russia/export/stt/jck_promotions/6b/b24/binaries/JCK-runtime-6b/lib/jck.policy javasoft.sqe.tests.lang.type044.type04404.type04404

it will report:
type04404: failure # 1
type04404: failure # 2

                                    

Comments
EVALUATION

Fails on d32 when compiling javasoft/sqe/tests/lang/type044/type04404/type04404.run.

Not sure exactly what triggered this change in testing. Older VMs
will uncommon_trap in this method; newer VMs that compile the method
as expected reduce the entire method to a simple return.

When C2 compiles this method incorrectly, a dmul bytecode
is wrongly folded by MulDNode::mul_ring(), with a result that is off
by one bit. A subsequent CmpD then always folds as not equal.

This may be a strict fp issue, but needs more investigation.
*** (#1 of 1): [ UNSAVED ] ###@###.###
                                     
2008-06-20
EVALUATION

This looks to be a compile time folding variant of 4462517. The fix will likely
be to avoid folding doouble multiply and divides in strictfp mode.
                                     
2008-06-23
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/78c058bc5cdc
                                     
2008-10-14



Hardware and Software, Engineered to Work Together