United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6680594 Load + Load isn't canonicalized leading to missed GVN opportunities
JDK-6680594 : Load + Load isn't canonicalized leading to missed GVN opportunities

Details
Type:
Bug
Submit Date:
2008-03-26
Status:
Resolved
Updated Date:
2010-05-21
Project Name:
JDK
Resolved Date:
2008-05-21
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs13
Fixed Versions:
hs13 (b01)

Related Reports
Backport:
Backport:

Sub Tasks

Description
The logic for commuting binary operations ignores the case where both operations are loads so it doesn't canonicalize them based on idx which can lead to missing GVN opportunities.

                                    

Comments
EVALUATION

The fix is simply to handle Load + x and x + Load explicitly and allow Load + Load to fall through.
                                     
2008-03-26
SUGGESTED FIX

repo:       /net/jano2.sfbay/export2/hotspot/hg/hotspot-comp.clean
changeset:  77:8a4ef4e001d3
user:       never
date:       Fri Mar 28 09:00:39 2008 -0700
description:
6680594: Load + Load isn't canonicalized leading to missed GVN opportunities
Reviewed-by: kvn, jrose

files:
src/share/vm/opto/addnode.cpp
                                     
2008-03-28



Hardware and Software, Engineered to Work Together