United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6930116 loop predication code does not handle If nodes with only one projection
JDK-6930116 : loop predication code does not handle If nodes with only one projection

Details
Type:
Bug
Submit Date:
2010-02-26
Status:
Resolved
Updated Date:
2010-09-24
Project Name:
JDK
Resolved Date:
2010-03-10
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs17
Fixed Versions:
hs17 (b11)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

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
EVALUATION

ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/336c6c200f5f,ChangeRequest=6930116
                                     
2010-02-26
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.
                                     
2010-02-26



Hardware and Software, Engineered to Work Together