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