JDK-6964479 : widen normalization of small int and long values should be symmetric
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs19
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2010-06-25
  • Updated: 2011-04-23
  • Resolved: 2011-04-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21pFixed 7Fixed hs19Fixed
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
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.
28-06-2010

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