< prev index next >

src/hotspot/share/opto/addnode.hpp

Print this page
rev 53028 : 8212043: Add floating-point Math.min/max intrinsics
Summary: Floating-point Math.min() and Math.max() intrinsics are enabled on AArch64 platform
Reviewed-by: adinn, aph

*** 247,252 **** --- 247,300 ---- virtual const Type *bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); }; + //------------------------------MaxFNode--------------------------------------- + // Maximum of 2 floats. + class MaxFNode : public MaxNode { + public: + MaxFNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} + virtual int Opcode() const; + virtual const Type *add_ring(const Type*, const Type*) const { return Type::FLOAT; } + virtual const Type *add_id() const { return TypeF::NEG_INF; } + virtual const Type *bottom_type() const { return Type::FLOAT; } + virtual uint ideal_reg() const { return Op_RegF; } + }; + + //------------------------------MinFNode--------------------------------------- + // Minimum of 2 floats. + class MinFNode : public MaxNode { + public: + MinFNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} + virtual int Opcode() const; + virtual const Type *add_ring(const Type*, const Type*) const { return Type::FLOAT; } + virtual const Type *add_id() const { return TypeF::POS_INF; } + virtual const Type *bottom_type() const { return Type::FLOAT; } + virtual uint ideal_reg() const { return Op_RegF; } + }; + + //------------------------------MaxDNode--------------------------------------- + // Maximum of 2 doubles. + class MaxDNode : public MaxNode { + public: + MaxDNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} + virtual int Opcode() const; + virtual const Type *add_ring(const Type*, const Type*) const { return Type::DOUBLE; } + virtual const Type *add_id() const { return TypeD::NEG_INF; } + virtual const Type *bottom_type() const { return Type::DOUBLE; } + virtual uint ideal_reg() const { return Op_RegD; } + }; + + //------------------------------MinDNode--------------------------------------- + // Minimum of 2 doubles. + class MinDNode : public MaxNode { + public: + MinDNode(Node *in1, Node *in2) : MaxNode(in1, in2) {} + virtual int Opcode() const; + virtual const Type *add_ring(const Type*, const Type*) const { return Type::DOUBLE; } + virtual const Type *add_id() const { return TypeD::POS_INF; } + virtual const Type *bottom_type() const { return Type::DOUBLE; } + virtual uint ideal_reg() const { return Op_RegD; } + }; + #endif // SHARE_VM_OPTO_ADDNODE_HPP
< prev index next >