hotspot/src/share/vm/opto/vectornode.hpp
author kvn
Fri, 15 Jun 2012 01:25:19 -0700
changeset 13104 657b387034fb
parent 10255 bab46e6f7661
child 13485 6c7faa516fc6
permissions -rw-r--r--
7119644: Increase superword's vector size up to 256 bits Summary: Increase vector size up to 256-bits for YMM AVX registers on x86. Reviewed-by: never, twisti, roland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
     2
 * Copyright (c) 2007, 2012, 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
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
//------------------------------VectorNode--------------------------------------
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
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    47
  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
    48
  uint length() const { return vect_type()->length(); } // Vector length
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    52
  virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    56
  static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    57
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    58
  static int  opcode(int opc, uint vlen, BasicType bt);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    59
  static bool implemented(int opc, uint vlen, BasicType bt);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
//===========================Vector=ALU=Operations====================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
//------------------------------AddVBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
// Vector add byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
class AddVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    69
  AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
//------------------------------AddVSNode---------------------------------------
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    74
// Vector add char/short
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
class AddVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    77
  AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
//------------------------------AddVINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
// Vector add int
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
class AddVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    85
  AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
//------------------------------AddVLNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
// Vector add long
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
class AddVLNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
    93
  AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
//------------------------------AddVFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
// Vector add float
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
class AddVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   101
  AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
//------------------------------AddVDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
// Vector add double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
class AddVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   109
  AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
//------------------------------SubVBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
// Vector subtract byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
class SubVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   117
  SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
//------------------------------SubVSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
// Vector subtract short
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
class SubVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   125
  SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
//------------------------------SubVINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
// Vector subtract int
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
class SubVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   133
  SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
//------------------------------SubVLNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
// Vector subtract long
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
class SubVLNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   141
  SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
//------------------------------SubVFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
// Vector subtract float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
class SubVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   149
  SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
//------------------------------SubVDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
// Vector subtract double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
class SubVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   157
  SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
//------------------------------MulVFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
// Vector multiply float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
class MulVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   165
  MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
//------------------------------MulVDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
// Vector multiply double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
class MulVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   173
  MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
//------------------------------DivVFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
// Vector divide float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
class DivVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   181
  DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
//------------------------------DivVDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
// Vector Divide double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
class DivVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   189
  DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
//------------------------------LShiftVBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
// Vector lshift byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
class LShiftVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   197
  LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
//------------------------------LShiftVSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
// Vector lshift shorts
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
class LShiftVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   205
  LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
//------------------------------LShiftVINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
// Vector lshift ints
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
class LShiftVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   213
  LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
//------------------------------URShiftVBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
// Vector urshift bytes
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   219
class RShiftVBNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   221
  RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
//------------------------------URShiftVSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
// Vector urshift shorts
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   227
class RShiftVSNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   229
  RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
//------------------------------URShiftVINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
// Vector urshift ints
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   235
class RShiftVINode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   237
  RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
//------------------------------AndVNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
// Vector and
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
class AndVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   245
  AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
//------------------------------OrVNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
// Vector or
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
class OrVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   253
  OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
//------------------------------XorVNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
// Vector xor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
class XorVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   261
  XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   265
//================================= M E M O R Y ===============================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   267
//------------------------------LoadVectorNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   268
// Load Vector from memory
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   269
class LoadVectorNode : public LoadNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   270
 public:
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   271
  LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt)
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   272
    : LoadNode(c, mem, adr, at, vt) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   273
    init_class_id(Class_LoadVector);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   276
  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
   277
  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
   278
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   281
  virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
  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
   283
  virtual int memory_size() const { return vect_type()->length_in_bytes(); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   285
  virtual int store_Opcode() const { return Op_StoreVector; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   287
  static LoadVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   288
                              Node* adr, const TypePtr* atyp, uint vlen, BasicType bt);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   291
//------------------------------StoreVectorNode--------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   292
// Store Vector to memory
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   293
class StoreVectorNode : public StoreNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   295
  StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   296
    : StoreNode(c, mem, adr, at, val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   297
    assert(val->is_Vector() || val->is_LoadVector(), "sanity");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   298
    init_class_id(Class_StoreVector);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   299
  }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   301
  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
   302
  uint length() const { return vect_type()->length(); } // Vector length
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   306
  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
   307
  virtual BasicType memory_type() const { return T_VOID; }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   308
  virtual int memory_size() const { return vect_type()->length_in_bytes(); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   310
  static StoreVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
10255
bab46e6f7661 7069452: Cleanup NodeFlags
kvn
parents: 9101
diff changeset
   311
                               Node* adr, const TypePtr* atyp, Node* val,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
                               uint vlen);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   315
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   316
//=========================Promote_Scalar_to_Vector============================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   318
//------------------------------ReplicateBNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   319
// Replicate byte scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   320
class ReplicateBNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   322
  ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   326
//------------------------------ReplicateSNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   327
// Replicate short scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   328
class ReplicateSNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   330
  ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   334
//------------------------------ReplicateINode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   335
// Replicate int scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   336
class ReplicateINode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   338
  ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   342
//------------------------------ReplicateLNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   343
// Replicate long scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   344
class ReplicateLNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   346
  ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   350
//------------------------------ReplicateFNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   351
// Replicate float scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   352
class ReplicateFNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   354
  ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   358
//------------------------------ReplicateDNode---------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   359
// Replicate double scalar to be vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   360
class ReplicateDNode : public VectorNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   362
  ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   366
//========================Pack_Scalars_into_a_Vector===========================
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
//------------------------------PackNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
// Pack parent class (not for code generation).
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
class PackNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   372
  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
   373
  PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   376
  void add_opd(uint i, Node* n) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   377
    init_req(i+1, n);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
  // Create a binary tree form for Packs. [lo, hi) (half-open) range
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
  Node* binaryTreePack(Compile* C, int lo, int hi);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   383
  static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
//------------------------------PackBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
// Pack byte scalars into vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
class PackBNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   390
  PackBNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
//------------------------------PackSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
// Pack short scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
class PackSNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   398
  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
   399
  PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
//------------------------------PackINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
// Pack integer scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
class PackINode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   407
  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
   408
  PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
//------------------------------PackLNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
// Pack long scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
class PackLNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   416
  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
   417
  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
   418
  virtual int Opcode() const;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   419
};
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   420
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   421
//------------------------------Pack2LNode--------------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   422
// Pack 2 long scalars into a vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   423
class Pack2LNode : public PackNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   424
 public:
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   425
  Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
//------------------------------PackFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
// Pack float scalars into vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
class PackFNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   433
  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
   434
  PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   436
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
//------------------------------PackDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
// Pack double scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   440
class PackDNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   442
  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
   443
  PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   445
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   447
//------------------------------Pack2DNode--------------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   448
// Pack 2 double scalars into a vector
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   449
class Pack2DNode : public PackNode {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   450
 public:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   451
  Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
489c9b5090e2 Initial load
duke
parents:
diff changeset
   455
489c9b5090e2 Initial load
duke
parents:
diff changeset
   456
//========================Extract_Scalar_from_Vector===============================
489c9b5090e2 Initial load
duke
parents:
diff changeset
   457
489c9b5090e2 Initial load
duke
parents:
diff changeset
   458
//------------------------------ExtractNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   459
// Extract a scalar from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   460
class ExtractNode : public Node {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   461
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   462
  ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   463
    assert(in(2)->get_int() >= 0, "positive constants");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   464
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   465
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
  uint  pos() const { return in(2)->get_int(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   467
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   468
  static Node* make(Compile* C, Node* v, uint position, BasicType bt);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
489c9b5090e2 Initial load
duke
parents:
diff changeset
   471
//------------------------------ExtractBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
// Extract a byte from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
class ExtractBNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   474
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   475
  ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   476
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   477
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   478
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   479
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   481
//------------------------------ExtractUBNode--------------------------------------
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   482
// 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
   483
class ExtractUBNode : public ExtractNode {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   484
 public:
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   485
  ExtractUBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   486
  virtual int Opcode() const;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   487
  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
   488
  virtual uint ideal_reg() const { return Op_RegI; }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   489
};
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 10255
diff changeset
   490
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   491
//------------------------------ExtractCNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
// Extract a char from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
class ExtractCNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   494
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   495
  ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   496
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   497
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   498
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   499
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   500
489c9b5090e2 Initial load
duke
parents:
diff changeset
   501
//------------------------------ExtractSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   502
// Extract a short from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   503
class ExtractSNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   504
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   505
  ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   506
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   507
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   508
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   509
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
489c9b5090e2 Initial load
duke
parents:
diff changeset
   511
//------------------------------ExtractINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   512
// Extract an int from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   513
class ExtractINode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   514
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   515
  ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   516
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   517
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   518
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   519
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
489c9b5090e2 Initial load
duke
parents:
diff changeset
   521
//------------------------------ExtractLNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   522
// Extract a long from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   523
class ExtractLNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   524
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   525
  ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   526
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   527
  virtual const Type *bottom_type() const { return TypeLong::LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   528
  virtual uint ideal_reg() const { return Op_RegL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   529
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   530
489c9b5090e2 Initial load
duke
parents:
diff changeset
   531
//------------------------------ExtractFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   532
// Extract a float from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
class ExtractFNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   534
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   535
  ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   536
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
  virtual const Type *bottom_type() const { return Type::FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   538
  virtual uint ideal_reg() const { return Op_RegF; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   539
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   540
489c9b5090e2 Initial load
duke
parents:
diff changeset
   541
//------------------------------ExtractDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   542
// Extract a double from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
class ExtractDNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   544
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   545
  ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   546
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   547
  virtual const Type *bottom_type() const { return Type::DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   548
  virtual uint ideal_reg() const { return Op_RegD; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   549
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   550
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   551
#endif // SHARE_VM_OPTO_VECTORNODE_HPP