JDK-6805724 : ModLNode::Ideal() generates functionally incorrect graph when divisor is any (2^k-1) constant.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs13
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-02-14
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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
6u14Fixed 7Fixed hs14Fixed
Description
C2, ModLNode::Ideal() generates functionally incorrect graph when divisor is
any (2^k-1) constant.

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

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
15-02-2009

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