hotspot/src/share/vm/opto/vectornode.hpp
author iveresov
Mon, 26 Oct 2015 19:33:31 -0700
changeset 33469 30f4811eded0
parent 33088 34fe49ecee13
child 38049 e8541793960f
permissions -rw-r--r--
8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu Summary: Emit vector conditional moves Reviewed-by: kvn Contributed-by: jan.civlin@intel.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
     2
 * Copyright (c) 2007, 2014, 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
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    24
#ifndef SHARE_VM_OPTO_VECTORNODE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#define SHARE_VM_OPTO_VECTORNODE_HPP
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);
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    65
13490
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents: 13485
diff changeset
    66
  static int  opcode(int opc, BasicType bt);
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    67
  static bool implemented(int opc, uint vlen, BasicType bt);
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
    68
  static bool is_shift(Node* n);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
    69
  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
    70
  // [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
    71
  static void vector_operands(Node* n, uint* start, uint* end);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
    74
//===========================Vector=ALU=Operations=============================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
    76
//------------------------------AddVBNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
// Vector add byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
class AddVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    80
  AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
    84
//------------------------------AddVSNode--------------------------------------
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    85
// Vector add char/short
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
class AddVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    88
  AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
    92
//------------------------------AddVINode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
// Vector add int
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
class AddVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    96
  AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
30624
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   100
//------------------------------AddVLNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   101
// Vector add long
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   102
class AddVLNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   103
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   104
  AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   105
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   106
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   107
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   108
//------------------------------AddVFNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   109
// Vector add float
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   110
class AddVFNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   111
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   112
  AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   113
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   114
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   115
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   116
//------------------------------AddVDNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   117
// Vector add double
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   118
class AddVDNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   119
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   120
  AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   121
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   122
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   123
30211
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   124
//------------------------------ReductionNode------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   125
// Perform reduction of a vector
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   126
class ReductionNode : public Node {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   127
 public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   128
  ReductionNode(Node *ctrl, Node* in1, Node* in2) : Node(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   129
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   130
  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
   131
  static int  opcode(int opc, BasicType bt);
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   132
  static bool implemented(int opc, uint vlen, BasicType bt);
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   133
};
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
//------------------------------AddReductionVINode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   136
// Vector add int as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   137
class AddReductionVINode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   138
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   139
  AddReductionVINode(Node * ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   140
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   141
  virtual const Type* bottom_type() const { return TypeInt::INT; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   142
  virtual uint ideal_reg() const { return Op_RegI; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   143
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   144
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   145
//------------------------------AddReductionVLNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   146
// Vector add long as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   147
class AddReductionVLNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   148
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   149
  AddReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   150
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   151
  virtual const Type* bottom_type() const { return TypeLong::LONG; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   152
  virtual uint ideal_reg() const { return Op_RegL; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   153
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   154
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   155
//------------------------------AddReductionVFNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   156
// Vector add float as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   157
class AddReductionVFNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   158
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   159
  AddReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   160
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   161
  virtual const Type* bottom_type() const { return Type::FLOAT; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   162
  virtual uint ideal_reg() const { return Op_RegF; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   163
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   164
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   165
//------------------------------AddReductionVDNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   166
// Vector add double as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   167
class AddReductionVDNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   168
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   169
  AddReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   170
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   171
  virtual const Type* bottom_type() const { return Type::DOUBLE; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   172
  virtual uint ideal_reg() const { return Op_RegD; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   173
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   174
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   175
//------------------------------SubVBNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
// Vector subtract byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
class SubVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   179
  SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   183
//------------------------------SubVSNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
// Vector subtract short
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
class SubVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   187
  SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   191
//------------------------------SubVINode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
// Vector subtract int
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
class SubVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   195
  SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   199
//------------------------------SubVLNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
// Vector subtract long
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
class SubVLNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   203
  SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   207
//------------------------------SubVFNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
// Vector subtract float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
class SubVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   211
  SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   215
//------------------------------SubVDNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
// Vector subtract double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
class SubVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   219
  SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   223
//------------------------------MulVSNode--------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   224
// Vector multiply short
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   225
class MulVSNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   226
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   227
  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
   228
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   229
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   230
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   231
//------------------------------MulVINode--------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   232
// Vector multiply int
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   233
class MulVINode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   234
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   235
  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
   236
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   237
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   238
30624
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   239
//------------------------------MulVLNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   240
// Vector multiply long
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   241
class MulVLNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   242
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   243
  MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   244
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   245
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   246
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   247
//------------------------------MulVFNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   248
// Vector multiply float
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   249
class MulVFNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   250
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   251
  MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   252
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   253
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   254
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   255
//------------------------------MulVDNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   256
// Vector multiply double
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   257
class MulVDNode : public VectorNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   258
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   259
  MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   260
  virtual int Opcode() const;
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   261
};
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   262
33469
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   263
//------------------------------CMoveVDNode--------------------------------------
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   264
// Vector multiply double
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   265
class CMoveVDNode : public VectorNode {
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   266
public:
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   267
  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
   268
  virtual int Opcode() const;
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   269
};
30f4811eded0 8139340: SuperWord enhancement to support vector conditional move (CMovVD) on Intel AVX cpu
iveresov
parents: 33088
diff changeset
   270
30211
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   271
//------------------------------MulReductionVINode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   272
// Vector multiply int as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   273
class MulReductionVINode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   274
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   275
  MulReductionVINode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   276
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   277
  virtual const Type* bottom_type() const { return TypeInt::INT; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   278
  virtual uint ideal_reg() const { return Op_RegI; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   279
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   280
30624
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   281
//------------------------------MulReductionVLNode--------------------------------------
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   282
// Vector multiply int as a reduction
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   283
class MulReductionVLNode : public ReductionNode {
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   284
public:
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   285
  MulReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
  virtual int Opcode() const;
30624
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   287
  virtual const Type* bottom_type() const { return TypeLong::LONG; }
2e1803c8a26d 8076276: Add support for AVX512
kvn
parents: 30211
diff changeset
   288
  virtual uint ideal_reg() const { return Op_RegI; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
30211
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   291
//------------------------------MulReductionVFNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   292
// Vector multiply float as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   293
class MulReductionVFNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   294
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   295
  MulReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   296
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   297
  virtual const Type* bottom_type() const { return Type::FLOAT; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   298
  virtual uint ideal_reg() const { return Op_RegF; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   299
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   300
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   301
//------------------------------MulReductionVDNode--------------------------------------
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   302
// Vector multiply double as a reduction
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   303
class MulReductionVDNode : public ReductionNode {
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   304
public:
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   305
  MulReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   306
  virtual int Opcode() const;
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   307
  virtual const Type* bottom_type() const { return Type::DOUBLE; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   308
  virtual uint ideal_reg() const { return Op_RegD; }
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   309
};
442fbbb31f75 8074981: Integer/FP scalar reduction optimization
kvn
parents: 25930
diff changeset
   310
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   311
//------------------------------DivVFNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
// Vector divide float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
class DivVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   315
  DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   319
//------------------------------DivVDNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
// Vector Divide double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
class DivVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   323
  DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
33088
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   327
//------------------------------AbsVFNode--------------------------------------
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   328
// Vector Abs float
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   329
class AbsVFNode : public VectorNode {
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   330
 public:
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   331
  AbsVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   332
  virtual int Opcode() const;
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   333
};
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   334
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   335
//------------------------------AbsVDNode--------------------------------------
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   336
// Vector Abs double
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   337
class AbsVDNode : public VectorNode {
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   338
 public:
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   339
  AbsVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   340
  virtual int Opcode() const;
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   341
};
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   342
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   343
//------------------------------NegVFNode--------------------------------------
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   344
// Vector Neg float
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   345
class NegVFNode : public VectorNode {
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   346
 public:
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   347
  NegVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   348
  virtual int Opcode() const;
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   349
};
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   350
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   351
//------------------------------NegVDNode--------------------------------------
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   352
// Vector Neg double
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   353
class NegVDNode : public VectorNode {
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   354
 public:
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   355
  NegVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   356
  virtual int Opcode() const;
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   357
};
34fe49ecee13 8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents: 32723
diff changeset
   358
32723
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   359
//------------------------------SqrtVDNode--------------------------------------
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   360
// Vector Sqrt double
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   361
class SqrtVDNode : public VectorNode {
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   362
 public:
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   363
  SqrtVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {}
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   364
  virtual int Opcode() const;
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   365
};
56534fb3d71a 8135028: support for vectorizing double precision sqrt
mcberg
parents: 31035
diff changeset
   366
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   367
//------------------------------LShiftVBNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   368
// Vector left shift bytes
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
class LShiftVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   371
  LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   375
//------------------------------LShiftVSNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   376
// Vector left shift shorts
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
class LShiftVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   379
  LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   383
//------------------------------LShiftVINode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   384
// Vector left shift ints
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
class LShiftVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   387
  LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   391
//------------------------------LShiftVLNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   392
// Vector left shift longs
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   393
class LShiftVLNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   394
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   395
  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
   396
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   397
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   398
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   399
//------------------------------RShiftVBNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   400
// Vector right arithmetic (signed) shift bytes
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   401
class RShiftVBNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   403
  RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   407
//------------------------------RShiftVSNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   408
// Vector right arithmetic (signed) shift shorts
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   409
class RShiftVSNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   411
  RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   415
//------------------------------RShiftVINode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   416
// Vector right arithmetic (signed) shift ints
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   417
class RShiftVINode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   419
  RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   422
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   423
//------------------------------RShiftVLNode-----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   424
// Vector right arithmetic (signed) shift longs
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   425
class RShiftVLNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   426
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   427
  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
   428
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   429
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   430
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   431
//------------------------------URShiftVBNode----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   432
// Vector right logical (unsigned) shift bytes
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   433
class URShiftVBNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   434
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   435
  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
   436
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   437
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   438
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   439
//------------------------------URShiftVSNode----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   440
// Vector right logical (unsigned) shift shorts
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   441
class URShiftVSNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   442
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   443
  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
   444
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   445
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   446
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   447
//------------------------------URShiftVINode----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   448
// Vector right logical (unsigned) shift ints
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   449
class URShiftVINode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   450
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   451
  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
   452
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   453
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   454
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   455
//------------------------------URShiftVLNode----------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   456
// Vector right logical (unsigned) shift longs
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   457
class URShiftVLNode : public VectorNode {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   458
 public:
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   459
  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
   460
  virtual int Opcode() const;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   461
};
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   462
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   463
//------------------------------LShiftCntVNode---------------------------------
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   464
// Vector left shift count
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   465
class LShiftCntVNode : public VectorNode {
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   466
 public:
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   467
  LShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   468
  virtual int Opcode() const;
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   469
  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
   470
};
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   471
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   472
//------------------------------RShiftCntVNode---------------------------------
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   473
// Vector right shift count
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   474
class RShiftCntVNode : public VectorNode {
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   475
 public:
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   476
  RShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   477
  virtual int Opcode() const;
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   478
  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
   479
};
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   480
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   481
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   482
//------------------------------AndVNode---------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   483
// Vector and integer
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   484
class AndVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   485
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   486
  AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   487
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   488
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   489
489c9b5090e2 Initial load
duke
parents:
diff changeset
   490
//------------------------------OrVNode---------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   491
// Vector or integer
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
class OrVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   494
  OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   495
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   496
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   497
489c9b5090e2 Initial load
duke
parents:
diff changeset
   498
//------------------------------XorVNode---------------------------------------
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents: 13104
diff changeset
   499
// Vector xor integer
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   500
class XorVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   501
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   502
  XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   503
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   504
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   505
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   506
//================================= M E M O R Y ===============================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   507
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   508
//------------------------------LoadVectorNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   509
// Load Vector from memory
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   510
class LoadVectorNode : public LoadNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   511
 public:
31035
0f0743952c41 8077504: Unsafe load can loose control dependency and cause crash
roland
parents: 30624
diff changeset
   512
  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
   513
    : 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
   514
    init_class_id(Class_LoadVector);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   515
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   516
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   517
  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
   518
  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
   519
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   521
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   522
  virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   523
  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
   524
  virtual int memory_size() const { return vect_type()->length_in_bytes(); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   525
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   526
  virtual int store_Opcode() const { return Op_StoreVector; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   527
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
   528
  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
   529
                              Node* adr, const TypePtr* atyp,
0f0743952c41 8077504: Unsafe load can loose control dependency and cause crash
roland
parents: 30624
diff changeset
   530
                              uint vlen, BasicType bt,
0f0743952c41 8077504: Unsafe load can loose control dependency and cause crash
roland
parents: 30624
diff changeset
   531
                              ControlDependency control_dependency = LoadNode::DependsOnlyOnTest);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   532
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   534
//------------------------------StoreVectorNode--------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   535
// Store Vector to memory
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   536
class StoreVectorNode : public StoreNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   538
  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
   539
    : 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
   540
    assert(val->is_Vector() || val->is_LoadVector(), "sanity");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   541
    init_class_id(Class_StoreVector);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   542
  }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   544
  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
   545
  uint length() const { return vect_type()->length(); } // Vector length
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   546
489c9b5090e2 Initial load
duke
parents:
diff changeset
   547
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   548
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   549
  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
   550
  virtual BasicType memory_type() const { return T_VOID; }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   551
  virtual int memory_size() const { return vect_type()->length_in_bytes(); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   552
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
   553
  static StoreVectorNode* make(int opc, Node* ctl, Node* mem,
10255
bab46e6f7661 7069452: Cleanup NodeFlags
kvn
parents: 9101
diff changeset
   554
                               Node* adr, const TypePtr* atyp, Node* val,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   555
                               uint vlen);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   556
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   557
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   558
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   559
//=========================Promote_Scalar_to_Vector============================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   560
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   561
//------------------------------ReplicateBNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   562
// Replicate byte scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   563
class ReplicateBNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   564
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   565
  ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   566
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   567
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   568
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   569
//------------------------------ReplicateSNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   570
// Replicate short scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   571
class ReplicateSNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   572
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   573
  ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   574
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   575
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   576
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   577
//------------------------------ReplicateINode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   578
// Replicate int scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   579
class ReplicateINode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   580
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   581
  ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   582
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   583
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   584
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   585
//------------------------------ReplicateLNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   586
// Replicate long scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   587
class ReplicateLNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   588
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   589
  ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   590
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   591
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   592
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   593
//------------------------------ReplicateFNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   594
// Replicate float scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   595
class ReplicateFNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   596
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   597
  ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   598
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   599
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   600
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   601
//------------------------------ReplicateDNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   602
// Replicate double scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   603
class ReplicateDNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   604
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   605
  ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   606
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   607
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   608
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   609
//========================Pack_Scalars_into_a_Vector===========================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   610
489c9b5090e2 Initial load
duke
parents:
diff changeset
   611
//------------------------------PackNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   612
// Pack parent class (not for code generation).
489c9b5090e2 Initial load
duke
parents:
diff changeset
   613
class PackNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   614
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   615
  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
   616
  PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   617
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   618
13490
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents: 13485
diff changeset
   619
  void add_opd(Node* n) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents: 13485
diff changeset
   620
    add_req(n);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   621
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   622
489c9b5090e2 Initial load
duke
parents:
diff changeset
   623
  // 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
   624
  PackNode* binary_tree_pack(int lo, int hi);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   625
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
   626
  static PackNode* make(Node* s, uint vlen, BasicType bt);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   627
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   628
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   629
//------------------------------PackBNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   630
// Pack byte scalars into vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   631
class PackBNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   632
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   633
  PackBNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   634
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   635
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   636
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   637
//------------------------------PackSNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   638
// Pack short scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   639
class PackSNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   640
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   641
  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
   642
  PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   643
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   644
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   645
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   646
//------------------------------PackINode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   647
// Pack integer scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   648
class PackINode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   649
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   650
  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
   651
  PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   652
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   653
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   654
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   655
//------------------------------PackLNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   656
// Pack long scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   657
class PackLNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   658
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   659
  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
   660
  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
   661
  virtual int Opcode() const;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   662
};
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   663
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   664
//------------------------------Pack2LNode-------------------------------------
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   665
// Pack 2 long scalars into a vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   666
class Pack2LNode : public PackNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   667
 public:
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   668
  Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   669
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   670
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   671
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   672
//------------------------------PackFNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   673
// Pack float scalars into vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   674
class PackFNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   675
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   676
  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
   677
  PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   678
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   679
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   680
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   681
//------------------------------PackDNode--------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   682
// Pack double scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   683
class PackDNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   684
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   685
  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
   686
  PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   687
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   688
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   689
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   690
//------------------------------Pack2DNode-------------------------------------
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   691
// Pack 2 double scalars into a vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   692
class Pack2DNode : public PackNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   693
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   694
  Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   695
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   696
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   697
489c9b5090e2 Initial load
duke
parents:
diff changeset
   698
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   699
//========================Extract_Scalar_from_Vector===========================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   700
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   701
//------------------------------ExtractNode------------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   702
// Extract a scalar from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   703
class ExtractNode : public Node {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   704
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   705
  ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   706
    assert(in(2)->get_int() >= 0, "positive constants");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   707
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   708
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   709
  uint  pos() const { return in(2)->get_int(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   710
25930
eae8b7490d2c 8054033: Remove unused references to Compile*
thartmann
parents: 22845
diff changeset
   711
  static Node* make(Node* v, uint position, BasicType bt);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   712
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   713
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   714
//------------------------------ExtractBNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   715
// Extract a byte from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   716
class ExtractBNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   717
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   718
  ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   719
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   720
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   721
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   722
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   723
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   724
//------------------------------ExtractUBNode----------------------------------
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   725
// 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
   726
class ExtractUBNode : public ExtractNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   727
 public:
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   728
  ExtractUBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   729
  virtual int Opcode() const;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   730
  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
   731
  virtual uint ideal_reg() const { return Op_RegI; }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   732
};
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   733
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   734
//------------------------------ExtractCNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   735
// Extract a char from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   736
class ExtractCNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   737
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   738
  ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   739
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   740
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   741
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   742
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   743
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   744
//------------------------------ExtractSNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   745
// Extract a short from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   746
class ExtractSNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   747
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   748
  ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   749
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   750
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   751
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   752
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   753
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   754
//------------------------------ExtractINode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   755
// Extract an int from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   756
class ExtractINode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   757
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   758
  ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   759
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   760
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   761
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   762
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   763
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   764
//------------------------------ExtractLNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   765
// Extract a long from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   766
class ExtractLNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   767
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   768
  ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   769
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   770
  virtual const Type *bottom_type() const { return TypeLong::LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   771
  virtual uint ideal_reg() const { return Op_RegL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   772
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   773
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   774
//------------------------------ExtractFNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   775
// Extract a float from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   776
class ExtractFNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   777
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   778
  ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   779
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   780
  virtual const Type *bottom_type() const { return Type::FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   781
  virtual uint ideal_reg() const { return Op_RegF; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   782
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   783
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13490
diff changeset
   784
//------------------------------ExtractDNode-----------------------------------
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   785
// Extract a double from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   786
class ExtractDNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   787
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   788
  ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   789
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   790
  virtual const Type *bottom_type() const { return Type::DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   791
  virtual uint ideal_reg() const { return Op_RegD; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   792
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   793
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   794
#endif // SHARE_VM_OPTO_VECTORNODE_HPP