comparison src/share/vm/opto/mulnode.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 2113136690bc
children 52b4284cb496
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
483 load->outcnt() == 1 && load->unique_out() == this) { 483 load->outcnt() == 1 && load->unique_out() == this) {
484 if (lop == Op_LoadS && (mask & 0xFFFF0000) == 0 ) { 484 if (lop == Op_LoadS && (mask & 0xFFFF0000) == 0 ) {
485 Node *ldus = new (phase->C) LoadUSNode(load->in(MemNode::Control), 485 Node *ldus = new (phase->C) LoadUSNode(load->in(MemNode::Control),
486 load->in(MemNode::Memory), 486 load->in(MemNode::Memory),
487 load->in(MemNode::Address), 487 load->in(MemNode::Address),
488 load->adr_type(), 488 load->adr_type());
489 TypeInt::CHAR, MemNode::unordered);
490 ldus = phase->transform(ldus); 489 ldus = phase->transform(ldus);
491 return new (phase->C) AndINode(ldus, phase->intcon(mask & 0xFFFF)); 490 return new (phase->C) AndINode(ldus, phase->intcon(mask & 0xFFFF));
492 } 491 }
493 492
494 // Masking sign bits off of a Byte? Do an unsigned byte load plus 493 // Masking sign bits off of a Byte? Do an unsigned byte load plus
495 // an and. 494 // an and.
496 if (lop == Op_LoadB && (mask & 0xFFFFFF00) == 0) { 495 if (lop == Op_LoadB && (mask & 0xFFFFFF00) == 0) {
497 Node* ldub = new (phase->C) LoadUBNode(load->in(MemNode::Control), 496 Node* ldub = new (phase->C) LoadUBNode(load->in(MemNode::Control),
498 load->in(MemNode::Memory), 497 load->in(MemNode::Memory),
499 load->in(MemNode::Address), 498 load->in(MemNode::Address),
500 load->adr_type(), 499 load->adr_type());
501 TypeInt::UBYTE, MemNode::unordered);
502 ldub = phase->transform(ldub); 500 ldub = phase->transform(ldub);
503 return new (phase->C) AndINode(ldub, phase->intcon(mask)); 501 return new (phase->C) AndINode(ldub, phase->intcon(mask));
504 } 502 }
505 } 503 }
506 504
931 else if( can_reshape && 929 else if( can_reshape &&
932 ld->Opcode() == Op_LoadUS && 930 ld->Opcode() == Op_LoadUS &&
933 ld->outcnt() == 1 && ld->unique_out() == shl) 931 ld->outcnt() == 1 && ld->unique_out() == shl)
934 // Replace zero-extension-load with sign-extension-load 932 // Replace zero-extension-load with sign-extension-load
935 return new (phase->C) LoadSNode( ld->in(MemNode::Control), 933 return new (phase->C) LoadSNode( ld->in(MemNode::Control),
936 ld->in(MemNode::Memory), 934 ld->in(MemNode::Memory),
937 ld->in(MemNode::Address), 935 ld->in(MemNode::Address),
938 ld->adr_type(), TypeInt::SHORT, 936 ld->adr_type());
939 MemNode::unordered);
940 } 937 }
941 938
942 // Check for "(byte[i] <<24)>>24" which simply sign-extends 939 // Check for "(byte[i] <<24)>>24" which simply sign-extends
943 if( shift == 24 && 940 if( shift == 24 &&
944 (t3 = phase->type(shl->in(2))->isa_int()) && 941 (t3 = phase->type(shl->in(2))->isa_int()) &&