JDK-6317170 : C2 matcher fails on CmpLTMask in JapaneseImperialCalendar.getActualMinimum
Type:Bug
Component:hotspot
Sub-Component:compiler
Affected Version:6
Priority:P2
Status:Resolved
Resolution:Fixed
OS:generic
CPU:generic
Submitted:2005-08-29
Updated:2010-04-02
Resolved:2005-09-28
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.
CTW testing fails on the indicated method.
The matcher dumps a complex CmpLTMask tree and aborts.
Comments
SUGGESTED FIX
See PRT webrev for 4850474:
http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2005/20050908124746.jrose.mustang-dependencies/workspace/webrevs/webrev-2005.09.09/index.html
28-09-2005
EVALUATION
Long-standing bug.
The problem was the matcher was throwing up on a CmpLTMask whose original 'cmp' node was a CmpL not CmpI; its operands were longs not ints.
The problem shows up in JapaneseImperialCalendar.getActualMinimum, with a comparison of an int against the long constant ONE_DAY. Beats me why the bug shows up now.
29-08-2005
SUGGESTED FIX
------- cfgnode.cpp -------
--- /tmp/sccs.1HayQS Sat Aug 27 16:34:41 2005
+++ cfgnode.cpp Sat Aug 27 16:30:32 2005
@@ -1038,8 +1038,9 @@
if (region->in(1)->outcnt() != 1) return NULL;
if (region->in(2)->outcnt() != 1) return NULL;
- // Check for "(P < Q)"
- if( b->_test._test != BoolTest::lt ) return NULL;
+ // Check for "(P < Q)" of type signed int
+ if (b->_test._test != BoolTest::lt) return NULL;
+ if (cmp->Opcode() != Op_CmpI) return NULL;
Node *p = cmp->in(1);
Node *q = cmp->in(2);