src/hotspot/share/opto/vectornode.hpp
author phedlin
Wed, 23 Oct 2019 12:51:53 +0200
changeset 58816 77148b8bb7a1
parent 58421 6fc57e391539
permissions -rw-r--r--
8231565: More node budget asserts in fuzzed tests. Reviewed-by: neliasso, thartmann
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52992
diff changeset
     2
 * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 670
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 670
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 670
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52992
diff changeset
    24
#ifndef SHARE_OPTO_VECTORNODE_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52992
diff changeset
    25
#define SHARE_OPTO_VECTORNODE_HPP
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
#include "opto/matcher.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "opto/memnode.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "opto/node.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "opto/opcodes.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
    32
//------------------------------VectorNode-------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
// Vector Operation
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    34
class VectorNode : public TypeNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    35
 public:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    37
  VectorNode(Node* n1, const TypeVect* vt) : TypeNode(vt, 2) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    38
    init_class_id(Class_Vector);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    39
    init_req(1, n1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    40
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    41
  VectorNode(Node* n1, Node* n2, const TypeVect* vt) : TypeNode(vt, 3) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    42
    init_class_id(Class_Vector);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    43
    init_req(1, n1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    44
    init_req(2, n2);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
33469
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
    47
  VectorNode(Node* n1, Node* n2, Node* n3, const TypeVect* vt) : TypeNode(vt, 4) {
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
    48
    init_class_id(Class_Vector);
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
    49
    init_req(1, n1);
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
    50
    init_req(2, n2);
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
    51
    init_req(3, n3);
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
    52
  }
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
    53
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    54
  const TypeVect* vect_type() const { return type()->is_vect(); }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    55
  uint length() const { return vect_type()->length(); } // Vector length
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
    56
  uint length_in_bytes() const { return vect_type()->length_in_bytes(); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    60
  virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
    62
  static VectorNode* scalar2vector(Node* s, uint vlen, const Type* opd_t);
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
    63
  static VectorNode* shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt);
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
    64
  static VectorNode* make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
46528
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
    65
  static VectorNode* make(int opc, Node* n1, Node* n2, Node* n3, uint vlen, BasicType bt);
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    66
13490
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents: 13485
diff changeset
    67
  static int  opcode(int opc, BasicType bt);
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    68
  static bool implemented(int opc, uint vlen, BasicType bt);
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
    69
  static bool is_shift(Node* n);
52992
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
    70
  static bool is_type_transition_short_to_int(Node* n);
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
    71
  static bool is_type_transition_to_int(Node* n);
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
    72
  static bool is_muladds2i(Node* n);
58421
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 54750
diff changeset
    73
  static bool is_roundopD(Node * n);
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
    74
  static bool is_invariant_vector(Node* n);
13490
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents: 13485
diff changeset
    75
  // [Start, end) half-open range defining which operands are vectors
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents: 13485
diff changeset
    76
  static void vector_operands(Node* n, uint* start, uint* end);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
    79
//===========================Vector=ALU=Operations=============================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
    81
//------------------------------AddVBNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
// Vector add byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
class AddVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    85
  AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
    89
//------------------------------AddVSNode--------------------------------------
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    90
// Vector add char/short
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
class AddVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    93
  AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
    97
//------------------------------AddVINode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
// Vector add int
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
class AddVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   101
  AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
30624
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   105
//------------------------------AddVLNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   106
// Vector add long
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   107
class AddVLNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   108
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   109
  AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   110
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   111
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   112
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   113
//------------------------------AddVFNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   114
// Vector add float
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   115
class AddVFNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   116
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   117
  AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   118
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   119
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   120
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   121
//------------------------------AddVDNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   122
// Vector add double
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   123
class AddVDNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   124
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   125
  AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   126
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   127
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   128
30211
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   129
//------------------------------ReductionNode------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   130
// Perform reduction of a vector
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   131
class ReductionNode : public Node {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   132
 public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   133
  ReductionNode(Node *ctrl, Node* in1, Node* in2) : Node(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   134
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   135
  static ReductionNode* make(int opc, Node *ctrl, Node* in1, Node* in2, BasicType bt);
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   136
  static int  opcode(int opc, BasicType bt);
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   137
  static bool implemented(int opc, uint vlen, BasicType bt);
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   138
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   139
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   140
//------------------------------AddReductionVINode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   141
// Vector add int as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   142
class AddReductionVINode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   143
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   144
  AddReductionVINode(Node * ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   145
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   146
  virtual const Type* bottom_type() const { return TypeInt::INT; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   147
  virtual uint ideal_reg() const { return Op_RegI; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   148
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   149
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   150
//------------------------------AddReductionVLNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   151
// Vector add long as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   152
class AddReductionVLNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   153
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   154
  AddReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   155
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   156
  virtual const Type* bottom_type() const { return TypeLong::LONG; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   157
  virtual uint ideal_reg() const { return Op_RegL; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   158
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   159
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   160
//------------------------------AddReductionVFNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   161
// Vector add float as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   162
class AddReductionVFNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   163
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   164
  AddReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   165
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   166
  virtual const Type* bottom_type() const { return Type::FLOAT; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   167
  virtual uint ideal_reg() const { return Op_RegF; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   168
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   169
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   170
//------------------------------AddReductionVDNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   171
// Vector add double as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   172
class AddReductionVDNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   173
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   174
  AddReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   175
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   176
  virtual const Type* bottom_type() const { return Type::DOUBLE; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   177
  virtual uint ideal_reg() const { return Op_RegD; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   178
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   179
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   180
//------------------------------SubVBNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
// Vector subtract byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
class SubVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   184
  SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   188
//------------------------------SubVSNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
// Vector subtract short
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
class SubVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   192
  SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   196
//------------------------------SubVINode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
// Vector subtract int
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
class SubVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   200
  SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   204
//------------------------------SubVLNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
// Vector subtract long
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
class SubVLNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   208
  SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   212
//------------------------------SubVFNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
// Vector subtract float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
class SubVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   216
  SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   220
//------------------------------SubVDNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
// Vector subtract double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
class SubVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   224
  SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
54750
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   228
//------------------------------MulVBNode--------------------------------------
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   229
// Vector multiply byte
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   230
class MulVBNode : public VectorNode {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   231
 public:
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   232
  MulVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   233
  virtual int Opcode() const;
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   234
};
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   235
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   236
//------------------------------MulVSNode--------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   237
// Vector multiply short
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   238
class MulVSNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   239
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   240
  MulVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   241
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   242
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   243
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   244
//------------------------------MulVINode--------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   245
// Vector multiply int
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   246
class MulVINode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   247
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   248
  MulVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   249
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   250
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   251
30624
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   252
//------------------------------MulVLNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   253
// Vector multiply long
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   254
class MulVLNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   255
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   256
  MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   257
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   258
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   259
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   260
//------------------------------MulVFNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   261
// Vector multiply float
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   262
class MulVFNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   263
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   264
  MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   265
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   266
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   267
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   268
//------------------------------MulVDNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   269
// Vector multiply double
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   270
class MulVDNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   271
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   272
  MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   273
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   274
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   275
52992
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
   276
//------------------------------MulAddVS2VINode--------------------------------
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
   277
// Vector multiply shorts to int and add adjacent ints.
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
   278
class MulAddVS2VINode : public VectorNode {
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
   279
  public:
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
   280
    MulAddVS2VINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
   281
    virtual int Opcode() const;
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
   282
};
4bb6e0871bf7 8214751: X86: Support for VNNI Instructions
vdeshpande
parents: 52779
diff changeset
   283
46528
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   284
//------------------------------FmaVDNode--------------------------------------
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   285
// Vector multiply double
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   286
class FmaVDNode : public VectorNode {
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   287
public:
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   288
  FmaVDNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   289
  virtual int Opcode() const;
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   290
};
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   291
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   292
//------------------------------FmaVFNode--------------------------------------
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   293
// Vector multiply float
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   294
class FmaVFNode : public VectorNode {
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   295
public:
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   296
  FmaVFNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   297
  virtual int Opcode() const;
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   298
};
cf0da758e7b5 8181616: FMA Vectorization on x86
vdeshpande
parents: 38049
diff changeset
   299
48309
1a0499fd252e 8192846: Support cmov vectorization for float
kvn
parents: 48089
diff changeset
   300
//------------------------------CMoveVFNode--------------------------------------
1a0499fd252e 8192846: Support cmov vectorization for float
kvn
parents: 48089
diff changeset
   301
// Vector float conditional move
1a0499fd252e 8192846: Support cmov vectorization for float
kvn
parents: 48089
diff changeset
   302
class CMoveVFNode : public VectorNode {
1a0499fd252e 8192846: Support cmov vectorization for float
kvn
parents: 48089
diff changeset
   303
public:
1a0499fd252e 8192846: Support cmov vectorization for float
kvn
parents: 48089
diff changeset
   304
  CMoveVFNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
1a0499fd252e 8192846: Support cmov vectorization for float
kvn
parents: 48089
diff changeset
   305
  virtual int Opcode() const;
1a0499fd252e 8192846: Support cmov vectorization for float
kvn
parents: 48089
diff changeset
   306
};
1a0499fd252e 8192846: Support cmov vectorization for float
kvn
parents: 48089
diff changeset
   307
33469
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   308
//------------------------------CMoveVDNode--------------------------------------
48309
1a0499fd252e 8192846: Support cmov vectorization for float
kvn
parents: 48089
diff changeset
   309
// Vector double conditional move
33469
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   310
class CMoveVDNode : public VectorNode {
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   311
public:
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   312
  CMoveVDNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   313
  virtual int Opcode() const;
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   314
};
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   315
30211
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   316
//------------------------------MulReductionVINode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   317
// Vector multiply int as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   318
class MulReductionVINode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   319
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   320
  MulReductionVINode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   321
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   322
  virtual const Type* bottom_type() const { return TypeInt::INT; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   323
  virtual uint ideal_reg() const { return Op_RegI; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   324
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   325
30624
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   326
//------------------------------MulReductionVLNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   327
// Vector multiply int as a reduction
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   328
class MulReductionVLNode : public ReductionNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   329
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   330
  MulReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
  virtual int Opcode() const;
30624
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   332
  virtual const Type* bottom_type() const { return TypeLong::LONG; }
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   333
  virtual uint ideal_reg() const { return Op_RegI; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
30211
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   336
//------------------------------MulReductionVFNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   337
// Vector multiply float as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   338
class MulReductionVFNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   339
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   340
  MulReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   341
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   342
  virtual const Type* bottom_type() const { return Type::FLOAT; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   343
  virtual uint ideal_reg() const { return Op_RegF; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   344
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   345
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   346
//------------------------------MulReductionVDNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   347
// Vector multiply double as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   348
class MulReductionVDNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   349
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   350
  MulReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   351
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   352
  virtual const Type* bottom_type() const { return Type::DOUBLE; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   353
  virtual uint ideal_reg() const { return Op_RegD; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   354
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   355
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   356
//------------------------------DivVFNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
// Vector divide float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
class DivVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   360
  DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   364
//------------------------------DivVDNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
// Vector Divide double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
class DivVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   368
  DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
54750
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   372
//------------------------------AbsVBNode--------------------------------------
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   373
// Vector Abs byte
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   374
class AbsVBNode : public VectorNode {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   375
public:
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   376
  AbsVBNode(Node* in, const TypeVect* vt) : VectorNode(in, vt) {}
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   377
  virtual int Opcode() const;
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   378
};
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   379
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   380
//------------------------------AbsVSNode--------------------------------------
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   381
// Vector Abs short
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   382
class AbsVSNode : public VectorNode {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   383
public:
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   384
  AbsVSNode(Node* in, const TypeVect* vt) : VectorNode(in, vt) {}
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   385
  virtual int Opcode() const;
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   386
};
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   387
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   388
//------------------------------AbsVINode--------------------------------------
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   389
// Vector Abs int
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   390
class AbsVINode : public VectorNode {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   391
public:
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   392
  AbsVINode(Node* in, const TypeVect* vt) : VectorNode(in, vt) {}
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   393
  virtual int Opcode() const;
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   394
};
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   395
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   396
//------------------------------AbsVLNode--------------------------------------
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   397
// Vector Abs long
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   398
class AbsVLNode : public VectorNode {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   399
public:
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   400
  AbsVLNode(Node* in, const TypeVect* vt) : VectorNode(in, vt) {}
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   401
  virtual int Opcode() const;
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   402
};
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 54066
diff changeset
   403
33088
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   404
//------------------------------AbsVFNode--------------------------------------
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   405
// Vector Abs float
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   406
class AbsVFNode : public VectorNode {
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   407
 public:
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   408
  AbsVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   409
  virtual int Opcode() const;
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   410
};
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   411
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   412
//------------------------------AbsVDNode--------------------------------------
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   413
// Vector Abs double
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   414
class AbsVDNode : public VectorNode {
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   415
 public:
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   416
  AbsVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   417
  virtual int Opcode() const;
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   418
};
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   419
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   420
//------------------------------NegVFNode--------------------------------------
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   421
// Vector Neg float
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   422
class NegVFNode : public VectorNode {
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   423
 public:
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   424
  NegVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   425
  virtual int Opcode() const;
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   426
};
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   427
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   428
//------------------------------NegVDNode--------------------------------------
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   429
// Vector Neg double
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   430
class NegVDNode : public VectorNode {
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   431
 public:
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   432
  NegVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   433
  virtual int Opcode() const;
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   434
};
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   435
49384
b242a1e3f9cf 8199421: Add support for vector popcount
rlupusoru
parents: 48309
diff changeset
   436
//------------------------------PopCountVINode---------------------------------
b242a1e3f9cf 8199421: Add support for vector popcount
rlupusoru
parents: 48309
diff changeset
   437
// Vector popcount integer bits
b242a1e3f9cf 8199421: Add support for vector popcount
rlupusoru
parents: 48309
diff changeset
   438
class PopCountVINode : public VectorNode {
b242a1e3f9cf 8199421: Add support for vector popcount
rlupusoru
parents: 48309
diff changeset
   439
 public:
b242a1e3f9cf 8199421: Add support for vector popcount
rlupusoru
parents: 48309
diff changeset
   440
  PopCountVINode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
b242a1e3f9cf 8199421: Add support for vector popcount
rlupusoru
parents: 48309
diff changeset
   441
  virtual int Opcode() const;
b242a1e3f9cf 8199421: Add support for vector popcount
rlupusoru
parents: 48309
diff changeset
   442
};
b242a1e3f9cf 8199421: Add support for vector popcount
rlupusoru
parents: 48309
diff changeset
   443
48089
22c9856fc2c2 8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents: 47216
diff changeset
   444
//------------------------------SqrtVFNode--------------------------------------
22c9856fc2c2 8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents: 47216
diff changeset
   445
// Vector Sqrt float
22c9856fc2c2 8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents: 47216
diff changeset
   446
class SqrtVFNode : public VectorNode {
22c9856fc2c2 8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents: 47216
diff changeset
   447
 public:
22c9856fc2c2 8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents: 47216
diff changeset
   448
  SqrtVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
22c9856fc2c2 8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents: 47216
diff changeset
   449
  virtual int Opcode() const;
22c9856fc2c2 8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents: 47216
diff changeset
   450
};
58421
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 54750
diff changeset
   451
//------------------------------RoundDoubleVNode--------------------------------
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 54750
diff changeset
   452
// Vector round double
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 54750
diff changeset
   453
class RoundDoubleModeVNode : public VectorNode {
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 54750
diff changeset
   454
 public:
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 54750
diff changeset
   455
  RoundDoubleModeVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 54750
diff changeset
   456
  virtual int Opcode() const;
6fc57e391539 8226721: Missing intrinsics for Math.ceil, floor, rint
neliasso
parents: 54750
diff changeset
   457
};
48089
22c9856fc2c2 8190800: Support vectorization of Math.sqrt() on floats
rlupusoru
parents: 47216
diff changeset
   458
32723
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   459
//------------------------------SqrtVDNode--------------------------------------
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   460
// Vector Sqrt double
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   461
class SqrtVDNode : public VectorNode {
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   462
 public:
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   463
  SqrtVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   464
  virtual int Opcode() const;
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   465
};
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   466
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   467
//------------------------------LShiftVBNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   468
// Vector left shift bytes
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
class LShiftVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   471
  LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   474
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   475
//------------------------------LShiftVSNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   476
// Vector left shift shorts
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   477
class LShiftVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   478
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   479
  LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   481
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   482
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   483
//------------------------------LShiftVINode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   484
// Vector left shift ints
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   485
class LShiftVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   486
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   487
  LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   488
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   489
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   490
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   491
//------------------------------LShiftVLNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   492
// Vector left shift longs
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   493
class LShiftVLNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   494
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   495
  LShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   496
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   497
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   498
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   499
//------------------------------RShiftVBNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   500
// Vector right arithmetic (signed) shift bytes
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   501
class RShiftVBNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   502
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   503
  RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   504
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   505
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   506
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   507
//------------------------------RShiftVSNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   508
// Vector right arithmetic (signed) shift shorts
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   509
class RShiftVSNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   511
  RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   512
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   513
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   514
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   515
//------------------------------RShiftVINode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   516
// Vector right arithmetic (signed) shift ints
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   517
class RShiftVINode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   518
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   519
  RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   521
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   522
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   523
//------------------------------RShiftVLNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   524
// Vector right arithmetic (signed) shift longs
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   525
class RShiftVLNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   526
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   527
  RShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   528
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   529
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   530
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   531
//------------------------------URShiftVBNode----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   532
// Vector right logical (unsigned) shift bytes
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   533
class URShiftVBNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   534
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   535
  URShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   536
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   537
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   538
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   539
//------------------------------URShiftVSNode----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   540
// Vector right logical (unsigned) shift shorts
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   541
class URShiftVSNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   542
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   543
  URShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   544
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   545
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   546
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   547
//------------------------------URShiftVINode----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   548
// Vector right logical (unsigned) shift ints
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   549
class URShiftVINode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   550
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   551
  URShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   552
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   553
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   554
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   555
//------------------------------URShiftVLNode----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   556
// Vector right logical (unsigned) shift longs
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   557
class URShiftVLNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   558
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   559
  URShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   560
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   561
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   562
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   563
//------------------------------LShiftCntVNode---------------------------------
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   564
// Vector left shift count
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   565
class LShiftCntVNode : public VectorNode {
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   566
 public:
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   567
  LShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   568
  virtual int Opcode() const;
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   569
  virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   570
};
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   571
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   572
//------------------------------RShiftCntVNode---------------------------------
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   573
// Vector right shift count
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   574
class RShiftCntVNode : public VectorNode {
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   575
 public:
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   576
  RShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   577
  virtual int Opcode() const;
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   578
  virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   579
};
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   580
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   581
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   582
//------------------------------AndVNode---------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   583
// Vector and integer
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   584
class AndVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   585
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   586
  AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   587
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   588
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   589
489c9b5090e2 Initial load
duke
parents:
diff changeset
   590
//------------------------------OrVNode---------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   591
// Vector or integer
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   592
class OrVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   593
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   594
  OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   595
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   596
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   597
489c9b5090e2 Initial load
duke
parents:
diff changeset
   598
//------------------------------XorVNode---------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   599
// Vector xor integer
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   600
class XorVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   601
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   602
  XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   603
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   604
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   605
54066
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   606
//------------------------------MinVNode--------------------------------------
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   607
// Vector min
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   608
class MinVNode : public VectorNode {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   609
public:
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   610
  MinVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   611
  virtual int Opcode() const;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   612
};
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   613
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   614
//------------------------------MaxVNode--------------------------------------
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   615
// Vector max
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   616
class MaxVNode : public VectorNode {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   617
public:
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   618
  MaxVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   619
  virtual int Opcode() const;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   620
};
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   621
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   622
//------------------------------MinReductionVNode--------------------------------------
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   623
// Vector min as a reduction
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   624
class MinReductionVNode : public ReductionNode {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   625
public:
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   626
  MinReductionVNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   627
  virtual int Opcode() const;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   628
  virtual const Type* bottom_type() const {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   629
    BasicType bt = in(1)->bottom_type()->basic_type();
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   630
    if (bt == T_FLOAT) {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   631
      return Type::FLOAT;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   632
    } else if (bt == T_DOUBLE) {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   633
      return Type::DOUBLE;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   634
    }
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   635
    assert(false, "unsupported basic type");
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   636
    return NULL;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   637
  }
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   638
  virtual uint ideal_reg() const {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   639
    BasicType bt = in(1)->bottom_type()->basic_type();
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   640
    if (bt == T_FLOAT) {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   641
      return Op_RegF;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   642
    } else if (bt == T_DOUBLE) {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   643
      return Op_RegD;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   644
    }
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   645
    assert(false, "unsupported basic type");
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   646
    return 0;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   647
  }
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   648
};
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   649
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   650
//------------------------------MaxReductionVNode--------------------------------------
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   651
// Vector max as a reduction
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   652
class MaxReductionVNode : public ReductionNode {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   653
public:
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   654
  MaxReductionVNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   655
  virtual int Opcode() const;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   656
  virtual const Type* bottom_type() const {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   657
    BasicType bt = in(1)->bottom_type()->basic_type();
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   658
    if (bt == T_FLOAT) {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   659
      return Type::FLOAT;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   660
    } else {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   661
      return Type::DOUBLE;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   662
    }
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   663
    assert(false, "unsupported basic type");
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   664
    return NULL;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   665
  }
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   666
  virtual uint ideal_reg() const {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   667
    BasicType bt = in(1)->bottom_type()->basic_type();
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   668
    if (bt == T_FLOAT) {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   669
      return Op_RegF;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   670
    } else {
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   671
      return Op_RegD;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   672
    }
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   673
    assert(false, "unsupported basic type");
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   674
    return 0;
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   675
  }
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   676
};
1dbe0c210134 8214922: Add vectorization support for fmin/fmax
pli
parents: 53244
diff changeset
   677
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   678
//================================= M E M O R Y ===============================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   679
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   680
//------------------------------LoadVectorNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   681
// Load Vector from memory
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   682
class LoadVectorNode : public LoadNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   683
 public:
31035
0f0743952c41 8077504: Unsafe load can loose control dependency and cause crash
roland
parents: 30624
diff changeset
   684
  LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest)
0f0743952c41 8077504: Unsafe load can loose control dependency and cause crash
roland
parents: 30624
diff changeset
   685
    : LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) {
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   686
    init_class_id(Class_LoadVector);
52779
a432469d2ed5 8214344: C2: assert(con.basic_type() != T_ILLEGAL) failed: elembt=byte; loadbt=void; unsigned=0
roland
parents: 49384
diff changeset
   687
    set_mismatched_access();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   688
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   689
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   690
  const TypeVect* vect_type() const { return type()->is_vect(); }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   691
  uint length() const { return vect_type()->length(); } // Vector length
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   692
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   693
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   694
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   695
  virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   696
  virtual BasicType memory_type() const { return T_VOID; }
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   697
  virtual int memory_size() const { return vect_type()->length_in_bytes(); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   698
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   699
  virtual int store_Opcode() const { return Op_StoreVector; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   700
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
   701
  static LoadVectorNode* make(int opc, Node* ctl, Node* mem,
31035
0f0743952c41 8077504: Unsafe load can loose control dependency and cause crash
roland
parents: 30624
diff changeset
   702
                              Node* adr, const TypePtr* atyp,
0f0743952c41 8077504: Unsafe load can loose control dependency and cause crash
roland
parents: 30624
diff changeset
   703
                              uint vlen, BasicType bt,
0f0743952c41 8077504: Unsafe load can loose control dependency and cause crash
roland
parents: 30624
diff changeset
   704
                              ControlDependency control_dependency = LoadNode::DependsOnlyOnTest);
38049
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   705
  uint element_size(void) { return type2aelembytes(vect_type()->element_basic_type()); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   706
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   707
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   708
//------------------------------StoreVectorNode--------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   709
// Store Vector to memory
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   710
class StoreVectorNode : public StoreNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   711
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   712
  StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
22845
d8812d0ff387 8024921: PPC64 (part 113): Extend Load and Store nodes to know about memory ordering
goetz
parents: 13930
diff changeset
   713
    : StoreNode(c, mem, adr, at, val, MemNode::unordered) {
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   714
    assert(val->is_Vector() || val->is_LoadVector(), "sanity");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   715
    init_class_id(Class_StoreVector);
52779
a432469d2ed5 8214344: C2: assert(con.basic_type() != T_ILLEGAL) failed: elembt=byte; loadbt=void; unsigned=0
roland
parents: 49384
diff changeset
   716
    set_mismatched_access();
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   717
  }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   718
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   719
  const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   720
  uint length() const { return vect_type()->length(); } // Vector length
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   721
489c9b5090e2 Initial load
duke
parents:
diff changeset
   722
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   723
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   724
  virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   725
  virtual BasicType memory_type() const { return T_VOID; }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   726
  virtual int memory_size() const { return vect_type()->length_in_bytes(); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   727
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
   728
  static StoreVectorNode* make(int opc, Node* ctl, Node* mem,
10255
bab46e6f7661 7069452: Cleanup NodeFlags
kvn
parents: 9101
diff changeset
   729
                               Node* adr, const TypePtr* atyp, Node* val,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   730
                               uint vlen);
38049
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   731
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   732
  uint element_size(void) { return type2aelembytes(vect_type()->element_basic_type()); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   733
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   734
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   735
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   736
//=========================Promote_Scalar_to_Vector============================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   737
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   738
//------------------------------ReplicateBNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   739
// Replicate byte scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   740
class ReplicateBNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   741
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   742
  ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   743
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   744
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   745
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   746
//------------------------------ReplicateSNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   747
// Replicate short scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   748
class ReplicateSNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   749
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   750
  ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   751
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   752
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   753
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   754
//------------------------------ReplicateINode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   755
// Replicate int scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   756
class ReplicateINode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   757
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   758
  ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   759
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   760
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   761
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   762
//------------------------------ReplicateLNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   763
// Replicate long scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   764
class ReplicateLNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   765
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   766
  ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   767
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   768
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   769
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   770
//------------------------------ReplicateFNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   771
// Replicate float scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   772
class ReplicateFNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   773
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   774
  ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   775
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   776
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   777
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   778
//------------------------------ReplicateDNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   779
// Replicate double scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   780
class ReplicateDNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   781
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   782
  ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   783
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   784
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   785
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   786
//========================Pack_Scalars_into_a_Vector===========================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   787
489c9b5090e2 Initial load
duke
parents:
diff changeset
   788
//------------------------------PackNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   789
// Pack parent class (not for code generation).
489c9b5090e2 Initial load
duke
parents:
diff changeset
   790
class PackNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   791
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   792
  PackNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   793
  PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   794
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   795
13490
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents: 13485
diff changeset
   796
  void add_opd(Node* n) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents: 13485
diff changeset
   797
    add_req(n);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   798
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   799
489c9b5090e2 Initial load
duke
parents:
diff changeset
   800
  // Create a binary tree form for Packs. [lo, hi) (half-open) range
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
   801
  PackNode* binary_tree_pack(int lo, int hi);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   802
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
   803
  static PackNode* make(Node* s, uint vlen, BasicType bt);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   804
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   805
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   806
//------------------------------PackBNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   807
// Pack byte scalars into vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   808
class PackBNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   809
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   810
  PackBNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   811
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   812
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   813
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   814
//------------------------------PackSNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   815
// Pack short scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   816
class PackSNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   817
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   818
  PackSNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   819
  PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   820
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   821
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   822
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   823
//------------------------------PackINode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   824
// Pack integer scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   825
class PackINode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   826
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   827
  PackINode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   828
  PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   829
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   830
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   831
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   832
//------------------------------PackLNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   833
// Pack long scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   834
class PackLNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   835
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   836
  PackLNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   837
  PackLNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   838
  virtual int Opcode() const;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   839
};
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   840
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   841
//------------------------------Pack2LNode-------------------------------------
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   842
// Pack 2 long scalars into a vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   843
class Pack2LNode : public PackNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   844
 public:
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   845
  Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   846
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   847
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   848
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   849
//------------------------------PackFNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   850
// Pack float scalars into vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   851
class PackFNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   852
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   853
  PackFNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   854
  PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   855
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   856
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   857
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   858
//------------------------------PackDNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   859
// Pack double scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   860
class PackDNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   861
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   862
  PackDNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   863
  PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   864
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   865
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   866
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   867
//------------------------------Pack2DNode-------------------------------------
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   868
// Pack 2 double scalars into a vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   869
class Pack2DNode : public PackNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   870
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   871
  Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   872
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   873
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   874
489c9b5090e2 Initial load
duke
parents:
diff changeset
   875
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   876
//========================Extract_Scalar_from_Vector===========================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   877
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   878
//------------------------------ExtractNode------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   879
// Extract a scalar from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   880
class ExtractNode : public Node {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   881
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   882
  ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   883
    assert(in(2)->get_int() >= 0, "positive constants");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   884
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   885
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   886
  uint  pos() const { return in(2)->get_int(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   887
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
   888
  static Node* make(Node* v, uint position, BasicType bt);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   889
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   890
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   891
//------------------------------ExtractBNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   892
// Extract a byte from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   893
class ExtractBNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   894
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   895
  ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   896
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   897
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   898
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   899
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   900
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   901
//------------------------------ExtractUBNode----------------------------------
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   902
// Extract a boolean from a vector at position "pos"
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   903
class ExtractUBNode : public ExtractNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   904
 public:
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   905
  ExtractUBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   906
  virtual int Opcode() const;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   907
  virtual const Type *bottom_type() const { return TypeInt::INT; }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   908
  virtual uint ideal_reg() const { return Op_RegI; }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   909
};
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   910
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   911
//------------------------------ExtractCNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   912
// Extract a char from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   913
class ExtractCNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   914
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   915
  ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   916
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   917
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   918
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   919
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   920
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   921
//------------------------------ExtractSNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   922
// Extract a short from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   923
class ExtractSNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   924
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   925
  ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   926
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   927
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   928
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   929
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   930
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   931
//------------------------------ExtractINode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   932
// Extract an int from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   933
class ExtractINode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   934
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   935
  ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   936
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   937
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   938
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   939
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   940
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   941
//------------------------------ExtractLNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   942
// Extract a long from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   943
class ExtractLNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   944
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   945
  ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   946
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   947
  virtual const Type *bottom_type() const { return TypeLong::LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   948
  virtual uint ideal_reg() const { return Op_RegL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   949
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   950
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   951
//------------------------------ExtractFNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   952
// Extract a float from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   953
class ExtractFNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   954
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   955
  ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   956
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   957
  virtual const Type *bottom_type() const { return Type::FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   958
  virtual uint ideal_reg() const { return Op_RegF; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   959
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   960
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   961
//------------------------------ExtractDNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   962
// Extract a double from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   963
class ExtractDNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   964
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   965
  ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   966
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   967
  virtual const Type *bottom_type() const { return Type::DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   968
  virtual uint ideal_reg() const { return Op_RegD; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   969
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   970
38049
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   971
//------------------------------SetVectMaskINode-------------------------------
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   972
// Provide a mask for a vector predicate machine
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   973
class SetVectMaskINode : public Node {
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   974
public:
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   975
  SetVectMaskINode(Node *c, Node *in1) : Node(c, in1) {}
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   976
  virtual int Opcode() const;
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   977
  const Type *bottom_type() const { return TypeInt::INT; }
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   978
  virtual uint ideal_reg() const { return Op_RegI; }
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   979
  virtual const Type *Value(PhaseGVN *phase) const { return TypeInt::INT; }
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   980
};
e8541793960f 8153998: Masked vector post loops
mcberg
parents: 33469
diff changeset
   981
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 52992
diff changeset
   982
#endif // SHARE_OPTO_VECTORNODE_HPP