hotspot/src/share/vm/opto/countbitsnode.cpp
changeset 35551 36ef3841fb34
parent 23528 8f1a7f5e8066
equal deleted inserted replaced
35550:633a22d66bd7 35551:36ef3841fb34
    27 #include "opto/opcodes.hpp"
    27 #include "opto/opcodes.hpp"
    28 #include "opto/phaseX.hpp"
    28 #include "opto/phaseX.hpp"
    29 #include "opto/type.hpp"
    29 #include "opto/type.hpp"
    30 
    30 
    31 //------------------------------Value------------------------------------------
    31 //------------------------------Value------------------------------------------
    32 const Type* CountLeadingZerosINode::Value(PhaseTransform* phase) const {
    32 const Type* CountLeadingZerosINode::Value(PhaseGVN* phase) const {
    33   const Type* t = phase->type(in(1));
    33   const Type* t = phase->type(in(1));
    34   if (t == Type::TOP) return Type::TOP;
    34   if (t == Type::TOP) return Type::TOP;
    35   const TypeInt* ti = t->isa_int();
    35   const TypeInt* ti = t->isa_int();
    36   if (ti && ti->is_con()) {
    36   if (ti && ti->is_con()) {
    37     jint i = ti->get_con();
    37     jint i = ti->get_con();
    49   }
    49   }
    50   return TypeInt::INT;
    50   return TypeInt::INT;
    51 }
    51 }
    52 
    52 
    53 //------------------------------Value------------------------------------------
    53 //------------------------------Value------------------------------------------
    54 const Type* CountLeadingZerosLNode::Value(PhaseTransform* phase) const {
    54 const Type* CountLeadingZerosLNode::Value(PhaseGVN* phase) const {
    55   const Type* t = phase->type(in(1));
    55   const Type* t = phase->type(in(1));
    56   if (t == Type::TOP) return Type::TOP;
    56   if (t == Type::TOP) return Type::TOP;
    57   const TypeLong* tl = t->isa_long();
    57   const TypeLong* tl = t->isa_long();
    58   if (tl && tl->is_con()) {
    58   if (tl && tl->is_con()) {
    59     jlong l = tl->get_con();
    59     jlong l = tl->get_con();
    72   }
    72   }
    73   return TypeInt::INT;
    73   return TypeInt::INT;
    74 }
    74 }
    75 
    75 
    76 //------------------------------Value------------------------------------------
    76 //------------------------------Value------------------------------------------
    77 const Type* CountTrailingZerosINode::Value(PhaseTransform* phase) const {
    77 const Type* CountTrailingZerosINode::Value(PhaseGVN* phase) const {
    78   const Type* t = phase->type(in(1));
    78   const Type* t = phase->type(in(1));
    79   if (t == Type::TOP) return Type::TOP;
    79   if (t == Type::TOP) return Type::TOP;
    80   const TypeInt* ti = t->isa_int();
    80   const TypeInt* ti = t->isa_int();
    81   if (ti && ti->is_con()) {
    81   if (ti && ti->is_con()) {
    82     jint i = ti->get_con();
    82     jint i = ti->get_con();
    94   }
    94   }
    95   return TypeInt::INT;
    95   return TypeInt::INT;
    96 }
    96 }
    97 
    97 
    98 //------------------------------Value------------------------------------------
    98 //------------------------------Value------------------------------------------
    99 const Type* CountTrailingZerosLNode::Value(PhaseTransform* phase) const {
    99 const Type* CountTrailingZerosLNode::Value(PhaseGVN* phase) const {
   100   const Type* t = phase->type(in(1));
   100   const Type* t = phase->type(in(1));
   101   if (t == Type::TOP) return Type::TOP;
   101   if (t == Type::TOP) return Type::TOP;
   102   const TypeLong* tl = t->isa_long();
   102   const TypeLong* tl = t->isa_long();
   103   if (tl && tl->is_con()) {
   103   if (tl && tl->is_con()) {
   104     jlong l = tl->get_con();
   104     jlong l = tl->get_con();