Mercurial > hg > truffle
comparison src/share/vm/opto/mulnode.cpp @ 6853:d804e148cff8
Merge
author | kvn |
---|---|
date | Fri, 12 Oct 2012 09:22:52 -0700 |
parents | b9a9ed0f8eeb f6badecb7ea7 |
children | 67f4c477c9ab |
comparison
equal
deleted
inserted
replaced
6842:b9a9ed0f8eeb | 6853:d804e148cff8 |
---|---|
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. |