United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6964479 widen normalization of small int and long values should be symmetric
JDK-6964479 : widen normalization of small int and long values should be symmetric

Details
Type:
Bug
Submit Date:
2010-06-25
Status:
Closed
Updated Date:
2011-04-23
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs19
Fixed Versions:
hs19 (b04)

Related Reports
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
Used by PhiNode::Value() method PhaseCCP::saturate() calls TypeInt::widen() which may call TypeInt::make() which normalizes small ints. On other hand TypeInt::xmeet() does not call TypeInt::make() and does not normalizes small ints. It may trigger next assert:

CompileTheWorld (8531) : javax/imageio/ImageTypeSpecifier

Current function is ccp_type_widens
 1314     assert(t->meet(t0) == t, "Not monotonic");
[t@50 l@50]: print t->dump()
int:1..4
[t@50 l@50]: print t0->dump()
int:2..4:w
[t@50 l@50]: print t->meet(t0)->dump()
int:1..4:w

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/d678e3277048
                                     
2010-06-28
PUBLIC COMMENTS

This issue was found during work on signflip problem.

PhaseCCP::saturate(), used by PhiNode::Value(), calls TypeInt::widen() which may call TypeInt::make() which normalizes small ints. On other hand TypeInt::xmeet() does not call TypeInt::make() and does not normalizes small ints. It may trigger next assert during CCP:

Current function is ccp_type_widens
1314     assert(t->meet(t0) == t, "Not monotonic");

Solution:
Call TypeInt::make() from TypeInt::xmeet() and normalize small ints in TypeInt::xdual() so the type meet will be symmetric.

Passed CTW, JPRT, passed original test with signflip changes.
                                     
2010-06-28



Hardware and Software, Engineered to Work Together