src/share/vm/opto/mulnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/mulnode.cpp
src/share/vm/opto/mulnode.cpp
Print this page
*** 481,507 ****
// 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 LoadUSNode(load->in(MemNode::Control),
! load->in(MemNode::Memory),
! load->in(MemNode::Address),
! load->adr_type(),
! TypeInt::CHAR, MemNode::unordered);
ldus = phase->transform(ldus);
return new AndINode(ldus, phase->intcon(mask & 0xFFFF));
}
// Masking sign bits off of a Byte? Do an unsigned byte load plus
// an and.
if (lop == Op_LoadB && (mask & 0xFFFFFF00) == 0) {
! Node* ldub = new LoadUBNode(load->in(MemNode::Control),
! load->in(MemNode::Memory),
! load->in(MemNode::Address),
! load->adr_type(),
! TypeInt::UBYTE, MemNode::unordered);
ldub = phase->transform(ldub);
return new AndINode(ldub, phase->intcon(mask));
}
}
--- 481,499 ----
// 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 = load->as_Load()->convert_to_unsigned_load(*phase);
ldus = phase->transform(ldus);
return new AndINode(ldus, phase->intcon(mask & 0xFFFF));
}
// Masking sign bits off of a Byte? Do an unsigned byte load plus
// an and.
if (lop == Op_LoadB && (mask & 0xFFFFFF00) == 0) {
! Node* ldub = load->as_Load()->convert_to_unsigned_load(*phase);
ldub = phase->transform(ldub);
return new AndINode(ldub, phase->intcon(mask));
}
}
*** 932,946 ****
}
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 LoadSNode( ld->in(MemNode::Control),
! ld->in(MemNode::Memory),
! ld->in(MemNode::Address),
! ld->adr_type(), TypeInt::SHORT,
! MemNode::unordered);
}
// Check for "(byte[i] <<24)>>24" which simply sign-extends
if( shift == 24 &&
(t3 = phase->type(shl->in(2))->isa_int()) &&
--- 924,934 ----
}
else if( can_reshape &&
ld->Opcode() == Op_LoadUS &&
ld->outcnt() == 1 && ld->unique_out() == shl)
// Replace zero-extension-load with sign-extension-load
! return ld->as_Load()->convert_to_signed_load(*phase);
}
// Check for "(byte[i] <<24)>>24" which simply sign-extends
if( shift == 24 &&
(t3 = phase->type(shl->in(2))->isa_int()) &&
src/share/vm/opto/mulnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File