comparison src/share/vm/opto/mulnode.cpp @ 6849:f6badecb7ea7

7199654: Remove LoadUI2LNode Summary: Removed LoadUI2L node from Ideal nodes, use match rule in .ad files instead. Reviewed-by: kvn
author vlivanov
date Tue, 09 Oct 2012 12:40:05 -0700
parents e626685e9f6c
children d804e148cff8
comparison
equal deleted inserted replaced
6848:8e47bac5643a 6849:f6badecb7ea7
597 const jlong mask = t2->get_con(); 597 const jlong mask = t2->get_con();
598 598
599 Node* in1 = in(1); 599 Node* in1 = in(1);
600 uint op = in1->Opcode(); 600 uint op = in1->Opcode();
601 601
602 // Masking sign bits off of an integer? Do an unsigned integer to
603 // long load.
604 // NOTE: This check must be *before* we try to convert the AndLNode
605 // to an AndINode and commute it with ConvI2LNode because
606 // 0xFFFFFFFFL masks the whole integer and we get a sign extension,
607 // which is wrong.
608 if (op == Op_ConvI2L && in1->in(1)->Opcode() == Op_LoadI && mask == CONST64(0x00000000FFFFFFFF)) {
609 Node* load = in1->in(1);
610 return new (phase->C) LoadUI2LNode(load->in(MemNode::Control),
611 load->in(MemNode::Memory),
612 load->in(MemNode::Address),
613 load->adr_type());
614 }
615
616 // Are we masking a long that was converted from an int with a mask 602 // Are we masking a long that was converted from an int with a mask
617 // that fits in 32-bits? Commute them and use an AndINode. Don't 603 // that fits in 32-bits? Commute them and use an AndINode. Don't
618 // convert masks which would cause a sign extension of the integer 604 // convert masks which would cause a sign extension of the integer
619 // value. This check includes UI2L masks (0x00000000FFFFFFFF) which 605 // value. This check includes UI2L masks (0x00000000FFFFFFFF) which
620 // would be optimized away later in Identity. 606 // would be optimized away later in Identity.