src/share/vm/opto/mulnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/mulnode.cpp Mon Oct 22 19:40:35 2012
--- new/src/share/vm/opto/mulnode.cpp Mon Oct 22 19:40:35 2012
*** 477,486 ****
--- 477,488 ----
if( lop == Op_LoadUS &&
(mask & 0xFFFF0000) ) // Can we make a smaller mask?
return new (phase->C) AndINode(load,phase->intcon(mask&0xFFFF));
// Masking bits off of a Short? Loading a Character does some masking
+ if (can_reshape &&
+ load->outcnt() == 1 && load->unique_out() == this) {
if (lop == Op_LoadS && (mask & 0xFFFF0000) == 0 ) {
Node *ldus = new (phase->C) LoadUSNode(load->in(MemNode::Control),
load->in(MemNode::Memory),
load->in(MemNode::Address),
load->adr_type());
*** 496,505 ****
--- 498,508 ----
load->in(MemNode::Address),
load->adr_type());
ldub = phase->transform(ldub);
return new (phase->C) AndINode(ldub, phase->intcon(mask));
}
+ }
// Masking off sign bits? Dont make them!
if( lop == Op_RShiftI ) {
const TypeInt *t12 = phase->type(load->in(2))->isa_int();
if( t12 && t12->is_con() ) { // Shift is by a constant
*** 921,931 ****
--- 924,936 ----
// combined optimization requires Identity only return direct inputs.
set_req(1, ld);
set_req(2, phase->intcon(0));
return this;
}
! else if( ld->Opcode() == Op_LoadUS )
! else if( can_reshape &&
+ ld->Opcode() == Op_LoadUS &&
+ ld->outcnt() == 1 && ld->unique_out() == shl)
// Replace zero-extension-load with sign-extension-load
return new (phase->C) LoadSNode( ld->in(MemNode::Control),
ld->in(MemNode::Memory),
ld->in(MemNode::Address),
ld->adr_type());
src/share/vm/opto/mulnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File