1050 uint size_of() const { return sizeof(*this); }
1051
1052 public:
1053 VectorStoreMaskNode(Node* in, BasicType in_type, uint num_elem)
1054 : VectorNode(in, TypeVect::make(T_BOOLEAN, num_elem)) {
1055 _mask_size = type2aelembytes(in_type);
1056 }
1057
1058 virtual uint hash() const { return VectorNode::hash() + _mask_size; }
1059 virtual uint cmp( const Node &n ) const {
1060 return VectorNode::cmp(n) && _mask_size == ((VectorStoreMaskNode&)n)._mask_size;
1061 }
1062 int GetInputMaskSize() const { return _mask_size; }
1063 virtual int Opcode() const;
1064 };
1065
1066 // This is intended for use as a simple reinterpret node that has no cast.
1067 class VectorReinterpretNode : public VectorNode {
1068 public:
1069 VectorReinterpretNode(Node* in, const TypeVect* src_vt, const TypeVect* dst_vt)
1070 : VectorNode(in, dst_vt) {
1071 BasicType src_bt = src_vt->element_basic_type();
1072 BasicType dst_bt = dst_vt->element_basic_type();
1073 int src_len = src_vt->length();
1074 int dst_len = dst_vt->length();
1075 // For now require consistency in resulting vector size. Otherwise we will need
1076 // some backend tricks to handle register allocation for size change.
1077 assert(type2aelembytes(src_bt) * src_len == type2aelembytes(dst_bt) * dst_len,
1078 "reinterpreting means we cannot change vector size upwards");
1079 }
1080
1081 virtual int Opcode() const;
1082 };
1083
1084 #endif // SHARE_VM_OPTO_VECTORNODE_HPP
|
1050 uint size_of() const { return sizeof(*this); }
1051
1052 public:
1053 VectorStoreMaskNode(Node* in, BasicType in_type, uint num_elem)
1054 : VectorNode(in, TypeVect::make(T_BOOLEAN, num_elem)) {
1055 _mask_size = type2aelembytes(in_type);
1056 }
1057
1058 virtual uint hash() const { return VectorNode::hash() + _mask_size; }
1059 virtual uint cmp( const Node &n ) const {
1060 return VectorNode::cmp(n) && _mask_size == ((VectorStoreMaskNode&)n)._mask_size;
1061 }
1062 int GetInputMaskSize() const { return _mask_size; }
1063 virtual int Opcode() const;
1064 };
1065
1066 // This is intended for use as a simple reinterpret node that has no cast.
1067 class VectorReinterpretNode : public VectorNode {
1068 public:
1069 VectorReinterpretNode(Node* in, const TypeVect* src_vt, const TypeVect* dst_vt)
1070 : VectorNode(in, dst_vt) { }
1071
1072 virtual int Opcode() const;
1073 };
1074
1075 #endif // SHARE_VM_OPTO_VECTORNODE_HPP
|