United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6805724 ModLNode::Ideal() generates functionally incorrect graph when divisor is any (2^k-1) constant.
JDK-6805724 : ModLNode::Ideal() generates functionally incorrect graph when divisor is any (2^k-1) constant.

Details
Type:
Bug
Submit Date:
2009-02-14
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs13
Fixed Versions:
hs15 (b02)

Related Reports
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
C2, ModLNode::Ideal() generates functionally incorrect graph when divisor is
any (2^k-1) constant.

                                    

Comments
EVALUATION

Yes, there is a bug on ModLNode::Ideal() and the suggested fix is correct.
                                     
2009-02-14
EVALUATION

I have written an extensive testcase testing all 2^k-1 long divisors and the failing ones are (just for the record):

1
3
7
f
1f
3f
7f
ff
1ff
3ff
7ff
fff
1fff
6621 != 3525
3fff
3525 != 1997
7fff
1997 != 17621
ffff
17622 != 58202
1ffff
123741 != 111261
3ffff
111261 != 105023
7ffff
105023 != 101904
fffff
626194 != 624632
1fffff
1673210 != 1672428
3fffff
3769582 != 3769190
7fffff
7963495 != 7963299
ffffff
7963299 != 7963202
1ffffff
24740419 != 24740369
3ffffff
24740369 != 24740345
7ffffff
24740345 != 24740333
fffffff
24740333 != 24740327
1fffffff
24740327 != 24740324
3fffffff
561611237 != 561611234
7fffffff
1635353059 != 1635353057
ffffffff
1ffffffff
3ffffffff
7ffffffff
fffffffff
1fffffffff
3fffffffff
7fffffffff
ffffffffff
1ffffffffff
3ffffffffff
7ffffffffff
fffffffffff
1fffffffffff
3fffffffffff
7fffffffffff
ffffffffffff
1ffffffffffff
3ffffffffffff
7ffffffffffff
fffffffffffff
1fffffffffffff
3fffffffffffff
7fffffffffffff
ffffffffffffff
1ffffffffffffff
3ffffffffffffff
7ffffffffffffff
fffffffffffffff
1fffffffffffffff
3fffffffffffffff
7fffffffffffffff
                                     
2009-02-15
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/30663ca5e8f4
                                     
2009-02-16



Hardware and Software, Engineered to Work Together