JDK-6930116 : loop predication code does not handle If nodes with only one projection
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2010-02-26
  • Updated: 2010-09-24
  • Resolved: 2010-03-10
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
6u21Fixed 7Fixed hs17Fixed
Description
[1] report_assertion_failure(file_name = 0xfffffd7ffee4e61f "/net/irkutsk/export/home/kvn/work2/hg/hs18_jdk6u20p/hotspot/src/share/vm/opto/multnode.cpp", line_no = 40, message = 0xfffffd7ffee4e67a "assert(Opcode() != Op_If || outcnt() == 2,"bad if #1")"), line 171 in "/net/irkutsk/export/home/kvn/work2/hg/hs18_jdk6u20p/hotspot/src/share/vm/utilities/debug.cpp"
  [2] MultiNode::proj_out(this = 0x3fefee0, which_proj = 0), line 40 in "/net/irkutsk/export/home/kvn/work2/hg/hs18_jdk6u20p/hotspot/src/share/vm/opto/multnode.cpp"
=>[3] PhaseIdealLoop::is_uncommon_trap_if_pattern(this = 0xfffffd7fec7f9e80, proj = 0x3feff90, must_reason_predicate = false), line 1798 in "/net/irkutsk/export/home/kvn/work2/hg/hs18_jdk6u20p/hotspot/src/share/vm/opto/loopTransform.cpp"
  [4] PhaseIdealLoop::loop_predication_impl(this = 0xfffffd7fec7f9e80, loop = 0x2dfbac8), line 2193 in "/net/irkutsk/export/home/kvn/work2/hg/hs18_jdk6u20p/hotspot/src/share/vm/opto/loopTransform.cpp"

[t@18 l@18]: print iff->dump(-2)
 17658  If      ===  17650  17588  [[ 17659 ]] P=0.500000, C=-1.000000
 17659  IfTrue  ===  17658  [[ 19297 ]] #1
 19297  Loop    ===  19297  17659  17694  [[ 19297  17688  17693  17664  17663  17662 ]] inner  !orig=[17661]

[t@18 l@18]: print iff->in(1)->dump(2)
 36     ConI    ===  0  [[ 37  52  ... ]]  #int:1
 20367  Phi     ===  20360  20387  36  [[ 17587 ]]  #bool !orig=[17559]
 17587  CmpI    === _  20367  36  [[ 17588  19129 ]] 
 17588  Bool    === _  17587  [[ 17658 ]] [eq]

Comments
PUBLIC COMMENTS Problem: Loop predication codes expects all If nodes have 2 projections which could be not true for some dead paths. Solution: Add check for iff->outcnt() < 2.
26-02-2010

EVALUATION ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/336c6c200f5f,ChangeRequest=6930116
26-02-2010