1 /*
   2  * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package compiler.lib.ir_framework;
  25 
  26 import compiler.lib.ir_framework.driver.irmatching.mapping.*;
  27 import compiler.lib.ir_framework.driver.network.testvm.java.VMInfo;
  28 import compiler.lib.ir_framework.shared.CheckedTestFrameworkException;
  29 import compiler.lib.ir_framework.shared.TestFormat;
  30 import compiler.lib.ir_framework.shared.TestFormatException;
  31 import jdk.test.lib.Platform;
  32 import jdk.test.whitebox.WhiteBox;
  33 
  34 import java.util.HashMap;
  35 import java.util.Map;
  36 
  37 /**
  38  * This class specifies IR node placeholder strings (also referred to as just "IR nodes") with mappings to regexes
  39  * depending on the selected compile phases. The mappings are stored in {@link #IR_NODE_MAPPINGS}. Each IR node
  40  * placeholder string is mapped to a {@link IRNodeMapEntry} instance defined in
  41  * {@link compiler.lib.ir_framework.driver.irmatching.mapping}.
  42  *
  43  * <p>
  44  * IR node placeholder strings can be used in {@link IR#failOn()} and/or {@link IR#counts()} attributes to define IR
  45  * constraints. They usually represent a single C2 IR node or a group of them.
  46  *
  47  * <p>
  48  * Each IR node placeholder string is accompanied by a static block that defines an IR node placeholder to regex(es)
  49  * mapping. The IR framework will automatically replace each IR node placeholder string in a user defined test with a
  50  * regex depending on the selected compile phases in {@link IR#phase} and the provided mapping.
  51  *
  52  * <p>
  53  * Each mapping must define a default compile phase which is applied when the user does not explicitly set the
  54  * {@link IR#phase()} attribute or when directly using {@link CompilePhase#DEFAULT}. In this case, the IR framework
  55  * falls back on the default compile phase of any {@link IRNodeMapEntry}.
  56  *
  57  * <p>
  58  * The IR framework reports a {@link TestFormatException} if:
  59  * <ul>
  60  *     <li><p> A user test specifies a compile phase for which no mapping is defined in this class.</li>
  61  *     <li><p> An IR node placeholder string is either missing a mapping or does not provide a regex for a specified
  62  *             compile phase in {@link IR#phase}.
  63  * </ul>
  64  *
  65  * <p>
  66  * There are two types of IR nodes:
  67  * <ul>
  68  *     <li><p>Normal IR nodes: The IR node placeholder string is directly replaced by a regex.</li>
  69  *     <li><p>Composite IR nodes:  The IR node placeholder string contains an additional {@link #COMPOSITE_PREFIX}.
  70  *                                 Using this IR node expects another user provided string in the constraint list of
  71  *                                 {@link IR#failOn()} and {@link IR#counts()}. They cannot be used as normal IR nodes.
  72  *                                 Trying to do so will result in a format violation error.</li>
  73  *     <li><p>Vector IR nodes:  The IR node placeholder string contains an additional {@link #VECTOR_PREFIX}.
  74  *                              Using this IR node, one can check for the type and size of a vector. The type must
  75  *                              be directly specified in {@link #vectorNode}. The size can be specified directly with
  76  *                              an additional argument using {@link #VECTOR_SIZE}, followed by a size tag or a comma
  77  *                              separated list of sizes. If the size argument is not given, then a default size of
  78  *                              {@link #VECTOR_SIZE_MAX} is taken, which is the number of elements that can fit in a
  79  *                              vector of the specified type (depends on the VM flag MaxVectorSize and CPU features).
  80  *                              However, when using {@link IR#failOn} or {@link IR#counts()} with comparison {@code <},
  81  *                              or {@code <=} or {@code =0}, the default size is {@link #VECTOR_SIZE_ANY}, allowing any
  82  *                              size. The motivation for these default values is that in most cases one wants to have
  83  *                              vectorization with maximal vector width, or no vectorization of any vector width.
  84  * </ul>
  85  */
  86 public class IRNode {
  87     /**
  88      * Prefix for normal IR nodes.
  89      */
  90     private static final String PREFIX = "_#";
  91     /**
  92      * Prefix for composite IR nodes.
  93      */
  94     private static final String COMPOSITE_PREFIX = PREFIX + "C#";
  95     /**
  96      * Prefix for vector IR nodes.
  97      */
  98     private static final String VECTOR_PREFIX = PREFIX + "V#";
  99 
 100     private static final String POSTFIX = "#_";
 101 
 102     public static final String START = "(\\d+(\\s){2}(";
 103     public static final String MID = ".*)+(\\s){2}===.*";
 104     public static final String END = ")";
 105 
 106     public static final String IS_REPLACED = "#IS_REPLACED#"; // Is replaced by an additional user-defined string.
 107 
 108     public static final String VECTOR_SIZE = "_@";
 109     public static final String VECTOR_SIZE_TAG_ANY = "any";
 110     public static final String VECTOR_SIZE_TAG_MAX = "max_for_type";
 111     public static final String VECTOR_SIZE_ANY = VECTOR_SIZE + VECTOR_SIZE_TAG_ANY; // default for counts "=0" and failOn
 112     public static final String VECTOR_SIZE_MAX = VECTOR_SIZE + VECTOR_SIZE_TAG_MAX; // default in counts
 113     public static final String VECTOR_SIZE_2   = VECTOR_SIZE + "2";
 114     public static final String VECTOR_SIZE_4   = VECTOR_SIZE + "4";
 115     public static final String VECTOR_SIZE_8   = VECTOR_SIZE + "8";
 116     public static final String VECTOR_SIZE_16  = VECTOR_SIZE + "16";
 117     public static final String VECTOR_SIZE_32  = VECTOR_SIZE + "32";
 118     public static final String VECTOR_SIZE_64  = VECTOR_SIZE + "64";
 119 
 120     private static final String TYPE_BYTE    = "B";
 121     private static final String TYPE_CHAR    = "C";
 122     private static final String TYPE_SHORT   = "S";
 123     private static final String TYPE_INT     = "I";
 124     private static final String TYPE_LONG    = "J";
 125     private static final String TYPE_FLOAT   = "F";
 126     private static final String TYPE_DOUBLE  = "D";
 127     private static final String TYPE_BOOLEAN = "Z";
 128 
 129     /**
 130      * IR placeholder string to regex-for-compile-phase map.
 131      */
 132     private static final Map<String, IRNodeMapEntry> IR_NODE_MAPPINGS = new HashMap<>();
 133 
 134     /**
 135      * Map every vectorNode to a type string.
 136      */
 137     private static final Map<String, String> VECTOR_NODE_TYPE = new HashMap<>();
 138 
 139     /*
 140      * Start of IR placeholder string definitions followed by a static block defining the regex-for-compile-phase mapping.
 141      * An IR node placeholder string must start with PREFIX for normal IR nodes or COMPOSITE_PREFIX for composite IR
 142      * nodes, or VECTOR_PREFIX for vector nodes (see class description above).
 143      *
 144      * An IR node definition looks like this:
 145      *
 146      * public static final String IR_NODE = [PREFIX|COMPOSITE_PREFIX|VECTOR_PREFIX] + "IR_NODE" + POSTFIX;
 147      * static {
 148      *    // Define IR_NODE to regex-for-compile-phase mapping. Create a new IRNodeMapEntry object and add it to
 149      *    // IR_NODE_MAPPINGS. This can be done by using the helper methods defined after all IR node placeholder string
 150      *    // definitions.
 151      * }
 152      */
 153 
 154     public static final String ABS_D = PREFIX + "ABS_D" + POSTFIX;
 155     static {
 156         beforeMatchingNameRegex(ABS_D, "AbsD");
 157     }
 158 
 159     public static final String ABS_F = PREFIX + "ABS_F" + POSTFIX;
 160     static {
 161         beforeMatchingNameRegex(ABS_F, "AbsF");
 162     }
 163 
 164     public static final String ABS_I = PREFIX + "ABS_I" + POSTFIX;
 165     static {
 166         beforeMatchingNameRegex(ABS_I, "AbsI");
 167     }
 168 
 169     public static final String ABS_L = PREFIX + "ABS_L" + POSTFIX;
 170     static {
 171         beforeMatchingNameRegex(ABS_L, "AbsL");
 172     }
 173 
 174     public static final String ABS_VB = VECTOR_PREFIX + "ABS_VB" + POSTFIX;
 175     static {
 176         vectorNode(ABS_VB, "AbsVB", TYPE_BYTE);
 177     }
 178 
 179     // ABS_VC / AbsVC does not exist (char is 2 byte unsigned)
 180 
 181     public static final String ABS_VS = VECTOR_PREFIX + "ABS_VS" + POSTFIX;
 182     static {
 183         vectorNode(ABS_VS, "AbsVS", TYPE_SHORT);
 184     }
 185 
 186     public static final String ABS_VI = VECTOR_PREFIX + "ABS_VI" + POSTFIX;
 187     static {
 188         vectorNode(ABS_VI, "AbsVI", TYPE_INT);
 189     }
 190 
 191     public static final String ABS_VL = VECTOR_PREFIX + "ABS_VL" + POSTFIX;
 192     static {
 193         vectorNode(ABS_VL, "AbsVL", TYPE_LONG);
 194     }
 195 
 196     public static final String ABS_VF = VECTOR_PREFIX + "ABS_VF" + POSTFIX;
 197     static {
 198         vectorNode(ABS_VF, "AbsVF", TYPE_FLOAT);
 199     }
 200 
 201     public static final String ABS_VD = VECTOR_PREFIX + "ABS_VD" + POSTFIX;
 202     static {
 203         vectorNode(ABS_VD, "AbsVD", TYPE_DOUBLE);
 204     }
 205 
 206     public static final String ADD = PREFIX + "ADD" + POSTFIX;
 207     static {
 208         beforeMatchingNameRegex(ADD, "Add(I|L|F|D|P)");
 209     }
 210 
 211     public static final String ADD_F = PREFIX + "ADD_F" + POSTFIX;
 212     static {
 213         beforeMatchingNameRegex(ADD_F, "AddF");
 214     }
 215 
 216     public static final String ADD_I = PREFIX + "ADD_I" + POSTFIX;
 217     static {
 218         beforeMatchingNameRegex(ADD_I, "AddI");
 219     }
 220 
 221     public static final String ADD_L = PREFIX + "ADD_L" + POSTFIX;
 222     static {
 223         beforeMatchingNameRegex(ADD_L, "AddL");
 224     }
 225 
 226     public static final String ADD_HF = PREFIX + "ADD_HF" + POSTFIX;
 227     static {
 228         beforeMatchingNameRegex(ADD_HF, "AddHF");
 229     }
 230 
 231     public static final String ADD_P = PREFIX + "ADD_P" + POSTFIX;
 232     static {
 233         beforeMatchingNameRegex(ADD_P, "AddP");
 234     }
 235 
 236     public static final String ADD_VD = VECTOR_PREFIX + "ADD_VD" + POSTFIX;
 237     static {
 238         vectorNode(ADD_VD, "AddVD", TYPE_DOUBLE);
 239     }
 240 
 241     public static final String ADD_VI = VECTOR_PREFIX + "ADD_VI" + POSTFIX;
 242     static {
 243         vectorNode(ADD_VI, "AddVI", TYPE_INT);
 244     }
 245 
 246     public static final String ADD_VHF = VECTOR_PREFIX + "ADD_VHF" + POSTFIX;
 247     static {
 248         vectorNode(ADD_VHF, "AddVHF", TYPE_SHORT);
 249     }
 250 
 251     public static final String ADD_VF = VECTOR_PREFIX + "ADD_VF" + POSTFIX;
 252     static {
 253         vectorNode(ADD_VF, "AddVF", TYPE_FLOAT);
 254     }
 255 
 256     public static final String ADD_VB = VECTOR_PREFIX + "ADD_VB" + POSTFIX;
 257     static {
 258         vectorNode(ADD_VB, "AddVB", TYPE_BYTE);
 259     }
 260 
 261     public static final String ADD_VS = VECTOR_PREFIX + "ADD_VS" + POSTFIX;
 262     static {
 263         vectorNode(ADD_VS, "AddVS", TYPE_SHORT);
 264     }
 265 
 266     public static final String ADD_VL = VECTOR_PREFIX + "ADD_VL" + POSTFIX;
 267     static {
 268         vectorNode(ADD_VL, "AddVL", TYPE_LONG);
 269     }
 270 
 271     public static final String SATURATING_ADD_VB = VECTOR_PREFIX + "SATURATING_ADD_VB" + POSTFIX;
 272     static {
 273         vectorNode(SATURATING_ADD_VB, "SaturatingAddV", TYPE_BYTE);
 274     }
 275 
 276     public static final String SATURATING_ADD_VS = VECTOR_PREFIX + "SATURATING_ADD_VS" + POSTFIX;
 277     static {
 278         vectorNode(SATURATING_ADD_VS, "SaturatingAddV", TYPE_SHORT);
 279     }
 280 
 281     public static final String SATURATING_ADD_VI = VECTOR_PREFIX + "SATURATING_ADD_VI" + POSTFIX;
 282     static {
 283         vectorNode(SATURATING_ADD_VI, "SaturatingAddV", TYPE_INT);
 284     }
 285 
 286     public static final String SATURATING_ADD_VL = VECTOR_PREFIX + "SATURATING_ADD_VL" + POSTFIX;
 287     static {
 288         vectorNode(SATURATING_ADD_VL, "SaturatingAddV", TYPE_LONG);
 289     }
 290 
 291     public static final String SATURATING_SUB_VB = VECTOR_PREFIX + "SATURATING_SUB_VB" + POSTFIX;
 292     static {
 293         vectorNode(SATURATING_SUB_VB, "SaturatingSubV", TYPE_BYTE);
 294     }
 295 
 296     public static final String SATURATING_SUB_VS = VECTOR_PREFIX + "SATURATING_SUB_VS" + POSTFIX;
 297     static {
 298         vectorNode(SATURATING_SUB_VS, "SaturatingSubV", TYPE_SHORT);
 299     }
 300 
 301     public static final String SATURATING_SUB_VI = VECTOR_PREFIX + "SATURATING_SUB_VI" + POSTFIX;
 302     static {
 303         vectorNode(SATURATING_SUB_VI, "SaturatingSubV", TYPE_INT);
 304     }
 305 
 306     public static final String SATURATING_SUB_VL = VECTOR_PREFIX + "SATURATING_SUB_VL" + POSTFIX;
 307     static {
 308         vectorNode(SATURATING_SUB_VL, "SaturatingSubV", TYPE_LONG);
 309     }
 310 
 311     public static final String ADD_REDUCTION_V = PREFIX + "ADD_REDUCTION_V" + POSTFIX;
 312     static {
 313         beforeMatchingNameRegex(ADD_REDUCTION_V, "AddReductionV(B|S|I|L|F|D)");
 314     }
 315 
 316     public static final String ADD_REDUCTION_VD = PREFIX + "ADD_REDUCTION_VD" + POSTFIX;
 317     static {
 318         superWordNodes(ADD_REDUCTION_VD, "AddReductionVD");
 319     }
 320 
 321     public static final String ADD_REDUCTION_VF = PREFIX + "ADD_REDUCTION_VF" + POSTFIX;
 322     static {
 323         superWordNodes(ADD_REDUCTION_VF, "AddReductionVF");
 324     }
 325 
 326     public static final String ADD_REDUCTION_VHF = PREFIX + "ADD_REDUCTION_VHF" + POSTFIX;
 327     static {
 328         superWordNodes(ADD_REDUCTION_VHF, "AddReductionVHF");
 329     }
 330 
 331     public static final String ADD_REDUCTION_VI = PREFIX + "ADD_REDUCTION_VI" + POSTFIX;
 332     static {
 333         superWordNodes(ADD_REDUCTION_VI, "AddReductionVI");
 334     }
 335 
 336     public static final String ADD_REDUCTION_VL = PREFIX + "ADD_REDUCTION_VL" + POSTFIX;
 337     static {
 338         superWordNodes(ADD_REDUCTION_VL, "AddReductionVL");
 339     }
 340 
 341     public static final String OPAQUE_MULTIVERSIONING = PREFIX + "OPAQUE_MULTIVERSIONING" + POSTFIX;
 342     static {
 343         beforeMatchingNameRegex(OPAQUE_MULTIVERSIONING, "OpaqueMultiversioning");
 344     }
 345 
 346     public static final String REARRANGE_VB = VECTOR_PREFIX + "REARRANGE_VB" + POSTFIX;
 347     static {
 348         vectorNode(REARRANGE_VB, "VectorRearrange", TYPE_BYTE);
 349     }
 350 
 351     public static final String REARRANGE_VS = VECTOR_PREFIX + "REARRANGE_VS" + POSTFIX;
 352     static {
 353         vectorNode(REARRANGE_VS, "VectorRearrange", TYPE_SHORT);
 354     }
 355 
 356     public static final String REARRANGE_VI = VECTOR_PREFIX + "REARRANGE_VI" + POSTFIX;
 357     static {
 358         vectorNode(REARRANGE_VI, "VectorRearrange", TYPE_INT);
 359     }
 360 
 361     public static final String REARRANGE_VL = VECTOR_PREFIX + "REARRANGE_VL" + POSTFIX;
 362     static {
 363         vectorNode(REARRANGE_VL, "VectorRearrange", TYPE_LONG);
 364     }
 365 
 366     public static final String REARRANGE_VF = VECTOR_PREFIX + "REARRANGE_VF" + POSTFIX;
 367     static {
 368         vectorNode(REARRANGE_VF, "VectorRearrange", TYPE_FLOAT);
 369     }
 370 
 371     public static final String REARRANGE_VD = VECTOR_PREFIX + "REARRANGE_VD" + POSTFIX;
 372     static {
 373         vectorNode(REARRANGE_VD, "VectorRearrange", TYPE_DOUBLE);
 374     }
 375 
 376     public static final String ADD_P_OF = COMPOSITE_PREFIX + "ADD_P_OF" + POSTFIX;
 377     static {
 378         String regex = START + "addP_" + IS_REPLACED + MID + ".*" + END;
 379         machOnly(ADD_P_OF, regex);
 380     }
 381 
 382     public static final String ALLOC = PREFIX + "ALLOC" + POSTFIX;
 383     static {
 384         String regex = START + "Allocate\\b" + MID + END;
 385         macroNodes(ALLOC, regex);
 386     }
 387 
 388     public static final String ALLOC_OF = COMPOSITE_PREFIX + "ALLOC_OF" + POSTFIX;
 389     static {
 390         String regex = START + "Allocate\\b" + MID + "allocationKlass:.*\\b" + IS_REPLACED + "\\s.*" + END;
 391         macroNodes(ALLOC_OF, regex);
 392     }
 393 
 394     public static final String ALLOC_ARRAY = PREFIX + "ALLOC_ARRAY" + POSTFIX;
 395     static {
 396         String regex = START + "AllocateArray\\b" + MID + END;
 397         macroNodes(ALLOC_ARRAY,  regex);
 398     }
 399 
 400     public static final String ALLOC_ARRAY_OF = COMPOSITE_PREFIX + "ALLOC_ARRAY_OF" + POSTFIX;
 401     static {
 402         // Assuming we are looking for an array of "some/package/MyClass". The printout is
 403         // [Lsome/package/MyClass;
 404         // or, with more dimensions
 405         // [[[Lsome/package/MyClass;
 406 
 407         // Case where the searched string is a not fully qualified name (but maybe partially qualified):
 408         // package/MyClass or MyClass
 409         // The ".*\\b" will eat the "some/" and "some/package/" resp.
 410         String partial_name_prefix = ".+\\b";
 411 
 412         // The thing after "allocationKlass:" (the name of the allocated class) is a sequence of:
 413         // - a non-empty sequence of "["
 414         // - a single character ("L"),
 415         // - maybe a non-empty sequence of characters ending on a word boundary
 416         //   this sequence is omitted if the given name is already fully qualified (exact match)
 417         //   but will eat the package path prefix in the cases described above
 418         // - the name we are looking for
 419         // - the final ";".
 420         String name_part = "\\[+.(" + partial_name_prefix + ")?" + IS_REPLACED + ";";
 421         String regex = START + "AllocateArray\\b" + MID + "allocationKlass:" + name_part + ".*" + END;
 422         macroNodes(ALLOC_ARRAY_OF, regex);
 423     }
 424 
 425     public static final String OR = PREFIX + "OR" + POSTFIX;
 426     static {
 427         beforeMatchingNameRegex(OR, "Or(I|L)");
 428     }
 429 
 430     public static final String AND = PREFIX + "AND" + POSTFIX;
 431     static {
 432         beforeMatchingNameRegex(AND, "And(I|L)");
 433     }
 434 
 435     public static final String AND_I = PREFIX + "AND_I" + POSTFIX;
 436     static {
 437         beforeMatchingNameRegex(AND_I, "AndI");
 438     }
 439 
 440     public static final String AND_L = PREFIX + "AND_L" + POSTFIX;
 441     static {
 442         beforeMatchingNameRegex(AND_L, "AndL");
 443     }
 444 
 445     public static final String AND_VB = VECTOR_PREFIX + "AND_VB" + POSTFIX;
 446     static {
 447         vectorNode(AND_VB, "AndV", TYPE_BYTE);
 448     }
 449 
 450     public static final String AND_VC = VECTOR_PREFIX + "AND_VC" + POSTFIX;
 451     static {
 452         vectorNode(AND_VC, "AndV", TYPE_CHAR);
 453     }
 454 
 455     public static final String AND_VS = VECTOR_PREFIX + "AND_VS" + POSTFIX;
 456     static {
 457         vectorNode(AND_VS, "AndV", TYPE_SHORT);
 458     }
 459 
 460     public static final String AND_VI = VECTOR_PREFIX + "AND_VI" + POSTFIX;
 461     static {
 462         vectorNode(AND_VI, "AndV", TYPE_INT);
 463     }
 464 
 465     public static final String AND_VL = VECTOR_PREFIX + "AND_VL" + POSTFIX;
 466     static {
 467         vectorNode(AND_VL, "AndV", TYPE_LONG);
 468     }
 469 
 470     public static final String AND_V_MASK = PREFIX + "AND_V_MASK" + POSTFIX;
 471     static {
 472         beforeMatchingNameRegex(AND_V_MASK, "AndVMask");
 473     }
 474 
 475     public static final String AND_REDUCTION_V = PREFIX + "AND_REDUCTION_V" + POSTFIX;
 476     static {
 477         superWordNodes(AND_REDUCTION_V, "AndReductionV");
 478     }
 479 
 480     public static final String CALL = PREFIX + "CALL" + POSTFIX;
 481     static {
 482         beforeMatchingNameRegex(CALL, "Call.*Java");
 483     }
 484 
 485     public static final String CALL_OF = COMPOSITE_PREFIX + "CALL_OF" + POSTFIX;
 486     static {
 487         callOfNodes(CALL_OF, "Call.*");
 488     }
 489 
 490     public static final String CALL_OF_METHOD = COMPOSITE_PREFIX + "CALL_OF_METHOD" + POSTFIX;
 491     static {
 492         callOfNodes(CALL_OF_METHOD, "Call.*Java");
 493     }
 494 
 495     public static final String STATIC_CALL_OF_METHOD = COMPOSITE_PREFIX + "STATIC_CALL_OF_METHOD" + POSTFIX;
 496     static {
 497         callOfNodes(STATIC_CALL_OF_METHOD, "CallStaticJava");
 498     }
 499 
 500     public static final String CAST_II = PREFIX + "CAST_II" + POSTFIX;
 501     static {
 502         beforeMatchingNameRegex(CAST_II, "CastII");
 503     }
 504 
 505     public static final String CAST_LL = PREFIX + "CAST_LL" + POSTFIX;
 506     static {
 507         beforeMatchingNameRegex(CAST_LL, "CastLL");
 508     }
 509 
 510     public static final String CBNZW_HI = PREFIX + "CBNZW_HI" + POSTFIX;
 511     static {
 512         optoOnly(CBNZW_HI, "cbwhi");
 513     }
 514 
 515     public static final String CBZW_LS = PREFIX + "CBZW_LS" + POSTFIX;
 516     static {
 517         optoOnly(CBZW_LS, "cbwls");
 518     }
 519 
 520     public static final String CBZ_LS = PREFIX + "CBZ_LS" + POSTFIX;
 521     static {
 522         optoOnly(CBZ_LS, "cbls");
 523     }
 524 
 525     public static final String CBZ_HI = PREFIX + "CBZ_HI" + POSTFIX;
 526     static {
 527         optoOnly(CBZ_HI, "cbhi");
 528     }
 529 
 530     public static final String CHECKCAST_ARRAY = PREFIX + "CHECKCAST_ARRAY" + POSTFIX;
 531     static {
 532         String regex = "(((?i:cmp|CLFI|CLR).*aryklassptr:\\[.*:Constant|.*(?i:mov|mv|or).*aryklassptr:\\[.*:Constant.*\\R.*(cmp|CMP|CLR))" + END;
 533         optoOnly(CHECKCAST_ARRAY, regex);
 534     }
 535 
 536     public static final String CHECKCAST_ARRAY_OF = COMPOSITE_PREFIX + "CHECKCAST_ARRAY_OF" + POSTFIX;
 537     static {
 538         String regex = "(((?i:cmp|CLFI|CLR).*aryklassptr:\\[.*" + IS_REPLACED + ":.*:Constant|.*(?i:mov|mv|or).*aryklassptr:\\[.*" + IS_REPLACED + ":.*:Constant.*\\R.*(cmp|CMP|CLR))" + END;
 539         optoOnly(CHECKCAST_ARRAY_OF, regex);
 540     }
 541 
 542     // Does not work on s390 (a rule containing this regex will be skipped on s390).
 543     public static final String CHECKCAST_ARRAYCOPY = PREFIX + "CHECKCAST_ARRAYCOPY" + POSTFIX;
 544     static {
 545         String regex = "(.*((?i:call_leaf_nofp,runtime)|CALL,\\s?runtime leaf nofp|BCTRL.*.leaf call).*checkcast_arraycopy.*" + END;
 546         optoOnly(CHECKCAST_ARRAYCOPY, regex);
 547     }
 548 
 549     public static final String CLASS_CHECK_TRAP = PREFIX + "CLASS_CHECK_TRAP" + POSTFIX;
 550     static {
 551         trapNodes(CLASS_CHECK_TRAP, "class_check");
 552     }
 553 
 554     public static final String CMOVE_F = PREFIX + "CMOVE_F" + POSTFIX;
 555     static {
 556         beforeMatchingNameRegex(CMOVE_F, "CMoveF");
 557     }
 558 
 559     public static final String CMOVE_D = PREFIX + "CMOVE_D" + POSTFIX;
 560     static {
 561         beforeMatchingNameRegex(CMOVE_D, "CMoveD");
 562     }
 563 
 564     public static final String CMOVE_I = PREFIX + "CMOVE_I" + POSTFIX;
 565     static {
 566         beforeMatchingNameRegex(CMOVE_I, "CMoveI");
 567     }
 568 
 569     public static final String CMOVE_L = PREFIX + "CMOVE_L" + POSTFIX;
 570     static {
 571         beforeMatchingNameRegex(CMOVE_L, "CMoveL");
 572     }
 573 
 574     public static final String CMP_F = PREFIX + "CMP_F" + POSTFIX;
 575     static {
 576         beforeMatchingNameRegex(CMP_F, "CmpF");
 577     }
 578 
 579     public static final String CMP_D = PREFIX + "CMP_D" + POSTFIX;
 580     static {
 581         beforeMatchingNameRegex(CMP_D, "CmpD");
 582     }
 583 
 584     public static final String CMP_I = PREFIX + "CMP_I" + POSTFIX;
 585     static {
 586         beforeMatchingNameRegex(CMP_I, "CmpI");
 587     }
 588 
 589     public static final String CMP_L = PREFIX + "CMP_L" + POSTFIX;
 590     static {
 591         beforeMatchingNameRegex(CMP_L, "CmpL");
 592     }
 593 
 594     public static final String CMP_U = PREFIX + "CMP_U" + POSTFIX;
 595     static {
 596         beforeMatchingNameRegex(CMP_U, "CmpU\\b");
 597     }
 598 
 599     public static final String CMP_U3 = PREFIX + "CMP_U3" + POSTFIX;
 600     static {
 601         beforeMatchingNameRegex(CMP_U3, "CmpU3");
 602     }
 603 
 604     public static final String CMP_UL = PREFIX + "CMP_UL" + POSTFIX;
 605     static {
 606         beforeMatchingNameRegex(CMP_UL, "CmpUL");
 607     }
 608 
 609     public static final String CMP_UL3 = PREFIX + "CMP_UL3" + POSTFIX;
 610     static {
 611         beforeMatchingNameRegex(CMP_UL3, "CmpUL3");
 612     }
 613 
 614     public static final String CMP_P = PREFIX + "CMP_P" + POSTFIX;
 615     static {
 616         beforeMatchingNameRegex(CMP_P, "CmpP");
 617     }
 618 
 619     public static final String CMP_N = PREFIX + "CMP_N" + POSTFIX;
 620     static {
 621         beforeMatchingNameRegex(CMP_N, "CmpN");
 622     }
 623 
 624     public static final String CMP_LT_MASK = PREFIX + "CMP_LT_MASK" + POSTFIX;
 625     static {
 626         beforeMatchingNameRegex(CMP_LT_MASK, "CmpLTMask");
 627     }
 628 
 629     public static final String ROUND_F = PREFIX + "ROUND_F" + POSTFIX;
 630     static {
 631         beforeMatchingNameRegex(ROUND_F, "RoundF");
 632     }
 633 
 634     public static final String ROUND_D = PREFIX + "ROUND_D" + POSTFIX;
 635     static {
 636         beforeMatchingNameRegex(ROUND_D, "RoundD");
 637     }
 638 
 639     public static final String COMPRESS_BITS = PREFIX + "COMPRESS_BITS" + POSTFIX;
 640     static {
 641         beforeMatchingNameRegex(COMPRESS_BITS, "CompressBits");
 642     }
 643 
 644     public static final String CONV = PREFIX + "CONV" + POSTFIX;
 645     static {
 646         beforeMatchingNameRegex(CONV, "Conv");
 647     }
 648 
 649     public static final String CONV_D2F = PREFIX + "CONV_D2F" + POSTFIX;
 650     static {
 651         beforeMatchingNameRegex(CONV_D2F, "ConvD2F");
 652     }
 653 
 654     public static final String CONV_D2I = PREFIX + "CONV_D2I" + POSTFIX;
 655     static {
 656         beforeMatchingNameRegex(CONV_D2I, "ConvD2I");
 657     }
 658 
 659     public static final String CONV_D2L = PREFIX + "CONV_D2L" + POSTFIX;
 660     static {
 661         beforeMatchingNameRegex(CONV_D2L, "ConvD2L");
 662     }
 663 
 664     public static final String CONV_F2D = PREFIX + "CONV_F2D" + POSTFIX;
 665     static {
 666         beforeMatchingNameRegex(CONV_F2D, "ConvF2D");
 667     }
 668 
 669     public static final String CONV_F2HF = PREFIX + "CONV_F2HF" + POSTFIX;
 670     static {
 671         beforeMatchingNameRegex(CONV_F2HF, "ConvF2HF");
 672     }
 673 
 674     public static final String CONV_F2I = PREFIX + "CONV_F2I" + POSTFIX;
 675     static {
 676         beforeMatchingNameRegex(CONV_F2I, "ConvF2I");
 677     }
 678 
 679     public static final String CONV_F2L = PREFIX + "CONV_F2L" + POSTFIX;
 680     static {
 681         beforeMatchingNameRegex(CONV_F2L, "ConvF2L");
 682     }
 683 
 684     public static final String CONV_I2L = PREFIX + "CONV_I2L" + POSTFIX;
 685     static {
 686         beforeMatchingNameRegex(CONV_I2L, "ConvI2L");
 687     }
 688 
 689     public static final String CONV_L2I = PREFIX + "CONV_L2I" + POSTFIX;
 690     static {
 691         beforeMatchingNameRegex(CONV_L2I, "ConvL2I");
 692     }
 693 
 694     public static final String CONV_HF2F = PREFIX + "CONV_HF2F" + POSTFIX;
 695     static {
 696         beforeMatchingNameRegex(CONV_HF2F, "ConvHF2F");
 697     }
 698 
 699     public static final String CON_I = PREFIX + "CON_I" + POSTFIX;
 700     static {
 701         beforeMatchingNameRegex(CON_I, "ConI");
 702     }
 703 
 704     public static final String CON_L = PREFIX + "CON_L" + POSTFIX;
 705     static {
 706         beforeMatchingNameRegex(CON_L, "ConL");
 707     }
 708 
 709     public static final String COUNTED_LOOP = PREFIX + "COUNTED_LOOP" + POSTFIX;
 710     static {
 711         String regex = START + "CountedLoop\\b" + MID + END;
 712         fromAfterCountedLoops(COUNTED_LOOP, regex);
 713     }
 714 
 715     public static final String COUNTED_LOOP_MAIN = PREFIX + "COUNTED_LOOP_MAIN" + POSTFIX;
 716     static {
 717         String regex = START + "CountedLoop\\b" + MID + "main" + END;
 718         fromAfterCountedLoops(COUNTED_LOOP_MAIN, regex);
 719     }
 720 
 721     public static final String DECODE_HEAP_OOP_NOT_NULL = PREFIX + "DECODE_HEAP_OOP_NOT_NULL" + POSTFIX;
 722     static {
 723         machOnly(DECODE_HEAP_OOP_NOT_NULL, "decodeHeapOop_not_null");
 724     }
 725 
 726     public static final String DIV = PREFIX + "DIV" + POSTFIX;
 727     static {
 728         beforeMatchingNameRegex(DIV, "Div(I|L|F|D)");
 729     }
 730 
 731     public static final String UDIV = PREFIX + "UDIV" + POSTFIX;
 732     static {
 733         beforeMatchingNameRegex(UDIV, "UDiv(I|L|F|D)");
 734     }
 735 
 736     public static final String DIV_BY_ZERO_TRAP = PREFIX + "DIV_BY_ZERO_TRAP" + POSTFIX;
 737     static {
 738         trapNodes(DIV_BY_ZERO_TRAP, "div0_check");
 739     }
 740 
 741     public static final String DIV_I = PREFIX + "DIV_I" + POSTFIX;
 742     static {
 743         beforeMatchingNameRegex(DIV_I, "DivI");
 744     }
 745 
 746     public static final String DIV_L = PREFIX + "DIV_L" + POSTFIX;
 747     static {
 748         beforeMatchingNameRegex(DIV_L, "DivL");
 749     }
 750 
 751     public static final String DIV_MOD_I = PREFIX + "DIV_MOD_I" + POSTFIX;
 752     static {
 753         beforeMatchingNameRegex(DIV_MOD_I, "DivModI");
 754     }
 755 
 756     public static final String DIV_MOD_L = PREFIX + "DIV_MOD_L" + POSTFIX;
 757     static {
 758         beforeMatchingNameRegex(DIV_MOD_L, "DivModL");
 759     }
 760 
 761     public static final String DIV_VHF = VECTOR_PREFIX + "DIV_VHF" + POSTFIX;
 762     static {
 763         vectorNode(DIV_VHF, "DivVHF", TYPE_SHORT);
 764     }
 765 
 766     public static final String DIV_VF = VECTOR_PREFIX + "DIV_VF" + POSTFIX;
 767     static {
 768         vectorNode(DIV_VF, "DivVF", TYPE_FLOAT);
 769     }
 770 
 771     public static final String DIV_VD = VECTOR_PREFIX + "DIV_VD" + POSTFIX;
 772     static {
 773         vectorNode(DIV_VD, "DivVD", TYPE_DOUBLE);
 774     }
 775 
 776     public static final String DYNAMIC_CALL_OF_METHOD = COMPOSITE_PREFIX + "DYNAMIC_CALL_OF_METHOD" + POSTFIX;
 777     static {
 778         callOfNodes(DYNAMIC_CALL_OF_METHOD, "CallDynamicJava");
 779     }
 780 
 781     public static final String EXPAND_BITS = PREFIX + "EXPAND_BITS" + POSTFIX;
 782     static {
 783         beforeMatchingNameRegex(EXPAND_BITS, "ExpandBits");
 784     }
 785 
 786     public static final String FAST_LOCK = PREFIX + "FAST_LOCK" + POSTFIX;
 787     static {
 788         beforeMatchingNameRegex(FAST_LOCK, "FastLock");
 789     }
 790 
 791     public static final String FAST_UNLOCK = PREFIX + "FAST_UNLOCK" + POSTFIX;
 792     static {
 793         String regex = START + "FastUnlock" + MID + END;
 794         fromMacroToBeforeMatching(FAST_UNLOCK, regex);
 795     }
 796 
 797     public static final String FIELD_ACCESS = PREFIX + "FIELD_ACCESS" + POSTFIX;
 798     static {
 799         String regex = "(.*Field: *" + END;
 800         optoOnly(FIELD_ACCESS, regex);
 801     }
 802 
 803     public static final String FMA_VHF = VECTOR_PREFIX + "FMA_VHF" + POSTFIX;
 804     static {
 805         vectorNode(FMA_VHF, "FmaVHF", TYPE_SHORT);
 806     }
 807 
 808     public static final String FMA_VF = VECTOR_PREFIX + "FMA_VF" + POSTFIX;
 809     static {
 810         vectorNode(FMA_VF, "FmaVF", TYPE_FLOAT);
 811     }
 812 
 813     public static final String FMA_VD = VECTOR_PREFIX + "FMA_VD" + POSTFIX;
 814     static {
 815         vectorNode(FMA_VD, "FmaVD", TYPE_DOUBLE);
 816     }
 817 
 818     public static final String FMA_HF = PREFIX + "FMA_HF" + POSTFIX;
 819     static {
 820         beforeMatchingNameRegex(FMA_HF, "FmaHF");
 821     }
 822 
 823     public static final String G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG" + POSTFIX;
 824     static {
 825         String regex = START + "g1CompareAndExchangeN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 826         machOnly(G1_COMPARE_AND_EXCHANGE_N_WITH_BARRIER_FLAG, regex);
 827     }
 828 
 829     public static final String G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG" + POSTFIX;
 830     static {
 831         String regex = START + "g1CompareAndExchangeP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 832         machOnly(G1_COMPARE_AND_EXCHANGE_P_WITH_BARRIER_FLAG, regex);
 833     }
 834 
 835     public static final String G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG" + POSTFIX;
 836     static {
 837         String regex = START + "g1CompareAndSwapN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 838         machOnly(G1_COMPARE_AND_SWAP_N_WITH_BARRIER_FLAG, regex);
 839     }
 840 
 841     public static final String G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG" + POSTFIX;
 842     static {
 843         String regex = START + "g1CompareAndSwapP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 844         machOnly(G1_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, regex);
 845     }
 846 
 847     public static final String G1_ENCODE_P_AND_STORE_N = PREFIX + "G1_ENCODE_P_AND_STORE_N" + POSTFIX;
 848     static {
 849         machOnlyNameRegex(G1_ENCODE_P_AND_STORE_N, "g1EncodePAndStoreN");
 850     }
 851 
 852     public static final String G1_ENCODE_P_AND_STORE_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_ENCODE_P_AND_STORE_N_WITH_BARRIER_FLAG" + POSTFIX;
 853     static {
 854         String regex = START + "g1EncodePAndStoreN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 855         machOnly(G1_ENCODE_P_AND_STORE_N_WITH_BARRIER_FLAG, regex);
 856     }
 857 
 858     public static final String G1_GET_AND_SET_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_GET_AND_SET_N_WITH_BARRIER_FLAG" + POSTFIX;
 859     static {
 860         String regex = START + "g1GetAndSetN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 861         machOnly(G1_GET_AND_SET_N_WITH_BARRIER_FLAG, regex);
 862     }
 863 
 864     public static final String G1_GET_AND_SET_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_GET_AND_SET_P_WITH_BARRIER_FLAG" + POSTFIX;
 865     static {
 866         String regex = START + "g1GetAndSetP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 867         machOnly(G1_GET_AND_SET_P_WITH_BARRIER_FLAG, regex);
 868     }
 869 
 870     public static final String G1_LOAD_N = PREFIX + "G1_LOAD_N" + POSTFIX;
 871     static {
 872         machOnlyNameRegex(G1_LOAD_N, "g1LoadN");
 873     }
 874 
 875     public static final String G1_LOAD_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_LOAD_N_WITH_BARRIER_FLAG" + POSTFIX;
 876     static {
 877         String regex = START + "g1LoadN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 878         machOnly(G1_LOAD_N_WITH_BARRIER_FLAG, regex);
 879     }
 880 
 881     public static final String G1_LOAD_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_LOAD_P_WITH_BARRIER_FLAG" + POSTFIX;
 882     static {
 883         String regex = START + "g1LoadP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 884         machOnly(G1_LOAD_P_WITH_BARRIER_FLAG, regex);
 885     }
 886 
 887     public static final String G1_STORE_N = PREFIX + "G1_STORE_N" + POSTFIX;
 888     static {
 889         machOnlyNameRegex(G1_STORE_N, "g1StoreN");
 890     }
 891 
 892     public static final String G1_STORE_N_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_STORE_N_WITH_BARRIER_FLAG" + POSTFIX;
 893     static {
 894         String regex = START + "g1StoreN\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 895         machOnly(G1_STORE_N_WITH_BARRIER_FLAG, regex);
 896     }
 897 
 898     public static final String G1_STORE_P = PREFIX + "G1_STORE_P" + POSTFIX;
 899     static {
 900         machOnlyNameRegex(G1_STORE_P, "g1StoreP");
 901     }
 902 
 903     public static final String G1_STORE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "G1_STORE_P_WITH_BARRIER_FLAG" + POSTFIX;
 904     static {
 905         String regex = START + "g1StoreP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
 906         machOnly(G1_STORE_P_WITH_BARRIER_FLAG, regex);
 907     }
 908 
 909     public static final String IF = PREFIX + "IF" + POSTFIX;
 910     static {
 911         beforeMatchingNameRegex(IF, "If\\b");
 912     }
 913 
 914     // Does not work for VM builds without JVMCI like x86_32 (a rule containing this regex will be skipped without having JVMCI built).
 915     public static final String INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP = PREFIX + "INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP" + POSTFIX;
 916     static {
 917         trapNodes(INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP, "intrinsic_or_type_checked_inlining");
 918     }
 919 
 920     public static final String INTRINSIC_TRAP = PREFIX + "INTRINSIC_TRAP" + POSTFIX;
 921     static {
 922         trapNodes(INTRINSIC_TRAP, "intrinsic");
 923     }
 924 
 925     // Is only supported on riscv64.
 926     public static final String IS_FINITE_D = PREFIX + "IS_FINITE_D" + POSTFIX;
 927     static {
 928         beforeMatchingNameRegex(IS_FINITE_D, "IsFiniteD");
 929     }
 930 
 931     // Is only supported on riscv64.
 932     public static final String IS_FINITE_F = PREFIX + "IS_FINITE_F" + POSTFIX;
 933     static {
 934         beforeMatchingNameRegex(IS_FINITE_F, "IsFiniteF");
 935     }
 936 
 937     public static final String IS_INFINITE_D = PREFIX + "IS_INFINITE_D" + POSTFIX;
 938     static {
 939         beforeMatchingNameRegex(IS_INFINITE_D, "IsInfiniteD");
 940     }
 941 
 942     public static final String IS_INFINITE_F = PREFIX + "IS_INFINITE_F" + POSTFIX;
 943     static {
 944         beforeMatchingNameRegex(IS_INFINITE_F, "IsInfiniteF");
 945     }
 946 
 947     // Only supported on x86.
 948     public static final String LEA_P = PREFIX + "LEA_P" + POSTFIX;
 949     static {
 950         machOnly(LEA_P, "leaP(CompressedOopOffset|(8|32)Narrow)");
 951     }
 952 
 953     public static final String LOAD = PREFIX + "LOAD" + POSTFIX;
 954     static {
 955         beforeMatchingNameRegex(LOAD, "Load(B|UB|S|US|I|L|F|D|P|N)");
 956     }
 957 
 958     public static final String LOAD_OF_CLASS = COMPOSITE_PREFIX + "LOAD_OF_CLASS" + POSTFIX;
 959     static {
 960         loadOfNodes(LOAD_OF_CLASS, "Load(B|UB|S|US|I|L|F|D|P|N)");
 961     }
 962 
 963     public static final String LOAD_B = PREFIX + "LOAD_B" + POSTFIX;
 964     static {
 965         beforeMatchingNameRegex(LOAD_B, "LoadB");
 966     }
 967 
 968     public static final String LOAD_B_OF_CLASS = COMPOSITE_PREFIX + "LOAD_B_OF_CLASS" + POSTFIX;
 969     static {
 970         loadOfNodes(LOAD_B_OF_CLASS, "LoadB");
 971     }
 972 
 973     public static final String LOAD_D = PREFIX + "LOAD_D" + POSTFIX;
 974     static {
 975         beforeMatchingNameRegex(LOAD_D, "LoadD");
 976     }
 977 
 978     public static final String LOAD_D_OF_CLASS = COMPOSITE_PREFIX + "LOAD_D_OF_CLASS" + POSTFIX;
 979     static {
 980         loadOfNodes(LOAD_D_OF_CLASS, "LoadD");
 981     }
 982 
 983     public static final String LOAD_F = PREFIX + "LOAD_F" + POSTFIX;
 984     static {
 985         beforeMatchingNameRegex(LOAD_F, "LoadF");
 986     }
 987 
 988     public static final String LOAD_F_OF_CLASS = COMPOSITE_PREFIX + "LOAD_F_OF_CLASS" + POSTFIX;
 989     static {
 990         loadOfNodes(LOAD_F_OF_CLASS, "LoadF");
 991     }
 992 
 993     public static final String LOAD_I = PREFIX + "LOAD_I" + POSTFIX;
 994     static {
 995         beforeMatchingNameRegex(LOAD_I, "LoadI");
 996     }
 997 
 998     public static final String LOAD_I_OF_CLASS = COMPOSITE_PREFIX + "LOAD_I_OF_CLASS" + POSTFIX;
 999     static {
1000         loadOfNodes(LOAD_I_OF_CLASS, "LoadI");
1001     }
1002 
1003     public static final String LOAD_KLASS = PREFIX + "LOAD_KLASS" + POSTFIX;
1004     static {
1005         beforeMatchingNameRegex(LOAD_KLASS, "LoadKlass");
1006     }
1007 
1008     public static final String LOAD_NKLASS = PREFIX + "LOAD_NKLASS" + POSTFIX;
1009     static {
1010         beforeMatchingNameRegex(LOAD_NKLASS, "LoadNKlass");
1011     }
1012 
1013     public static final String LOAD_KLASS_OR_NKLASS = PREFIX + "LOAD_KLASS_OR_NKLASS" + POSTFIX;
1014     static {
1015         beforeMatchingNameRegex(LOAD_KLASS_OR_NKLASS, "LoadN?Klass");
1016     }
1017 
1018     public static final String LOAD_L = PREFIX + "LOAD_L" + POSTFIX;
1019     static {
1020         beforeMatchingNameRegex(LOAD_L, "LoadL");
1021     }
1022 
1023     public static final String LOAD_L_OF_CLASS = COMPOSITE_PREFIX + "LOAD_L_OF_CLASS" + POSTFIX;
1024     static {
1025         loadOfNodes(LOAD_L_OF_CLASS, "LoadL");
1026     }
1027 
1028     public static final String LOAD_N = PREFIX + "LOAD_N" + POSTFIX;
1029     static {
1030         beforeMatchingNameRegex(LOAD_N, "LoadN");
1031     }
1032 
1033     public static final String LOAD_N_OF_CLASS = COMPOSITE_PREFIX + "LOAD_N_OF_CLASS" + POSTFIX;
1034     static {
1035         loadOfNodes(LOAD_N_OF_CLASS, "LoadN");
1036     }
1037 
1038     public static final String LOAD_OF_FIELD = COMPOSITE_PREFIX + "LOAD_OF_FIELD" + POSTFIX;
1039     static {
1040         String regex = START + "Load(B|C|S|I|L|F|D|P|N)" + MID + "@.*name=" + IS_REPLACED + ",.*" + END;
1041         beforeMatching(LOAD_OF_FIELD, regex);
1042     }
1043 
1044     public static final String LOAD_P = PREFIX + "LOAD_P" + POSTFIX;
1045     static {
1046         beforeMatchingNameRegex(LOAD_P, "LoadP");
1047     }
1048 
1049     public static final String LOAD_P_OF_CLASS = COMPOSITE_PREFIX + "LOAD_P_OF_CLASS" + POSTFIX;
1050     static {
1051         loadOfNodes(LOAD_P_OF_CLASS, "LoadP");
1052     }
1053 
1054     public static final String LOAD_S = PREFIX + "LOAD_S" + POSTFIX;
1055     static {
1056         beforeMatchingNameRegex(LOAD_S, "LoadS");
1057     }
1058 
1059     public static final String LOAD_S_OF_CLASS = COMPOSITE_PREFIX + "LOAD_S_OF_CLASS" + POSTFIX;
1060     static {
1061         loadOfNodes(LOAD_S_OF_CLASS, "LoadS");
1062     }
1063 
1064     public static final String LOAD_UB = PREFIX + "LOAD_UB" + POSTFIX;
1065     static {
1066         beforeMatchingNameRegex(LOAD_UB, "LoadUB");
1067     }
1068 
1069     public static final String LOAD_UB_OF_CLASS = COMPOSITE_PREFIX + "LOAD_UB_OF_CLASS" + POSTFIX;
1070     static {
1071         loadOfNodes(LOAD_UB_OF_CLASS, "LoadUB");
1072     }
1073 
1074     public static final String LOAD_US = PREFIX + "LOAD_US" + POSTFIX;
1075     static {
1076         beforeMatchingNameRegex(LOAD_US, "LoadUS");
1077     }
1078 
1079     public static final String LOAD_US_OF_CLASS = COMPOSITE_PREFIX + "LOAD_US_OF_CLASS" + POSTFIX;
1080     static {
1081         loadOfNodes(LOAD_US_OF_CLASS, "LoadUS");
1082     }
1083 
1084     public static final String LOAD_VECTOR_B = VECTOR_PREFIX + "LOAD_VECTOR_B" + POSTFIX;
1085     static {
1086         vectorNode(LOAD_VECTOR_B, "LoadVector", TYPE_BYTE);
1087     }
1088 
1089     public static final String LOAD_VECTOR_C = VECTOR_PREFIX + "LOAD_VECTOR_C" + POSTFIX;
1090     static {
1091         vectorNode(LOAD_VECTOR_C, "LoadVector", TYPE_CHAR);
1092     }
1093 
1094     public static final String LOAD_VECTOR_S = VECTOR_PREFIX + "LOAD_VECTOR_S" + POSTFIX;
1095     static {
1096         vectorNode(LOAD_VECTOR_S, "LoadVector", TYPE_SHORT);
1097     }
1098 
1099     public static final String LOAD_VECTOR_I = VECTOR_PREFIX + "LOAD_VECTOR_I" + POSTFIX;
1100     static {
1101         vectorNode(LOAD_VECTOR_I, "LoadVector", TYPE_INT);
1102     }
1103 
1104     public static final String LOAD_VECTOR_L = VECTOR_PREFIX + "LOAD_VECTOR_L" + POSTFIX;
1105     static {
1106         vectorNode(LOAD_VECTOR_L, "LoadVector", TYPE_LONG);
1107     }
1108 
1109     public static final String LOAD_VECTOR_F = VECTOR_PREFIX + "LOAD_VECTOR_F" + POSTFIX;
1110     static {
1111         vectorNode(LOAD_VECTOR_F, "LoadVector", TYPE_FLOAT);
1112     }
1113 
1114     public static final String LOAD_VECTOR_D = VECTOR_PREFIX + "LOAD_VECTOR_D" + POSTFIX;
1115     static {
1116         vectorNode(LOAD_VECTOR_D, "LoadVector", TYPE_DOUBLE);
1117     }
1118 
1119     public static final String LOAD_VECTOR_Z = VECTOR_PREFIX + "LOAD_VECTOR_Z" + POSTFIX;
1120     static {
1121         vectorNode(LOAD_VECTOR_Z, "LoadVector", TYPE_BOOLEAN);
1122     }
1123 
1124     public static final String LOAD_VECTOR_GATHER = PREFIX + "LOAD_VECTOR_GATHER" + POSTFIX;
1125     static {
1126         beforeMatchingNameRegex(LOAD_VECTOR_GATHER, "LoadVectorGather");
1127     }
1128 
1129     public static final String LOAD_VECTOR_MASKED = PREFIX + "LOAD_VECTOR_MASKED" + POSTFIX;
1130     static {
1131         beforeMatchingNameRegex(LOAD_VECTOR_MASKED, "LoadVectorMasked");
1132     }
1133 
1134     public static final String LOAD_VECTOR_GATHER_MASKED = PREFIX + "LOAD_VECTOR_GATHER_MASKED" + POSTFIX;
1135     static {
1136         beforeMatchingNameRegex(LOAD_VECTOR_GATHER_MASKED, "LoadVectorGatherMasked");
1137     }
1138 
1139     public static final String LONG_COUNTED_LOOP = PREFIX + "LONG_COUNTED_LOOP" + POSTFIX;
1140     static {
1141         String regex = START + "LongCountedLoop\\b" + MID + END;
1142         fromAfterCountedLoops(LONG_COUNTED_LOOP, regex);
1143     }
1144 
1145     public static final String LOOP = PREFIX + "LOOP" + POSTFIX;
1146     static {
1147         String regex = START + "Loop" + MID + END;
1148         fromBeforeCountedLoops(LOOP, regex);
1149     }
1150 
1151     public static final String LSHIFT = PREFIX + "LSHIFT" + POSTFIX;
1152     static {
1153         beforeMatchingNameRegex(LSHIFT, "LShift(I|L)");
1154     }
1155 
1156     public static final String LSHIFT_I = PREFIX + "LSHIFT_I" + POSTFIX;
1157     static {
1158         beforeMatchingNameRegex(LSHIFT_I, "LShiftI");
1159     }
1160 
1161     public static final String LSHIFT_L = PREFIX + "LSHIFT_L" + POSTFIX;
1162     static {
1163         beforeMatchingNameRegex(LSHIFT_L, "LShiftL");
1164     }
1165 
1166     public static final String LSHIFT_VB = VECTOR_PREFIX + "LSHIFT_VB" + POSTFIX;
1167     static {
1168         vectorNode(LSHIFT_VB, "LShiftVB", TYPE_BYTE);
1169     }
1170 
1171     public static final String LSHIFT_VS = VECTOR_PREFIX + "LSHIFT_VS" + POSTFIX;
1172     static {
1173         vectorNode(LSHIFT_VS, "LShiftVS", TYPE_SHORT);
1174     }
1175 
1176     public static final String LSHIFT_VC = VECTOR_PREFIX + "LSHIFT_VC" + POSTFIX;
1177     static {
1178         vectorNode(LSHIFT_VC, "LShiftVS", TYPE_CHAR); // using short op with char type
1179     }
1180 
1181     public static final String LSHIFT_VI = VECTOR_PREFIX + "LSHIFT_VI" + POSTFIX;
1182     static {
1183         vectorNode(LSHIFT_VI, "LShiftVI", TYPE_INT);
1184     }
1185 
1186     public static final String LSHIFT_VL = VECTOR_PREFIX + "LSHIFT_VL" + POSTFIX;
1187     static {
1188         vectorNode(LSHIFT_VL, "LShiftVL", TYPE_LONG);
1189     }
1190 
1191     public static final String MACH_TEMP = PREFIX + "MACH_TEMP" + POSTFIX;
1192     static {
1193         machOnlyNameRegex(MACH_TEMP, "MachTemp");
1194     }
1195 
1196     public static final String MACRO_LOGIC_V = PREFIX + "MACRO_LOGIC_V" + POSTFIX;
1197     static {
1198         afterBarrierExpansionToBeforeMatching(MACRO_LOGIC_V, "MacroLogicV");
1199     }
1200 
1201     public static final String MAX = PREFIX + "MAX" + POSTFIX;
1202     static {
1203         beforeMatchingNameRegex(MAX, "Max(I|L|F|D)");
1204     }
1205 
1206     public static final String MAX_D = PREFIX + "MAX_D" + POSTFIX;
1207     static {
1208         beforeMatchingNameRegex(MAX_D, "MaxD");
1209     }
1210 
1211     public static final String MAX_F = PREFIX + "MAX_F" + POSTFIX;
1212     static {
1213         beforeMatchingNameRegex(MAX_F, "MaxF");
1214     }
1215 
1216     public static final String MAX_I = PREFIX + "MAX_I" + POSTFIX;
1217     static {
1218         beforeMatchingNameRegex(MAX_I, "MaxI");
1219     }
1220 
1221     public static final String MAX_L = PREFIX + "MAX_L" + POSTFIX;
1222     static {
1223         beforeMatchingNameRegex(MAX_L, "MaxL");
1224     }
1225 
1226     public static final String MAX_VI = VECTOR_PREFIX + "MAX_VI" + POSTFIX;
1227     static {
1228         vectorNode(MAX_VI, "MaxV", TYPE_INT);
1229     }
1230 
1231     public static final String MAX_VB = VECTOR_PREFIX + "MAX_VB" + POSTFIX;
1232     static {
1233         vectorNode(MAX_VB, "MaxV", TYPE_BYTE);
1234     }
1235 
1236     public static final String MAX_VS = VECTOR_PREFIX + "MAX_VS" + POSTFIX;
1237     static {
1238         vectorNode(MAX_VS, "MaxV", TYPE_SHORT);
1239     }
1240 
1241     public static final String MAX_VHF = VECTOR_PREFIX + "MAX_VHF" + POSTFIX;
1242     static {
1243         vectorNode(MAX_VHF, "MaxVHF", TYPE_SHORT);
1244     }
1245 
1246     public static final String MAX_VF = VECTOR_PREFIX + "MAX_VF" + POSTFIX;
1247     static {
1248         vectorNode(MAX_VF, "MaxV", TYPE_FLOAT);
1249     }
1250 
1251     public static final String MAX_VD = VECTOR_PREFIX + "MAX_VD" + POSTFIX;
1252     static {
1253         vectorNode(MAX_VD, "MaxV", TYPE_DOUBLE);
1254     }
1255 
1256     public static final String MAX_VL = VECTOR_PREFIX + "MAX_VL" + POSTFIX;
1257     static {
1258         vectorNode(MAX_VL, "MaxV", TYPE_LONG);
1259     }
1260 
1261     public static final String MEMBAR = PREFIX + "MEMBAR" + POSTFIX;
1262     static {
1263         beforeMatchingNameRegex(MEMBAR, "MemBar");
1264     }
1265 
1266     public static final String MEMBAR_ACQUIRE = PREFIX + "MEMBAR_ACQUIRE" + POSTFIX;
1267     static {
1268         beforeMatchingNameRegex(MEMBAR_ACQUIRE, "MemBarAcquire");
1269     }
1270 
1271     public static final String MEMBAR_RELEASE = PREFIX + "MEMBAR_RELEASE" + POSTFIX;
1272     static {
1273         beforeMatchingNameRegex(MEMBAR_RELEASE, "MemBarRelease");
1274     }
1275 
1276     public static final String MEMBAR_STORESTORE = PREFIX + "MEMBAR_STORESTORE" + POSTFIX;
1277     static {
1278         beforeMatchingNameRegex(MEMBAR_STORESTORE, "MemBarStoreStore");
1279     }
1280 
1281     public static final String MEMBAR_VOLATILE = PREFIX + "MEMBAR_VOLATILE" + POSTFIX;
1282     static {
1283         beforeMatchingNameRegex(MEMBAR_VOLATILE, "MemBarVolatile");
1284     }
1285 
1286     public static final String MEM_TO_REG_SPILL_COPY = PREFIX + "MEM_TO_REG_SPILL_COPY" + POSTFIX;
1287     static {
1288         machOnly(MEM_TO_REG_SPILL_COPY, "MemToRegSpillCopy");
1289     }
1290 
1291     public static final String MEM_TO_REG_SPILL_COPY_TYPE = COMPOSITE_PREFIX + "MEM_TO_REG_SPILL_COPY_TYPE" + POSTFIX;
1292     static {
1293         String regex = START + "MemToRegSpillCopy" + MID + IS_REPLACED + ".*" + END;
1294         machOnly(MEM_TO_REG_SPILL_COPY_TYPE, regex);
1295     }
1296 
1297     public static final String MIN = PREFIX + "MIN" + POSTFIX;
1298     static {
1299         beforeMatchingNameRegex(MIN, "Min(I|L)");
1300     }
1301 
1302     public static final String MIN_D = PREFIX + "MIN_D" + POSTFIX;
1303     static {
1304         beforeMatchingNameRegex(MIN_D, "MinD");
1305     }
1306 
1307     public static final String MINMAX_D_REDUCTION_REG = PREFIX + "MINMAX_D_REDUCTION_REG" + POSTFIX;
1308     static {
1309         machOnlyNameRegex(MINMAX_D_REDUCTION_REG, "minmaxD_reduction_reg");
1310     }
1311 
1312     public static final String MINMAX_D_REG = PREFIX + "MINMAX_D_REG" + POSTFIX;
1313     static {
1314         machOnlyNameRegex(MINMAX_D_REG, "minmaxD_reg");
1315     }
1316 
1317     public static final String MIN_F = PREFIX + "MIN_F" + POSTFIX;
1318     static {
1319         beforeMatchingNameRegex(MIN_F, "MinF");
1320     }
1321 
1322     public static final String MINMAX_F_REDUCTION_REG = PREFIX + "MINMAX_F_REDUCTION_REG" + POSTFIX;
1323     static {
1324         machOnlyNameRegex(MINMAX_F_REDUCTION_REG, "minmaxF_reduction_reg");
1325     }
1326 
1327     public static final String MINMAX_F_REG = PREFIX + "MINMAX_F_REG" + POSTFIX;
1328     static {
1329         machOnlyNameRegex(MINMAX_F_REG, "minmaxF_reg");
1330     }
1331 
1332     public static final String MIN_I = PREFIX + "MIN_I" + POSTFIX;
1333     static {
1334         beforeMatchingNameRegex(MIN_I, "MinI");
1335     }
1336 
1337     public static final String MIN_L = PREFIX + "MIN_L" + POSTFIX;
1338     static {
1339         beforeMatchingNameRegex(MIN_L, "MinL");
1340     }
1341 
1342     public static final String MIN_HF = PREFIX + "MIN_HF" + POSTFIX;
1343     static {
1344         beforeMatchingNameRegex(MIN_HF, "MinHF");
1345     }
1346 
1347     public static final String MAX_HF = PREFIX + "MAX_HF" + POSTFIX;
1348     static {
1349         beforeMatchingNameRegex(MAX_HF, "MaxHF");
1350     }
1351 
1352     public static final String MIN_VI = VECTOR_PREFIX + "MIN_VI" + POSTFIX;
1353     static {
1354         vectorNode(MIN_VI, "MinV", TYPE_INT);
1355     }
1356 
1357     public static final String MIN_VB = VECTOR_PREFIX + "MIN_VB" + POSTFIX;
1358     static {
1359         vectorNode(MIN_VB, "MinV", TYPE_BYTE);
1360     }
1361 
1362     public static final String MIN_VS = VECTOR_PREFIX + "MIN_VS" + POSTFIX;
1363     static {
1364         vectorNode(MIN_VS, "MinV", TYPE_SHORT);
1365     }
1366 
1367     public static final String MIN_VHF = VECTOR_PREFIX + "MIN_VHF" + POSTFIX;
1368     static {
1369         vectorNode(MIN_VHF, "MinVHF", TYPE_SHORT);
1370     }
1371 
1372     public static final String MIN_VF = VECTOR_PREFIX + "MIN_VF" + POSTFIX;
1373     static {
1374         vectorNode(MIN_VF, "MinV", TYPE_FLOAT);
1375     }
1376 
1377     public static final String MIN_VD = VECTOR_PREFIX + "MIN_VD" + POSTFIX;
1378     static {
1379         vectorNode(MIN_VD, "MinV", TYPE_DOUBLE);
1380     }
1381 
1382     public static final String MIN_VL = VECTOR_PREFIX + "MIN_VL" + POSTFIX;
1383     static {
1384         vectorNode(MIN_VL, "MinV", TYPE_LONG);
1385     }
1386 
1387     public static final String MOD_I = PREFIX + "MOD_I" + POSTFIX;
1388     static {
1389         beforeMatchingNameRegex(MOD_I, "ModI");
1390     }
1391 
1392     public static final String MOD_L = PREFIX + "MOD_L" + POSTFIX;
1393     static {
1394         beforeMatchingNameRegex(MOD_L, "ModL");
1395     }
1396 
1397     public static final String MOV_F2I = PREFIX + "MOV_F2I" + POSTFIX;
1398     static {
1399         beforeMatchingNameRegex(MOV_F2I, "MoveF2I");
1400     }
1401 
1402     public static final String MOV_I2F = PREFIX + "MOV_I2F" + POSTFIX;
1403     static {
1404         beforeMatchingNameRegex(MOV_I2F, "MoveI2F");
1405     }
1406 
1407     public static final String MOV_D2L = PREFIX + "MOV_D2L" + POSTFIX;
1408     static {
1409         beforeMatchingNameRegex(MOV_D2L, "MoveD2L");
1410     }
1411 
1412     public static final String MOV_L2D = PREFIX + "MOD_L2D" + POSTFIX;
1413     static {
1414         beforeMatchingNameRegex(MOV_L2D, "MoveL2D");
1415     }
1416 
1417     public static final String MUL = PREFIX + "MUL" + POSTFIX;
1418     static {
1419         beforeMatchingNameRegex(MUL, "Mul(I|L|F|D)");
1420     }
1421 
1422     public static final String MUL_ADD_S2I = PREFIX + "MUL_ADD_S2I" + POSTFIX;
1423     static {
1424         beforeMatchingNameRegex(MUL_ADD_S2I, "MulAddS2I");
1425     }
1426 
1427     public static final String MUL_ADD_VS2VI = VECTOR_PREFIX + "MUL_ADD_VS2VI" + POSTFIX;
1428     static {
1429         vectorNode(MUL_ADD_VS2VI, "MulAddVS2VI", TYPE_INT);
1430     }
1431 
1432     public static final String UMIN_VB = VECTOR_PREFIX + "UMIN_VB" + POSTFIX;
1433     static {
1434         vectorNode(UMIN_VB, "UMinV", TYPE_BYTE);
1435     }
1436 
1437     public static final String UMIN_VS = VECTOR_PREFIX + "UMIN_VS" + POSTFIX;
1438     static {
1439         vectorNode(UMIN_VS, "UMinV", TYPE_SHORT);
1440     }
1441 
1442     public static final String UMIN_VI = VECTOR_PREFIX + "UMIN_VI" + POSTFIX;
1443     static {
1444         vectorNode(UMIN_VI, "UMinV", TYPE_INT);
1445     }
1446 
1447     public static final String UMIN_VL = VECTOR_PREFIX + "UMIN_VL" + POSTFIX;
1448     static {
1449         vectorNode(UMIN_VL, "UMinV", TYPE_LONG);
1450     }
1451 
1452     public static final String UMAX_VB = VECTOR_PREFIX + "UMAX_VB" + POSTFIX;
1453     static {
1454         vectorNode(UMAX_VB, "UMaxV", TYPE_BYTE);
1455     }
1456 
1457     public static final String UMAX_VS = VECTOR_PREFIX + "UMAX_VS" + POSTFIX;
1458     static {
1459         vectorNode(UMAX_VS, "UMaxV", TYPE_SHORT);
1460     }
1461 
1462     public static final String UMAX_VI = VECTOR_PREFIX + "UMAX_VI" + POSTFIX;
1463     static {
1464         vectorNode(UMAX_VI, "UMaxV", TYPE_INT);
1465     }
1466 
1467     public static final String UMAX_VL = VECTOR_PREFIX + "UMAX_VL" + POSTFIX;
1468     static {
1469         vectorNode(UMAX_VL, "UMaxV", TYPE_LONG);
1470     }
1471 
1472     public static final String MASK_ALL = PREFIX + "MASK_ALL" + POSTFIX;
1473     static {
1474         beforeMatchingNameRegex(MASK_ALL, "MaskAll");
1475     }
1476 
1477     public static final String VECTOR_LONG_TO_MASK = PREFIX + "VECTOR_LONG_TO_MASK" + POSTFIX;
1478     static {
1479         beforeMatchingNameRegex(VECTOR_LONG_TO_MASK, "VectorLongToMask");
1480     }
1481 
1482     public static final String VECTOR_MASK_TO_LONG = PREFIX + "VECTOR_MASK_TO_LONG" + POSTFIX;
1483     static {
1484         beforeMatchingNameRegex(VECTOR_MASK_TO_LONG, "VectorMaskToLong");
1485     }
1486 
1487     public static final String VECTOR_MASK_LANE_IS_SET = PREFIX + "VECTOR_MASK_LANE_IS_SET" + POSTFIX;
1488     static {
1489         beforeMatchingNameRegex(VECTOR_MASK_LANE_IS_SET, "ExtractUB");
1490     }
1491 
1492     public static final String VECTOR_MASK_GEN = PREFIX + "VECTOR_MASK_GEN" + POSTFIX;
1493     static {
1494         beforeMatchingNameRegex(VECTOR_MASK_GEN, "VectorMaskGen");
1495     }
1496 
1497     public static final String VECTOR_MASK_FIRST_TRUE = PREFIX + "VECTOR_MASK_FIRST_TRUE" + POSTFIX;
1498     static {
1499         beforeMatchingNameRegex(VECTOR_MASK_FIRST_TRUE, "VectorMaskFirstTrue");
1500     }
1501 
1502     // Can only be used if libjsvml or libsleef is available
1503     public static final String CALL_LEAF_VECTOR = PREFIX + "CALL_LEAF_VECTOR" + POSTFIX;
1504     static {
1505         beforeMatchingNameRegex(CALL_LEAF_VECTOR, "CallLeafVector");
1506     }
1507 
1508     // Can only be used if avx512_vnni is available.
1509     public static final String MUL_ADD_VS2VI_VNNI = PREFIX + "MUL_ADD_VS2VI_VNNI" + POSTFIX;
1510     static {
1511         machOnly(MUL_ADD_VS2VI_VNNI, "vmuladdaddS2I_reg");
1512     }
1513 
1514     public static final String MUL_D = PREFIX + "MUL_D" + POSTFIX;
1515     static {
1516         beforeMatchingNameRegex(MUL_D, "MulD");
1517     }
1518 
1519     public static final String MUL_F = PREFIX + "MUL_F" + POSTFIX;
1520     static {
1521         beforeMatchingNameRegex(MUL_F, "MulF");
1522     }
1523 
1524     public static final String MUL_HF = PREFIX + "MUL_HF" + POSTFIX;
1525     static {
1526         beforeMatchingNameRegex(MUL_HF, "MulHF");
1527     }
1528 
1529     public static final String MUL_I = PREFIX + "MUL_I" + POSTFIX;
1530     static {
1531         beforeMatchingNameRegex(MUL_I, "MulI");
1532     }
1533 
1534     public static final String MUL_L = PREFIX + "MUL_L" + POSTFIX;
1535     static {
1536         beforeMatchingNameRegex(MUL_L, "MulL");
1537     }
1538 
1539     public static final String MUL_VL = VECTOR_PREFIX + "MUL_VL" + POSTFIX;
1540     static {
1541         vectorNode(MUL_VL, "MulVL", TYPE_LONG);
1542     }
1543 
1544     public static final String MUL_VI = VECTOR_PREFIX + "MUL_VI" + POSTFIX;
1545     static {
1546         vectorNode(MUL_VI, "MulVI", TYPE_INT);
1547     }
1548 
1549     public static final String MUL_VHF = VECTOR_PREFIX + "MUL_VHF" + POSTFIX;
1550     static {
1551         vectorNode(MUL_VHF, "MulVHF", TYPE_SHORT);
1552     }
1553 
1554     public static final String MUL_VF = VECTOR_PREFIX + "MUL_VF" + POSTFIX;
1555     static {
1556         vectorNode(MUL_VF, "MulVF", TYPE_FLOAT);
1557     }
1558 
1559     public static final String MUL_VD = VECTOR_PREFIX + "MUL_VD" + POSTFIX;
1560     static {
1561         vectorNode(MUL_VD, "MulVD", TYPE_DOUBLE);
1562     }
1563 
1564     public static final String MUL_VB = VECTOR_PREFIX + "MUL_VB" + POSTFIX;
1565     static {
1566         vectorNode(MUL_VB, "MulVB", TYPE_BYTE);
1567     }
1568 
1569     public static final String MUL_VS = VECTOR_PREFIX + "MUL_VS" + POSTFIX;
1570     static {
1571         vectorNode(MUL_VS, "MulVS", TYPE_SHORT);
1572     }
1573 
1574     public static final String MUL_REDUCTION_VD = PREFIX + "MUL_REDUCTION_VD" + POSTFIX;
1575     static {
1576         superWordNodes(MUL_REDUCTION_VD, "MulReductionVD");
1577     }
1578 
1579     public static final String MUL_REDUCTION_VF = PREFIX + "MUL_REDUCTION_VF" + POSTFIX;
1580     static {
1581         superWordNodes(MUL_REDUCTION_VF, "MulReductionVF");
1582     }
1583 
1584     public static final String MUL_REDUCTION_VHF = PREFIX + "MUL_REDUCTION_VHF" + POSTFIX;
1585     static {
1586         superWordNodes(MUL_REDUCTION_VHF, "MulReductionVHF");
1587     }
1588 
1589     public static final String MUL_REDUCTION_VI = PREFIX + "MUL_REDUCTION_VI" + POSTFIX;
1590     static {
1591         superWordNodes(MUL_REDUCTION_VI, "MulReductionVI");
1592     }
1593 
1594     public static final String MUL_REDUCTION_VL = PREFIX + "MUL_REDUCTION_VL" + POSTFIX;
1595     static {
1596         superWordNodes(MUL_REDUCTION_VL, "MulReductionVL");
1597     }
1598 
1599     public static final String MIN_REDUCTION_V = PREFIX + "MIN_REDUCTION_V" + POSTFIX;
1600     static {
1601         superWordNodes(MIN_REDUCTION_V, "MinReductionV");
1602     }
1603 
1604     public static final String MAX_REDUCTION_V = PREFIX + "MAX_REDUCTION_V" + POSTFIX;
1605     static {
1606         superWordNodes(MAX_REDUCTION_V, "MaxReductionV");
1607     }
1608 
1609     public static final String UMIN_REDUCTION_V = PREFIX + "UMIN_REDUCTION_V" + POSTFIX;
1610     static {
1611         superWordNodes(UMIN_REDUCTION_V, "UMinReductionV");
1612     }
1613 
1614     public static final String UMAX_REDUCTION_V = PREFIX + "UMAX_REDUCTION_V" + POSTFIX;
1615     static {
1616         superWordNodes(UMAX_REDUCTION_V, "UMaxReductionV");
1617     }
1618 
1619     public static final String NEG_VF = VECTOR_PREFIX + "NEG_VF" + POSTFIX;
1620     static {
1621         vectorNode(NEG_VF, "NegVF", TYPE_FLOAT);
1622     }
1623 
1624     public static final String NEG_VD = VECTOR_PREFIX + "NEG_VD" + POSTFIX;
1625     static {
1626         vectorNode(NEG_VD, "NegVD", TYPE_DOUBLE);
1627     }
1628 
1629     public static final String NOP = PREFIX + "NOP" + POSTFIX;
1630     static {
1631         machOnlyNameRegex(NOP, "Nop");
1632     }
1633 
1634     public static final String NULL_ASSERT_TRAP = PREFIX + "NULL_ASSERT_TRAP" + POSTFIX;
1635     static {
1636         trapNodes(NULL_ASSERT_TRAP, "null_assert");
1637     }
1638 
1639     public static final String NULL_CHECK = PREFIX + "NULL_CHECK" + POSTFIX;
1640     static {
1641         machOnlyNameRegex(NULL_CHECK, "NullCheck");
1642     }
1643 
1644     public static final String NULL_CHECK_TRAP = PREFIX + "NULL_CHECK_TRAP" + POSTFIX;
1645     static {
1646         trapNodes(NULL_CHECK_TRAP, "null_check");
1647     }
1648 
1649     public static final String OOPMAP_WITH = COMPOSITE_PREFIX + "OOPMAP_WITH" + POSTFIX;
1650     static {
1651         String regex = "(#\\s*OopMap\\s*\\{.*" + IS_REPLACED + ".*\\})";
1652         optoOnly(OOPMAP_WITH, regex);
1653     }
1654 
1655     public static final String OPAQUE_TEMPLATE_ASSERTION_PREDICATE = PREFIX + "OPAQUE_TEMPLATE_ASSERTION_PREDICATE" + POSTFIX;
1656     static {
1657         duringLoopOpts(OPAQUE_TEMPLATE_ASSERTION_PREDICATE, "OpaqueTemplateAssertionPredicate");
1658     }
1659 
1660     public static final String OR_I = PREFIX + "OR_I" + POSTFIX;
1661     static {
1662         beforeMatchingNameRegex(OR_I, "OrI");
1663     }
1664 
1665     public static final String OR_L = PREFIX + "OR_L" + POSTFIX;
1666     static {
1667         beforeMatchingNameRegex(OR_L, "OrL");
1668     }
1669 
1670     public static final String OR_VB = VECTOR_PREFIX + "OR_VB" + POSTFIX;
1671     static {
1672         vectorNode(OR_VB, "OrV", TYPE_BYTE);
1673     }
1674 
1675     public static final String OR_VS = VECTOR_PREFIX + "OR_VS" + POSTFIX;
1676     static {
1677         vectorNode(OR_VS, "OrV", TYPE_SHORT);
1678     }
1679 
1680     public static final String OR_VI = VECTOR_PREFIX + "OR_VI" + POSTFIX;
1681     static {
1682         vectorNode(OR_VI, "OrV", TYPE_INT);
1683     }
1684 
1685     public static final String OR_VL = VECTOR_PREFIX + "OR_VL" + POSTFIX;
1686     static {
1687         vectorNode(OR_VL, "OrV", TYPE_LONG);
1688     }
1689 
1690     public static final String OR_V_MASK = PREFIX + "OR_V_MASK" + POSTFIX;
1691     static {
1692         beforeMatchingNameRegex(OR_V_MASK, "OrVMask");
1693     }
1694 
1695     public static final String OR_REDUCTION_V = PREFIX + "OR_REDUCTION_V" + POSTFIX;
1696     static {
1697         superWordNodes(OR_REDUCTION_V, "OrReductionV");
1698     }
1699 
1700     public static final String OUTER_STRIP_MINED_LOOP = PREFIX + "OUTER_STRIP_MINED_LOOP" + POSTFIX;
1701     static {
1702         String regex = START + "OuterStripMinedLoop\\b" + MID + END;
1703         fromAfterCountedLoops(OUTER_STRIP_MINED_LOOP, regex);
1704     }
1705 
1706     public static final String PARTIAL_SUBTYPE_CHECK = PREFIX + "PARTIAL_SUBTYPE_CHECK" + POSTFIX;
1707     static {
1708         beforeMatchingNameRegex(PARTIAL_SUBTYPE_CHECK, "PartialSubtypeCheck");
1709     }
1710 
1711     public static final String PHI = PREFIX + "PHI" + POSTFIX;
1712     static {
1713         beforeMatchingNameRegex(PHI, "Phi");
1714     }
1715 
1716     public static final String POPCOUNT_I = PREFIX + "POPCOUNT_I" + POSTFIX;
1717     static {
1718         beforeMatchingNameRegex(POPCOUNT_I, "PopCountI");
1719     }
1720 
1721     public static final String POPCOUNT_L = PREFIX + "POPCOUNT_L" + POSTFIX;
1722     static {
1723         beforeMatchingNameRegex(POPCOUNT_L, "PopCountL");
1724     }
1725 
1726     public static final String POPCOUNT_VI = VECTOR_PREFIX + "POPCOUNT_VI" + POSTFIX;
1727     static {
1728         vectorNode(POPCOUNT_VI, "PopCountVI", TYPE_INT);
1729     }
1730 
1731     public static final String POPCOUNT_VL = VECTOR_PREFIX + "POPCOUNT_VL" + POSTFIX;
1732     static {
1733         vectorNode(POPCOUNT_VL, "PopCountVL", TYPE_LONG);
1734     }
1735 
1736     public static final String COUNT_TRAILING_ZEROS_I = PREFIX + "COUNT_TRAILING_ZEROS_I" + POSTFIX;
1737     static {
1738         beforeMatchingNameRegex(COUNT_TRAILING_ZEROS_I, "CountTrailingZerosI");
1739     }
1740 
1741     public static final String COUNT_TRAILING_ZEROS_L = PREFIX + "COUNT_TRAILING_ZEROS_L" + POSTFIX;
1742     static {
1743         beforeMatchingNameRegex(COUNT_TRAILING_ZEROS_L, "CountTrailingZerosL");
1744     }
1745 
1746     public static final String COUNT_TRAILING_ZEROS_VL = VECTOR_PREFIX + "COUNT_TRAILING_ZEROS_VL" + POSTFIX;
1747     static {
1748         vectorNode(COUNT_TRAILING_ZEROS_VL, "CountTrailingZerosV", TYPE_LONG);
1749     }
1750 
1751     public static final String COUNT_TRAILING_ZEROS_VI = VECTOR_PREFIX + "COUNT_TRAILING_ZEROS_VI" + POSTFIX;
1752     static {
1753         vectorNode(COUNT_TRAILING_ZEROS_VI, "CountTrailingZerosV", TYPE_INT);
1754     }
1755 
1756     public static final String COUNT_LEADING_ZEROS_I = PREFIX + "COUNT_LEADING_ZEROS_I" + POSTFIX;
1757     static {
1758         beforeMatchingNameRegex(COUNT_LEADING_ZEROS_I, "CountLeadingZerosI");
1759     }
1760 
1761     public static final String COUNT_LEADING_ZEROS_L = PREFIX + "COUNT_LEADING_ZEROS_L" + POSTFIX;
1762     static {
1763         beforeMatchingNameRegex(COUNT_LEADING_ZEROS_L, "CountLeadingZerosL");
1764     }
1765 
1766     public static final String COUNT_LEADING_ZEROS_VL = VECTOR_PREFIX + "COUNT_LEADING_ZEROS_VL" + POSTFIX;
1767     static {
1768         vectorNode(COUNT_LEADING_ZEROS_VL, "CountLeadingZerosV", TYPE_LONG);
1769     }
1770 
1771     public static final String COUNT_LEADING_ZEROS_VI = VECTOR_PREFIX + "COUNT_LEADING_ZEROS_VI" + POSTFIX;
1772     static {
1773         vectorNode(COUNT_LEADING_ZEROS_VI, "CountLeadingZerosV", TYPE_INT);
1774     }
1775 
1776     public static final String POPULATE_INDEX = PREFIX + "POPULATE_INDEX" + POSTFIX;
1777     static {
1778         String regex = START + "PopulateIndex" + MID + END;
1779         IR_NODE_MAPPINGS.put(POPULATE_INDEX, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
1780                                                                        CompilePhase.AFTER_CLOOPS,
1781                                                                        CompilePhase.BEFORE_MATCHING));
1782     }
1783 
1784     public static final String LOOP_PARSE_PREDICATE = PREFIX + "LOOP_PARSE_PREDICATE" + POSTFIX;
1785     static {
1786         parsePredicateNodes(LOOP_PARSE_PREDICATE, "Loop");
1787     }
1788 
1789     public static final String LOOP_LIMIT_CHECK_PARSE_PREDICATE = PREFIX + "LOOP_LIMIT_CHECK_PARSE_PREDICATE" + POSTFIX;
1790     static {
1791         parsePredicateNodes(LOOP_LIMIT_CHECK_PARSE_PREDICATE, "Loop_Limit_Check");
1792     }
1793 
1794     public static final String PROFILED_LOOP_PARSE_PREDICATE = PREFIX + "PROFILED_LOOP_PARSE_PREDICATE" + POSTFIX;
1795     static {
1796         parsePredicateNodes(PROFILED_LOOP_PARSE_PREDICATE, "Profiled_Loop");
1797     }
1798 
1799     public static final String AUTO_VECTORIZATION_CHECK_PARSE_PREDICATE = PREFIX + "AUTO_VECTORIZATION_CHECK_PARSE_PREDICATE" + POSTFIX;
1800     static {
1801         parsePredicateNodes(AUTO_VECTORIZATION_CHECK_PARSE_PREDICATE, "Auto_Vectorization_Check");
1802     }
1803 
1804     public static final String PREDICATE_TRAP = PREFIX + "PREDICATE_TRAP" + POSTFIX;
1805     static {
1806         trapNodes(PREDICATE_TRAP, "predicate");
1807     }
1808 
1809     public static final String RANGE_CHECK = PREFIX + "RANGE_CHECK" + POSTFIX;
1810     static {
1811         beforeMatchingNameRegex(RANGE_CHECK, "RangeCheck");
1812     }
1813 
1814     public static final String RANGE_CHECK_TRAP = PREFIX + "RANGE_CHECK_TRAP" + POSTFIX;
1815     static {
1816         trapNodes(RANGE_CHECK_TRAP, "range_check");
1817     }
1818 
1819     public static final String SHORT_RUNNING_LOOP_TRAP = PREFIX + "SHORT_RUNNING_LOOP_TRAP" + POSTFIX;
1820     static {
1821         trapNodes(SHORT_RUNNING_LOOP_TRAP, "short_running_loop");
1822     }
1823 
1824     public static final String REINTERPRET_S2HF = PREFIX + "REINTERPRET_S2HF" + POSTFIX;
1825     static {
1826         beforeMatchingNameRegex(REINTERPRET_S2HF, "ReinterpretS2HF");
1827     }
1828 
1829     public static final String REINTERPRET_HF2S = PREFIX + "REINTERPRET_HF2S" + POSTFIX;
1830     static {
1831         beforeMatchingNameRegex(REINTERPRET_HF2S, "ReinterpretHF2S");
1832     }
1833 
1834     public static final String REPLICATE_B = VECTOR_PREFIX + "REPLICATE_B" + POSTFIX;
1835     static {
1836         vectorNode(REPLICATE_B, "Replicate", TYPE_BYTE);
1837     }
1838 
1839     public static final String REPLICATE_S = VECTOR_PREFIX + "REPLICATE_S" + POSTFIX;
1840     static {
1841         vectorNode(REPLICATE_S, "Replicate", TYPE_SHORT);
1842     }
1843 
1844     public static final String REPLICATE_I = VECTOR_PREFIX + "REPLICATE_I" + POSTFIX;
1845     static {
1846         vectorNode(REPLICATE_I, "Replicate", TYPE_INT);
1847     }
1848 
1849     public static final String REPLICATE_L = VECTOR_PREFIX + "REPLICATE_L" + POSTFIX;
1850     static {
1851         vectorNode(REPLICATE_L, "Replicate", TYPE_LONG);
1852     }
1853 
1854     public static final String REPLICATE_F = VECTOR_PREFIX + "REPLICATE_F" + POSTFIX;
1855     static {
1856         vectorNode(REPLICATE_F, "Replicate", TYPE_FLOAT);
1857     }
1858 
1859     public static final String REPLICATE_D = VECTOR_PREFIX + "REPLICATE_D" + POSTFIX;
1860     static {
1861         vectorNode(REPLICATE_D, "Replicate", TYPE_DOUBLE);
1862     }
1863 
1864     public static final String REVERSE_BYTES_I = PREFIX + "REVERSE_BYTES_I" + POSTFIX;
1865     static {
1866         beforeMatchingNameRegex(REVERSE_BYTES_I, "ReverseBytesI");
1867     }
1868 
1869     public static final String REVERSE_BYTES_L = PREFIX + "REVERSE_BYTES_L" + POSTFIX;
1870     static {
1871         beforeMatchingNameRegex(REVERSE_BYTES_L, "ReverseBytesL");
1872     }
1873 
1874     public static final String REVERSE_BYTES_S = PREFIX + "REVERSE_BYTES_S" + POSTFIX;
1875     static {
1876         beforeMatchingNameRegex(REVERSE_BYTES_S, "ReverseBytesS");
1877     }
1878 
1879     public static final String REVERSE_BYTES_US = PREFIX + "REVERSE_BYTES_US" + POSTFIX;
1880     static {
1881         beforeMatchingNameRegex(REVERSE_BYTES_US, "ReverseBytesUS");
1882     }
1883 
1884     public static final String REVERSE_BYTES_VB = VECTOR_PREFIX + "REVERSE_BYTES_VB" + POSTFIX;
1885     static {
1886         vectorNode(REVERSE_BYTES_VB, "ReverseBytesV", TYPE_BYTE);
1887     }
1888 
1889     public static final String REVERSE_BYTES_VS = VECTOR_PREFIX + "REVERSE_BYTES_VS" + POSTFIX;
1890     static {
1891         vectorNode(REVERSE_BYTES_VS, "ReverseBytesV", TYPE_SHORT);
1892     }
1893 
1894     public static final String REVERSE_BYTES_VI = VECTOR_PREFIX + "REVERSE_BYTES_VI" + POSTFIX;
1895     static {
1896         vectorNode(REVERSE_BYTES_VI, "ReverseBytesV", TYPE_INT);
1897     }
1898 
1899     public static final String REVERSE_BYTES_VL = VECTOR_PREFIX + "REVERSE_BYTES_VL" + POSTFIX;
1900     static {
1901         vectorNode(REVERSE_BYTES_VL, "ReverseBytesV", TYPE_LONG);
1902     }
1903 
1904     public static final String REVERSE_I = PREFIX + "REVERSE_I" + POSTFIX;
1905     static {
1906         beforeMatchingNameRegex(REVERSE_I, "ReverseI");
1907     }
1908 
1909     public static final String REVERSE_L = PREFIX + "REVERSE_L" + POSTFIX;
1910     static {
1911         beforeMatchingNameRegex(REVERSE_L, "ReverseL");
1912     }
1913 
1914     public static final String REVERSE_VI = VECTOR_PREFIX + "REVERSE_VI" + POSTFIX;
1915     static {
1916         vectorNode(REVERSE_VI, "ReverseV", TYPE_INT);
1917     }
1918 
1919     public static final String REVERSE_VL = VECTOR_PREFIX + "REVERSE_VL" + POSTFIX;
1920     static {
1921         vectorNode(REVERSE_VL, "ReverseV", TYPE_LONG);
1922     }
1923 
1924     public static final String ROUND_VD = VECTOR_PREFIX + "ROUND_VD" + POSTFIX;
1925     static {
1926         vectorNode(ROUND_VD, "RoundVD", TYPE_LONG);
1927     }
1928 
1929     public static final String ROUND_VF = VECTOR_PREFIX + "ROUND_VF" + POSTFIX;
1930     static {
1931         vectorNode(ROUND_VF, "RoundVF", TYPE_INT);
1932     }
1933 
1934     public static final String ROTATE_LEFT = PREFIX + "ROTATE_LEFT" + POSTFIX;
1935     static {
1936         beforeMatchingNameRegex(ROTATE_LEFT, "RotateLeft");
1937     }
1938 
1939     public static final String ROTATE_RIGHT = PREFIX + "ROTATE_RIGHT" + POSTFIX;
1940     static {
1941         beforeMatchingNameRegex(ROTATE_RIGHT, "RotateRight");
1942     }
1943 
1944     public static final String ROTATE_LEFT_V = PREFIX + "ROTATE_LEFT_V" + POSTFIX;
1945     static {
1946         beforeMatchingNameRegex(ROTATE_LEFT_V, "RotateLeftV");
1947     }
1948 
1949     public static final String ROTATE_RIGHT_V = PREFIX + "ROTATE_RIGHT_V" + POSTFIX;
1950     static {
1951         beforeMatchingNameRegex(ROTATE_RIGHT_V, "RotateRightV");
1952     }
1953 
1954     public static final String ROUND_DOUBLE_MODE_V = VECTOR_PREFIX + "ROUND_DOUBLE_MODE_V" + POSTFIX;
1955     static {
1956         vectorNode(ROUND_DOUBLE_MODE_V, "RoundDoubleModeV", TYPE_DOUBLE);
1957     }
1958 
1959     public static final String RSHIFT = PREFIX + "RSHIFT" + POSTFIX;
1960     static {
1961         beforeMatchingNameRegex(RSHIFT, "RShift(I|L)");
1962     }
1963 
1964     public static final String RSHIFT_I = PREFIX + "RSHIFT_I" + POSTFIX;
1965     static {
1966         beforeMatchingNameRegex(RSHIFT_I, "RShiftI");
1967     }
1968 
1969     public static final String RSHIFT_L = PREFIX + "RSHIFT_L" + POSTFIX;
1970     static {
1971         beforeMatchingNameRegex(RSHIFT_L, "RShiftL");
1972     }
1973 
1974     public static final String RSHIFT_VB = VECTOR_PREFIX + "RSHIFT_VB" + POSTFIX;
1975     static {
1976         vectorNode(RSHIFT_VB, "RShiftVB", TYPE_BYTE);
1977     }
1978 
1979     public static final String RSHIFT_VS = VECTOR_PREFIX + "RSHIFT_VS" + POSTFIX;
1980     static {
1981         vectorNode(RSHIFT_VS, "RShiftVS", TYPE_SHORT);
1982     }
1983 
1984     public static final String RSHIFT_VC = VECTOR_PREFIX + "RSHIFT_VC" + POSTFIX;
1985     static {
1986         vectorNode(RSHIFT_VC, "RShiftVS", TYPE_CHAR); // short computation with char type
1987     }
1988 
1989     public static final String RSHIFT_VI = VECTOR_PREFIX + "RSHIFT_VI" + POSTFIX;
1990     static {
1991         vectorNode(RSHIFT_VI, "RShiftVI", TYPE_INT);
1992     }
1993 
1994     public static final String RSHIFT_VL = VECTOR_PREFIX + "RSHIFT_VL" + POSTFIX;
1995     static {
1996         vectorNode(RSHIFT_VL, "RShiftVL", TYPE_LONG);
1997     }
1998 
1999     public static final String SAFEPOINT = PREFIX + "SAFEPOINT" + POSTFIX;
2000     static {
2001         beforeMatchingNameRegex(SAFEPOINT, "SafePoint");
2002     }
2003 
2004     public static final String SCOPE_OBJECT = PREFIX + "SCOPE_OBJECT" + POSTFIX;
2005     static {
2006         String regex = "(.*# ScObj.*" + END;
2007         optoOnly(SCOPE_OBJECT, regex);
2008     }
2009 
2010     public static final String SAFEPOINT_SCALAROBJECT_OF = COMPOSITE_PREFIX + "SAFEPOINT_SCALAROBJECT_OF" + POSTFIX;
2011     static {
2012         safepointScalarobjectOfNodes(SAFEPOINT_SCALAROBJECT_OF, "SafePointScalarObject");
2013     }
2014 
2015     public static final String SIGNUM_VD = VECTOR_PREFIX + "SIGNUM_VD" + POSTFIX;
2016     static {
2017         vectorNode(SIGNUM_VD, "SignumVD", TYPE_DOUBLE);
2018     }
2019 
2020     public static final String SIGNUM_VF = VECTOR_PREFIX + "SIGNUM_VF" + POSTFIX;
2021     static {
2022         vectorNode(SIGNUM_VF, "SignumVF", TYPE_FLOAT);
2023     }
2024 
2025     public static final String SQRT_VHF = VECTOR_PREFIX + "SQRT_VHF" + POSTFIX;
2026     static {
2027         vectorNode(SQRT_VHF, "SqrtVHF", TYPE_SHORT);
2028     }
2029 
2030     public static final String SQRT_HF = PREFIX + "SQRT_HF" + POSTFIX;
2031     static {
2032        beforeMatchingNameRegex(SQRT_HF, "SqrtHF");
2033     }
2034 
2035     public static final String SQRT_D = PREFIX + "SQRT_D" + POSTFIX;
2036     static {
2037         beforeMatchingNameRegex(SQRT_D, "SqrtD");
2038     }
2039 
2040     public static final String SQRT_F = PREFIX + "SQRT_F" + POSTFIX;
2041     static {
2042        beforeMatchingNameRegex(SQRT_F, "SqrtF");
2043     }
2044 
2045     public static final String SQRT_VF = VECTOR_PREFIX + "SQRT_VF" + POSTFIX;
2046     static {
2047         vectorNode(SQRT_VF, "SqrtVF", TYPE_FLOAT);
2048     }
2049 
2050     public static final String SQRT_VD = VECTOR_PREFIX + "SQRT_VD" + POSTFIX;
2051     static {
2052         vectorNode(SQRT_VD, "SqrtVD", TYPE_DOUBLE);
2053     }
2054 
2055     public static final String STORE = PREFIX + "STORE" + POSTFIX;
2056     static {
2057         beforeMatchingNameRegex(STORE, "Store(B|C|S|I|L|F|D|P|N)");
2058     }
2059 
2060     public static final String STORE_B = PREFIX + "STORE_B" + POSTFIX;
2061     static {
2062         beforeMatchingNameRegex(STORE_B, "StoreB");
2063     }
2064 
2065     public static final String STORE_B_OF_CLASS = COMPOSITE_PREFIX + "STORE_B_OF_CLASS" + POSTFIX;
2066     static {
2067         storeOfNodes(STORE_B_OF_CLASS, "StoreB");
2068     }
2069 
2070     public static final String STORE_C = PREFIX + "STORE_C" + POSTFIX;
2071     static {
2072         beforeMatchingNameRegex(STORE_C, "StoreC");
2073     }
2074 
2075     public static final String STORE_C_OF_CLASS = COMPOSITE_PREFIX + "STORE_C_OF_CLASS" + POSTFIX;
2076     static {
2077         storeOfNodes(STORE_C_OF_CLASS, "StoreC");
2078     }
2079 
2080     public static final String STORE_D = PREFIX + "STORE_D" + POSTFIX;
2081     static {
2082         beforeMatchingNameRegex(STORE_D, "StoreD");
2083     }
2084 
2085     public static final String STORE_D_OF_CLASS = COMPOSITE_PREFIX + "STORE_D_OF_CLASS" + POSTFIX;
2086     static {
2087         storeOfNodes(STORE_D_OF_CLASS, "StoreD");
2088     }
2089 
2090     public static final String STORE_F = PREFIX + "STORE_F" + POSTFIX;
2091     static {
2092         beforeMatchingNameRegex(STORE_F, "StoreF");
2093     }
2094 
2095     public static final String STORE_F_OF_CLASS = COMPOSITE_PREFIX + "STORE_F_OF_CLASS" + POSTFIX;
2096     static {
2097         storeOfNodes(STORE_F_OF_CLASS, "StoreF");
2098     }
2099 
2100     public static final String STORE_I = PREFIX + "STORE_I" + POSTFIX;
2101     static {
2102         beforeMatchingNameRegex(STORE_I, "StoreI");
2103     }
2104 
2105     public static final String STORE_I_OF_CLASS = COMPOSITE_PREFIX + "STORE_I_OF_CLASS" + POSTFIX;
2106     static {
2107         storeOfNodes(STORE_I_OF_CLASS, "StoreI");
2108     }
2109 
2110     public static final String STORE_L = PREFIX + "STORE_L" + POSTFIX;
2111     static {
2112         beforeMatchingNameRegex(STORE_L, "StoreL");
2113     }
2114 
2115     public static final String STORE_L_OF_CLASS = COMPOSITE_PREFIX + "STORE_L_OF_CLASS" + POSTFIX;
2116     static {
2117         storeOfNodes(STORE_L_OF_CLASS, "StoreL");
2118     }
2119 
2120     public static final String STORE_N = PREFIX + "STORE_N" + POSTFIX;
2121     static {
2122         beforeMatchingNameRegex(STORE_N, "StoreN");
2123     }
2124 
2125     public static final String STORE_N_OF_CLASS = COMPOSITE_PREFIX + "STORE_N_OF_CLASS" + POSTFIX;
2126     static {
2127         storeOfNodes(STORE_N_OF_CLASS, "StoreN");
2128     }
2129 
2130     public static final String STORE_OF_CLASS = COMPOSITE_PREFIX + "STORE_OF_CLASS" + POSTFIX;
2131     static {
2132         storeOfNodes(STORE_OF_CLASS, "Store(B|C|S|I|L|F|D|P|N)");
2133     }
2134 
2135     public static final String STORE_OF_FIELD = COMPOSITE_PREFIX + "STORE_OF_FIELD" + POSTFIX;
2136     static {
2137         String regex = START + "Store(B|C|S|I|L|F|D|P|N)" + MID + "@.*name=" + IS_REPLACED + ",.*" + END;
2138         beforeMatching(STORE_OF_FIELD, regex);
2139     }
2140 
2141     public static final String STORE_P = PREFIX + "STORE_P" + POSTFIX;
2142     static {
2143         beforeMatchingNameRegex(STORE_P, "StoreP");
2144     }
2145 
2146     public static final String STORE_P_OF_CLASS = COMPOSITE_PREFIX + "STORE_P_OF_CLASS" + POSTFIX;
2147     static {
2148         storeOfNodes(STORE_P_OF_CLASS, "StoreP");
2149     }
2150 
2151     public static final String STORE_VECTOR = PREFIX + "STORE_VECTOR" + POSTFIX;
2152     static {
2153         beforeMatchingNameRegex(STORE_VECTOR, "StoreVector");
2154     }
2155 
2156     public static final String STORE_VECTOR_SCATTER = PREFIX + "STORE_VECTOR_SCATTER" + POSTFIX;
2157     static {
2158         beforeMatchingNameRegex(STORE_VECTOR_SCATTER, "StoreVectorScatter");
2159     }
2160 
2161     public static final String STORE_VECTOR_MASKED = PREFIX + "STORE_VECTOR_MASKED" + POSTFIX;
2162     static {
2163         beforeMatchingNameRegex(STORE_VECTOR_MASKED, "StoreVectorMasked");
2164     }
2165 
2166     public static final String STORE_VECTOR_SCATTER_MASKED = PREFIX + "STORE_VECTOR_SCATTER_MASKED" + POSTFIX;
2167     static {
2168         beforeMatchingNameRegex(STORE_VECTOR_SCATTER_MASKED, "StoreVectorScatterMasked");
2169     }
2170 
2171     public static final String VECTOR_LOAD_MASK = PREFIX + "VECTOR_LOAD_MASK" + POSTFIX;
2172     static {
2173         beforeMatchingNameRegex(VECTOR_LOAD_MASK, "VectorLoadMask");
2174     }
2175 
2176     public static final String VECTOR_STORE_MASK = PREFIX + "VECTOR_STORE_MASK" + POSTFIX;
2177     static {
2178         beforeMatchingNameRegex(VECTOR_STORE_MASK, "VectorStoreMask");
2179     }
2180 
2181     public static final String SUB = PREFIX + "SUB" + POSTFIX;
2182     static {
2183         beforeMatchingNameRegex(SUB, "Sub(I|L|F|D|HF)");
2184     }
2185 
2186     public static final String SUB_D = PREFIX + "SUB_D" + POSTFIX;
2187     static {
2188         beforeMatchingNameRegex(SUB_D, "SubD");
2189     }
2190 
2191     public static final String SUB_F = PREFIX + "SUB_F" + POSTFIX;
2192     static {
2193         beforeMatchingNameRegex(SUB_F, "SubF");
2194     }
2195 
2196     public static final String SUB_HF = PREFIX + "SUB_HF" + POSTFIX;
2197     static {
2198         beforeMatchingNameRegex(SUB_HF, "SubHF");
2199     }
2200 
2201     public static final String SUB_I = PREFIX + "SUB_I" + POSTFIX;
2202     static {
2203         beforeMatchingNameRegex(SUB_I, "SubI");
2204     }
2205 
2206     public static final String SUB_L = PREFIX + "SUB_L" + POSTFIX;
2207     static {
2208         beforeMatchingNameRegex(SUB_L, "SubL");
2209     }
2210 
2211     public static final String SUB_VB = VECTOR_PREFIX + "SUB_VB" + POSTFIX;
2212     static {
2213         vectorNode(SUB_VB, "SubVB", TYPE_BYTE);
2214     }
2215 
2216     public static final String SUB_VS = VECTOR_PREFIX + "SUB_VS" + POSTFIX;
2217     static {
2218         vectorNode(SUB_VS, "SubVS", TYPE_SHORT);
2219     }
2220 
2221     public static final String SUB_VI = VECTOR_PREFIX + "SUB_VI" + POSTFIX;
2222     static {
2223         vectorNode(SUB_VI, "SubVI", TYPE_INT);
2224     }
2225 
2226     public static final String SUB_VL = VECTOR_PREFIX + "SUB_VL" + POSTFIX;
2227     static {
2228         vectorNode(SUB_VL, "SubVL", TYPE_LONG);
2229     }
2230 
2231     public static final String SUB_VHF = VECTOR_PREFIX + "SUB_VHF" + POSTFIX;
2232     static {
2233         vectorNode(SUB_VHF, "SubVHF", TYPE_SHORT);
2234     }
2235 
2236     public static final String SUB_VF = VECTOR_PREFIX + "SUB_VF" + POSTFIX;
2237     static {
2238         vectorNode(SUB_VF, "SubVF", TYPE_FLOAT);
2239     }
2240 
2241     public static final String SUB_VD = VECTOR_PREFIX + "SUB_VD" + POSTFIX;
2242     static {
2243         vectorNode(SUB_VD, "SubVD", TYPE_DOUBLE);
2244     }
2245 
2246     public static final String SUBTYPE_CHECK = PREFIX + "SUBTYPE_CHECK" + POSTFIX;
2247     static {
2248         beforeMatchingNameRegex(SUBTYPE_CHECK, "SubTypeCheck");
2249     }
2250 
2251     public static final String TRAP = PREFIX + "TRAP" + POSTFIX;
2252     static {
2253         trapNodes(TRAP, "reason");
2254     }
2255 
2256     public static final String DIV_HF = PREFIX + "DIV_HF" + POSTFIX;
2257     static {
2258         beforeMatchingNameRegex(DIV_HF, "DivHF");
2259     }
2260 
2261     public static final String UDIV_I = PREFIX + "UDIV_I" + POSTFIX;
2262     static {
2263         beforeMatchingNameRegex(UDIV_I, "UDivI");
2264     }
2265 
2266     public static final String UDIV_L = PREFIX + "UDIV_L" + POSTFIX;
2267     static {
2268         beforeMatchingNameRegex(UDIV_L, "UDivL");
2269     }
2270 
2271     public static final String UDIV_MOD_I = PREFIX + "UDIV_MOD_I" + POSTFIX;
2272     static {
2273         beforeMatchingNameRegex(UDIV_MOD_I, "UDivModI");
2274     }
2275 
2276     public static final String UDIV_MOD_L = PREFIX + "UDIV_MOD_L" + POSTFIX;
2277     static {
2278         beforeMatchingNameRegex(UDIV_MOD_L, "UDivModL");
2279     }
2280 
2281     public static final String UMOD_I = PREFIX + "UMOD_I" + POSTFIX;
2282     static {
2283         beforeMatchingNameRegex(UMOD_I, "UModI");
2284     }
2285 
2286     public static final String UMOD_L = PREFIX + "UMOD_L" + POSTFIX;
2287     static {
2288         beforeMatchingNameRegex(UMOD_L, "UModL");
2289     }
2290 
2291     public static final String UNHANDLED_TRAP = PREFIX + "UNHANDLED_TRAP" + POSTFIX;
2292     static {
2293         trapNodes(UNHANDLED_TRAP, "unhandled");
2294     }
2295 
2296     public static final String UNSTABLE_IF_TRAP = PREFIX + "UNSTABLE_IF_TRAP" + POSTFIX;
2297     static {
2298         trapNodes(UNSTABLE_IF_TRAP, "unstable_if");
2299     }
2300 
2301     public static final String UNREACHED_TRAP = PREFIX + "UNREACHED_TRAP" + POSTFIX;
2302     static {
2303         trapNodes(UNREACHED_TRAP, "unreached");
2304     }
2305 
2306     public static final String URSHIFT = PREFIX + "URSHIFT" + POSTFIX;
2307     static {
2308         beforeMatchingNameRegex(URSHIFT, "URShift(B|S|I|L)");
2309     }
2310 
2311     public static final String URSHIFT_B = PREFIX + "URSHIFT_B" + POSTFIX;
2312     static {
2313         beforeMatchingNameRegex(URSHIFT_B, "URShiftB");
2314     }
2315 
2316     public static final String URSHIFT_I = PREFIX + "URSHIFT_I" + POSTFIX;
2317     static {
2318         beforeMatchingNameRegex(URSHIFT_I, "URShiftI");
2319     }
2320 
2321     public static final String URSHIFT_L = PREFIX + "URSHIFT_L" + POSTFIX;
2322     static {
2323         beforeMatchingNameRegex(URSHIFT_L, "URShiftL");
2324     }
2325 
2326     public static final String URSHIFT_S = PREFIX + "URSHIFT_S" + POSTFIX;
2327     static {
2328         beforeMatchingNameRegex(URSHIFT_S, "URShiftS");
2329     }
2330 
2331     public static final String URSHIFT_VB = VECTOR_PREFIX + "URSHIFT_VB" + POSTFIX;
2332     static {
2333         vectorNode(URSHIFT_VB, "URShiftVB", TYPE_BYTE);
2334     }
2335 
2336     public static final String URSHIFT_VS = VECTOR_PREFIX + "URSHIFT_VS" + POSTFIX;
2337     static {
2338         vectorNode(URSHIFT_VS, "URShiftVS", TYPE_SHORT);
2339     }
2340 
2341     public static final String URSHIFT_VC = VECTOR_PREFIX + "URSHIFT_VC" + POSTFIX;
2342     static {
2343         vectorNode(URSHIFT_VC, "URShiftVS", TYPE_CHAR); // short computation with char type
2344     }
2345 
2346     public static final String URSHIFT_VI = VECTOR_PREFIX + "URSHIFT_VI" + POSTFIX;
2347     static {
2348         vectorNode(URSHIFT_VI, "URShiftVI", TYPE_INT);
2349     }
2350 
2351     public static final String URSHIFT_VL = VECTOR_PREFIX + "URSHIFT_VL" + POSTFIX;
2352     static {
2353         vectorNode(URSHIFT_VL, "URShiftVL", TYPE_LONG);
2354     }
2355 
2356     public static final String VAND_NOT_I = PREFIX + "VAND_NOT_I" + POSTFIX;
2357     static {
2358         machOnlyNameRegex(VAND_NOT_I, "vand_notI");
2359     }
2360 
2361     public static final String VAND_NOT_L = PREFIX + "VAND_NOT_L" + POSTFIX;
2362     static {
2363         machOnlyNameRegex(VAND_NOT_L, "vand_notL");
2364     }
2365 
2366     public static final String VAND_NOT_I_MASKED = PREFIX + "VAND_NOT_I_MASKED" + POSTFIX;
2367     static {
2368         machOnlyNameRegex(VAND_NOT_I_MASKED, "vand_notI_masked");
2369     }
2370 
2371     public static final String VAND_NOT_L_MASKED = PREFIX + "VAND_NOT_L_MASKED" + POSTFIX;
2372     static {
2373         machOnlyNameRegex(VAND_NOT_L_MASKED, "vand_notL_masked");
2374     }
2375 
2376     public static final String RISCV_VAND_NOTI_VX = PREFIX + "RISCV_VAND_NOTI_VX" + POSTFIX;
2377     static {
2378         machOnlyNameRegex(RISCV_VAND_NOTI_VX, "vand_notI_vx");
2379     }
2380 
2381     public static final String RISCV_VAND_NOTL_VX = PREFIX + "RISCV_VAND_NOTL_VX" + POSTFIX;
2382     static {
2383         machOnlyNameRegex(RISCV_VAND_NOTL_VX, "vand_notL_vx");
2384     }
2385 
2386     public static final String RISCV_VAND_NOTI_VX_MASKED = PREFIX + "RISCV_VAND_NOTI_VX_MASKED" + POSTFIX;
2387     static {
2388         machOnlyNameRegex(RISCV_VAND_NOTI_VX_MASKED, "vand_notI_vx_masked");
2389     }
2390 
2391     public static final String RISCV_VAND_NOTL_VX_MASKED = PREFIX + "RISCV_VAND_NOTL_VX_MASKED" + POSTFIX;
2392     static {
2393         machOnlyNameRegex(RISCV_VAND_NOTL_VX_MASKED, "vand_notL_vx_masked");
2394     }
2395 
2396     public static final String VECTOR_BLEND_B = VECTOR_PREFIX + "VECTOR_BLEND_B" + POSTFIX;
2397     static {
2398         vectorNode(VECTOR_BLEND_B, "VectorBlend", TYPE_BYTE);
2399     }
2400 
2401     public static final String VECTOR_BLEND_S = VECTOR_PREFIX + "VECTOR_BLEND_S" + POSTFIX;
2402     static {
2403         vectorNode(VECTOR_BLEND_S, "VectorBlend", TYPE_SHORT);
2404     }
2405 
2406     public static final String VECTOR_BLEND_I = VECTOR_PREFIX + "VECTOR_BLEND_I" + POSTFIX;
2407     static {
2408         vectorNode(VECTOR_BLEND_I, "VectorBlend", TYPE_INT);
2409     }
2410 
2411     public static final String VECTOR_BLEND_L = VECTOR_PREFIX + "VECTOR_BLEND_L" + POSTFIX;
2412     static {
2413         vectorNode(VECTOR_BLEND_L, "VectorBlend", TYPE_LONG);
2414     }
2415 
2416     public static final String VECTOR_BLEND_F = VECTOR_PREFIX + "VECTOR_BLEND_F" + POSTFIX;
2417     static {
2418         vectorNode(VECTOR_BLEND_F, "VectorBlend", TYPE_FLOAT);
2419     }
2420 
2421     public static final String VECTOR_BLEND_D = VECTOR_PREFIX + "VECTOR_BLEND_D" + POSTFIX;
2422     static {
2423         vectorNode(VECTOR_BLEND_D, "VectorBlend", TYPE_DOUBLE);
2424     }
2425 
2426     public static final String VECTOR_MASK_CMP_I = VECTOR_PREFIX + "VECTOR_MASK_CMP_I" + POSTFIX;
2427     static {
2428         vectorNode(VECTOR_MASK_CMP_I, "VectorMaskCmp", TYPE_INT);
2429     }
2430 
2431     public static final String VECTOR_MASK_CMP_L = VECTOR_PREFIX + "VECTOR_MASK_CMP_L" + POSTFIX;
2432     static {
2433         vectorNode(VECTOR_MASK_CMP_L, "VectorMaskCmp", TYPE_LONG);
2434     }
2435 
2436     public static final String VECTOR_MASK_CMP_F = VECTOR_PREFIX + "VECTOR_MASK_CMP_F" + POSTFIX;
2437     static {
2438         vectorNode(VECTOR_MASK_CMP_F, "VectorMaskCmp", TYPE_FLOAT);
2439     }
2440 
2441     public static final String VECTOR_MASK_CMP_D = VECTOR_PREFIX + "VECTOR_MASK_CMP_D" + POSTFIX;
2442     static {
2443         vectorNode(VECTOR_MASK_CMP_D, "VectorMaskCmp", TYPE_DOUBLE);
2444     }
2445 
2446     public static final String VECTOR_MASK_CMP = PREFIX + "VECTOR_MASK_CMP" + POSTFIX;
2447     static {
2448         beforeMatchingNameRegex(VECTOR_MASK_CMP, "VectorMaskCmp");
2449     }
2450 
2451     public static final String VECTOR_CAST_B2S = VECTOR_PREFIX + "VECTOR_CAST_B2S" + POSTFIX;
2452     static {
2453         vectorNode(VECTOR_CAST_B2S, "VectorCastB2X", TYPE_SHORT);
2454     }
2455 
2456     public static final String VECTOR_CAST_B2I = VECTOR_PREFIX + "VECTOR_CAST_B2I" + POSTFIX;
2457     static {
2458         vectorNode(VECTOR_CAST_B2I, "VectorCastB2X", TYPE_INT);
2459     }
2460 
2461     public static final String VECTOR_CAST_B2L = VECTOR_PREFIX + "VECTOR_CAST_B2L" + POSTFIX;
2462     static {
2463         vectorNode(VECTOR_CAST_B2L, "VectorCastB2X", TYPE_LONG);
2464     }
2465 
2466     public static final String VECTOR_CAST_B2F = VECTOR_PREFIX + "VECTOR_CAST_B2F" + POSTFIX;
2467     static {
2468         vectorNode(VECTOR_CAST_B2F, "VectorCastB2X", TYPE_FLOAT);
2469     }
2470 
2471     public static final String VECTOR_CAST_B2D = VECTOR_PREFIX + "VECTOR_CAST_B2D" + POSTFIX;
2472     static {
2473         vectorNode(VECTOR_CAST_B2D, "VectorCastB2X", TYPE_DOUBLE);
2474     }
2475 
2476     public static final String VECTOR_CAST_D2B = VECTOR_PREFIX + "VECTOR_CAST_D2B" + POSTFIX;
2477     static {
2478         vectorNode(VECTOR_CAST_D2B, "VectorCastD2X", TYPE_BYTE);
2479     }
2480 
2481     public static final String VECTOR_CAST_D2S = VECTOR_PREFIX + "VECTOR_CAST_D2S" + POSTFIX;
2482     static {
2483         vectorNode(VECTOR_CAST_D2S, "VectorCastD2X", TYPE_SHORT);
2484     }
2485 
2486     public static final String VECTOR_CAST_D2I = VECTOR_PREFIX + "VECTOR_CAST_D2I" + POSTFIX;
2487     static {
2488         vectorNode(VECTOR_CAST_D2I, "VectorCastD2X", TYPE_INT);
2489     }
2490 
2491     public static final String VECTOR_CAST_D2L = VECTOR_PREFIX + "VECTOR_CAST_D2L" + POSTFIX;
2492     static {
2493         vectorNode(VECTOR_CAST_D2L, "VectorCastD2X", TYPE_LONG);
2494     }
2495 
2496     public static final String VECTOR_CAST_D2F = VECTOR_PREFIX + "VECTOR_CAST_D2F" + POSTFIX;
2497     static {
2498         vectorNode(VECTOR_CAST_D2F, "VectorCastD2X", TYPE_FLOAT);
2499     }
2500 
2501     public static final String VECTOR_CAST_F2B = VECTOR_PREFIX + "VECTOR_CAST_F2B" + POSTFIX;
2502     static {
2503         vectorNode(VECTOR_CAST_F2B, "VectorCastF2X", TYPE_BYTE);
2504     }
2505 
2506     public static final String VECTOR_CAST_F2S = VECTOR_PREFIX + "VECTOR_CAST_F2S" + POSTFIX;
2507     static {
2508         vectorNode(VECTOR_CAST_F2S, "VectorCastF2X", TYPE_SHORT);
2509     }
2510 
2511     public static final String VECTOR_CAST_F2I = VECTOR_PREFIX + "VECTOR_CAST_F2I" + POSTFIX;
2512     static {
2513         vectorNode(VECTOR_CAST_F2I, "VectorCastF2X", TYPE_INT);
2514     }
2515 
2516     public static final String VECTOR_CAST_F2L = VECTOR_PREFIX + "VECTOR_CAST_F2L" + POSTFIX;
2517     static {
2518         vectorNode(VECTOR_CAST_F2L, "VectorCastF2X", TYPE_LONG);
2519     }
2520 
2521     public static final String VECTOR_CAST_F2D = VECTOR_PREFIX + "VECTOR_CAST_F2D" + POSTFIX;
2522     static {
2523         vectorNode(VECTOR_CAST_F2D, "VectorCastF2X", TYPE_DOUBLE);
2524     }
2525 
2526     public static final String VECTOR_CAST_I2B = VECTOR_PREFIX + "VECTOR_CAST_I2B" + POSTFIX;
2527     static {
2528         vectorNode(VECTOR_CAST_I2B, "VectorCastI2X", TYPE_BYTE);
2529     }
2530 
2531     public static final String VECTOR_CAST_I2S = VECTOR_PREFIX + "VECTOR_CAST_I2S" + POSTFIX;
2532     static {
2533         vectorNode(VECTOR_CAST_I2S, "VectorCastI2X", TYPE_SHORT);
2534     }
2535 
2536     public static final String VECTOR_CAST_I2L = VECTOR_PREFIX + "VECTOR_CAST_I2L" + POSTFIX;
2537     static {
2538         vectorNode(VECTOR_CAST_I2L, "VectorCastI2X", TYPE_LONG);
2539     }
2540 
2541     public static final String VECTOR_CAST_I2F = VECTOR_PREFIX + "VECTOR_CAST_I2F" + POSTFIX;
2542     static {
2543         vectorNode(VECTOR_CAST_I2F, "VectorCastI2X", TYPE_FLOAT);
2544     }
2545 
2546     public static final String VECTOR_CAST_I2D = VECTOR_PREFIX + "VECTOR_CAST_I2D" + POSTFIX;
2547     static {
2548         vectorNode(VECTOR_CAST_I2D, "VectorCastI2X", TYPE_DOUBLE);
2549     }
2550 
2551     public static final String VECTOR_CAST_L2B = VECTOR_PREFIX + "VECTOR_CAST_L2B" + POSTFIX;
2552     static {
2553         vectorNode(VECTOR_CAST_L2B, "VectorCastL2X", TYPE_BYTE);
2554     }
2555 
2556     public static final String VECTOR_CAST_L2S = VECTOR_PREFIX + "VECTOR_CAST_L2S" + POSTFIX;
2557     static {
2558         vectorNode(VECTOR_CAST_L2S, "VectorCastL2X", TYPE_SHORT);
2559     }
2560 
2561     public static final String VECTOR_CAST_L2I = VECTOR_PREFIX + "VECTOR_CAST_L2I" + POSTFIX;
2562     static {
2563         vectorNode(VECTOR_CAST_L2I, "VectorCastL2X", TYPE_INT);
2564     }
2565 
2566     public static final String VECTOR_CAST_L2F = VECTOR_PREFIX + "VECTOR_CAST_L2F" + POSTFIX;
2567     static {
2568         vectorNode(VECTOR_CAST_L2F, "VectorCastL2X", TYPE_FLOAT);
2569     }
2570 
2571     public static final String VECTOR_CAST_L2D = VECTOR_PREFIX + "VECTOR_CAST_L2D" + POSTFIX;
2572     static {
2573         vectorNode(VECTOR_CAST_L2D, "VectorCastL2X", TYPE_DOUBLE);
2574     }
2575 
2576     public static final String VECTOR_CAST_S2B = VECTOR_PREFIX + "VECTOR_CAST_S2B" + POSTFIX;
2577     static {
2578         vectorNode(VECTOR_CAST_S2B, "VectorCastS2X", TYPE_BYTE);
2579     }
2580 
2581     public static final String VECTOR_CAST_S2I = VECTOR_PREFIX + "VECTOR_CAST_S2I" + POSTFIX;
2582     static {
2583         vectorNode(VECTOR_CAST_S2I, "VectorCastS2X", TYPE_INT);
2584     }
2585 
2586     public static final String VECTOR_CAST_S2L = VECTOR_PREFIX + "VECTOR_CAST_S2L" + POSTFIX;
2587     static {
2588         vectorNode(VECTOR_CAST_S2L, "VectorCastS2X", TYPE_LONG);
2589     }
2590 
2591     public static final String VECTOR_CAST_S2F = VECTOR_PREFIX + "VECTOR_CAST_S2F" + POSTFIX;
2592     static {
2593         vectorNode(VECTOR_CAST_S2F, "VectorCastS2X", TYPE_FLOAT);
2594     }
2595 
2596     public static final String VECTOR_CAST_S2D = VECTOR_PREFIX + "VECTOR_CAST_S2D" + POSTFIX;
2597     static {
2598         vectorNode(VECTOR_CAST_S2D, "VectorCastS2X", TYPE_DOUBLE);
2599     }
2600 
2601     public static final String VECTOR_CAST_F2HF = VECTOR_PREFIX + "VECTOR_CAST_F2HF" + POSTFIX;
2602     static {
2603         vectorNode(VECTOR_CAST_F2HF, "VectorCastF2HF", TYPE_SHORT);
2604     }
2605 
2606     public static final String VECTOR_CAST_HF2F = VECTOR_PREFIX + "VECTOR_CAST_HF2F" + POSTFIX;
2607     static {
2608         vectorNode(VECTOR_CAST_HF2F, "VectorCastHF2F", TYPE_FLOAT);
2609     }
2610 
2611     public static final String VECTOR_MASK_CAST = PREFIX + "VECTOR_MASK_CAST" + POSTFIX;
2612     static {
2613         beforeMatchingNameRegex(VECTOR_MASK_CAST, "VectorMaskCast");
2614     }
2615 
2616     public static final String VECTOR_REINTERPRET = PREFIX + "VECTOR_REINTERPRET" + POSTFIX;
2617     static {
2618         beforeMatchingNameRegex(VECTOR_REINTERPRET, "VectorReinterpret");
2619     }
2620 
2621     public static final String VECTOR_UCAST_B2S = VECTOR_PREFIX + "VECTOR_UCAST_B2S" + POSTFIX;
2622     static {
2623         vectorNode(VECTOR_UCAST_B2S, "VectorUCastB2X", TYPE_SHORT);
2624     }
2625 
2626     public static final String VECTOR_UCAST_B2I = VECTOR_PREFIX + "VECTOR_UCAST_B2I" + POSTFIX;
2627     static {
2628         vectorNode(VECTOR_UCAST_B2I, "VectorUCastB2X", TYPE_INT);
2629     }
2630 
2631     public static final String VECTOR_UCAST_B2L = VECTOR_PREFIX + "VECTOR_UCAST_B2L" + POSTFIX;
2632     static {
2633         vectorNode(VECTOR_UCAST_B2L, "VectorUCastB2X", TYPE_LONG);
2634     }
2635 
2636     public static final String VECTOR_UCAST_I2L = VECTOR_PREFIX + "VECTOR_UCAST_I2L" + POSTFIX;
2637     static {
2638         vectorNode(VECTOR_UCAST_I2L, "VectorUCastI2X", TYPE_LONG);
2639     }
2640 
2641     public static final String VECTOR_UCAST_S2I = VECTOR_PREFIX + "VECTOR_UCAST_S2I" + POSTFIX;
2642     static {
2643         vectorNode(VECTOR_UCAST_S2I, "VectorUCastS2X", TYPE_INT);
2644     }
2645 
2646     public static final String VECTOR_UCAST_S2L = VECTOR_PREFIX + "VECTOR_UCAST_S2L" + POSTFIX;
2647     static {
2648         vectorNode(VECTOR_UCAST_S2L, "VectorUCastS2X", TYPE_LONG);
2649     }
2650 
2651     public static final String VECTOR_TEST = PREFIX + "VECTOR_TEST" + POSTFIX;
2652     static {
2653         beforeMatchingNameRegex(VECTOR_TEST, "VectorTest");
2654     }
2655 
2656     public static final String VFABD = PREFIX + "VFABD" + POSTFIX;
2657     static {
2658         machOnlyNameRegex(VFABD, "vfabd");
2659     }
2660 
2661     public static final String VFABD_MASKED = PREFIX + "VFABD_MASKED" + POSTFIX;
2662     static {
2663         machOnlyNameRegex(VFABD_MASKED, "vfabd_masked");
2664     }
2665 
2666     public static final String VFMSB_MASKED = PREFIX + "VFMSB_MASKED" + POSTFIX;
2667     static {
2668         machOnlyNameRegex(VFMSB_MASKED, "vfmsb_masked");
2669     }
2670 
2671     public static final String RISCV_VFNMSUB_MASKED = PREFIX + "RISCV_VFNMSUB_MASKED" + POSTFIX;
2672     static {
2673         machOnlyNameRegex(RISCV_VFNMSUB_MASKED, "vfnmsub_masked");
2674     }
2675 
2676     public static final String VFNMAD_MASKED = PREFIX + "VFNMAD_MASKED" + POSTFIX;
2677     static {
2678         machOnlyNameRegex(VFNMAD_MASKED, "vfnmad_masked");
2679     }
2680 
2681     public static final String RISCV_VFNMADD_MASKED = PREFIX + "RISCV_VFNMADD_MASKED" + POSTFIX;
2682     static {
2683         machOnlyNameRegex(RISCV_VFNMADD_MASKED, "vfnmadd_masked");
2684     }
2685 
2686     public static final String VFNMSB_MASKED = PREFIX + "VFNMSB_MASKED" + POSTFIX;
2687     static {
2688         machOnlyNameRegex(VFNMSB_MASKED, "vfnmsb_masked");
2689     }
2690 
2691     public static final String RISCV_VFMSUB_MASKED = PREFIX + "RISCV_VFMSUB_MASKED" + POSTFIX;
2692     static {
2693         machOnlyNameRegex(RISCV_VFMSUB_MASKED, "vfmsub_masked");
2694     }
2695 
2696     public static final String VFMAD_MASKED = PREFIX + "VFMAD_MASKED" + POSTFIX;
2697     static {
2698         machOnlyNameRegex(VFMAD_MASKED, "vfmad_masked");
2699     }
2700 
2701     public static final String RISCV_VFMADD_MASKED = PREFIX + "RISCV_VFMADD_MASKED" + POSTFIX;
2702     static {
2703         machOnlyNameRegex(RISCV_VFMADD_MASKED, "vfmadd_masked");
2704     }
2705 
2706     public static final String VMASK_AND_NOT_L = PREFIX + "VMASK_AND_NOT_L" + POSTFIX;
2707     static {
2708         machOnlyNameRegex(VMASK_AND_NOT_L, "vmask_and_notL");
2709     }
2710 
2711     public static final String VMLA = PREFIX + "VMLA" + POSTFIX;
2712     static {
2713         machOnlyNameRegex(VMLA, "vmla");
2714     }
2715 
2716     public static final String VMLA_MASKED = PREFIX + "VMLA_MASKED" + POSTFIX;
2717     static {
2718         machOnlyNameRegex(VMLA_MASKED, "vmla_masked");
2719     }
2720 
2721     public static final String FMSUB = PREFIX + "FMSUB" + POSTFIX;
2722     static {
2723         machOnlyNameRegex(FMSUB, "msub(F|D)_reg_reg");
2724     }
2725 
2726     public static final String FNMADD = PREFIX + "FNMADD" + POSTFIX;
2727     static {
2728         machOnlyNameRegex(FNMADD, "mnadd(F|D)_reg_reg");
2729     }
2730 
2731     public static final String FNMSUB = PREFIX + "FNMSUB" + POSTFIX;
2732     static {
2733         machOnlyNameRegex(FNMSUB, "mnsub(F|D)_reg_reg");
2734     }
2735 
2736     public static final String FMA_F = PREFIX + "FMA_F" + POSTFIX;
2737     static {
2738         beforeMatchingNameRegex(FMA_F, "FmaF");
2739     }
2740 
2741     public static final String FMA_D = PREFIX + "FMA_D" + POSTFIX;
2742     static {
2743         beforeMatchingNameRegex(FMA_D, "FmaD");
2744     }
2745 
2746     public static final String VFMLA = PREFIX + "VFMLA" + POSTFIX;
2747     static {
2748         machOnlyNameRegex(VFMLA, "vfmla");
2749     }
2750 
2751     public static final String VFMLS = PREFIX + "VFMLS" + POSTFIX;
2752     static {
2753         machOnlyNameRegex(VFMLS, "vfmls");
2754     }
2755 
2756     public static final String VFNMLA = PREFIX + "VFNMLA" + POSTFIX;
2757     static {
2758         machOnlyNameRegex(VFNMLA, "vfnmla");
2759     }
2760 
2761     public static final String VMLS = PREFIX + "VMLS" + POSTFIX;
2762     static {
2763         machOnlyNameRegex(VMLS, "vmls");
2764     }
2765 
2766     public static final String VMLS_MASKED = PREFIX + "VMLS_MASKED" + POSTFIX;
2767     static {
2768         machOnlyNameRegex(VMLS_MASKED, "vmls_masked");
2769     }
2770 
2771     public static final String VMASK_CMP_ZERO_I_NEON = PREFIX + "VMASK_CMP_ZERO_I_NEON" + POSTFIX;
2772     static {
2773         machOnlyNameRegex(VMASK_CMP_ZERO_I_NEON, "vmaskcmp_zeroI_neon");
2774     }
2775 
2776     public static final String VMASK_CMP_ZERO_L_NEON = PREFIX + "VMASK_CMP_ZERO_L_NEON" + POSTFIX;
2777     static {
2778         machOnlyNameRegex(VMASK_CMP_ZERO_L_NEON, "vmaskcmp_zeroL_neon");
2779     }
2780 
2781     public static final String VMASK_CMP_ZERO_F_NEON = PREFIX + "VMASK_CMP_ZERO_F_NEON" + POSTFIX;
2782     static {
2783         machOnlyNameRegex(VMASK_CMP_ZERO_F_NEON, "vmaskcmp_zeroF_neon");
2784     }
2785 
2786     public static final String VMASK_CMP_ZERO_D_NEON = PREFIX + "VMASK_CMP_ZERO_D_NEON" + POSTFIX;
2787     static {
2788         machOnlyNameRegex(VMASK_CMP_ZERO_D_NEON, "vmaskcmp_zeroD_neon");
2789     }
2790 
2791     public static final String VMASK_CMP_IMM_I_SVE = PREFIX + "VMASK_CMP_IMM_I_SVE" + POSTFIX;
2792     static {
2793         machOnlyNameRegex(VMASK_CMP_IMM_I_SVE, "vmaskcmp_immI_sve");
2794     }
2795 
2796     public static final String VMASK_CMPU_IMM_I_SVE = PREFIX + "VMASK_CMPU_IMM_I_SVE" + POSTFIX;
2797     static {
2798         machOnlyNameRegex(VMASK_CMPU_IMM_I_SVE, "vmaskcmpU_immI_sve");
2799     }
2800 
2801     public static final String VMASK_CMP_IMM_L_SVE = PREFIX + "VMASK_CMP_IMM_L_SVE" + POSTFIX;
2802     static {
2803         machOnlyNameRegex(VMASK_CMP_IMM_L_SVE, "vmaskcmp_immL_sve");
2804     }
2805 
2806     public static final String VMASK_CMPU_IMM_L_SVE = PREFIX + "VMASK_CMPU_IMM_L_SVE" + POSTFIX;
2807     static {
2808         machOnlyNameRegex(VMASK_CMPU_IMM_L_SVE, "vmaskcmpU_immL_sve");
2809     }
2810 
2811     public static final String VNOT_I_MASKED = PREFIX + "VNOT_I_MASKED" + POSTFIX;
2812     static {
2813         machOnlyNameRegex(VNOT_I_MASKED, "vnotI_masked");
2814     }
2815 
2816     public static final String VNOT_L_MASKED = PREFIX + "VNOT_L_MASKED" + POSTFIX;
2817     static {
2818         machOnlyNameRegex(VNOT_L_MASKED, "vnotL_masked");
2819     }
2820 
2821     public static final String VSTOREMASK_TRUECOUNT = PREFIX + "VSTOREMASK_TRUECOUNT" + POSTFIX;
2822     static {
2823         machOnlyNameRegex(VSTOREMASK_TRUECOUNT, "vstoremask_truecount_neon");
2824     }
2825 
2826     public static final String X86_SCONV_D2I = PREFIX + "X86_SCONV_D2I" + POSTFIX;
2827     static {
2828         machOnlyNameRegex(X86_SCONV_D2I, "convD2I_reg_reg");
2829     }
2830 
2831     public static final String X86_SCONV_D2L = PREFIX + "X86_SCONV_D2L" + POSTFIX;
2832     static {
2833         machOnlyNameRegex(X86_SCONV_D2L, "convD2L_reg_reg");
2834     }
2835 
2836     public static final String X86_SCONV_F2I = PREFIX + "X86_SCONV_F2I" + POSTFIX;
2837     static {
2838         machOnlyNameRegex(X86_SCONV_F2I, "convF2I_reg_reg");
2839     }
2840 
2841     public static final String X86_SCONV_F2L = PREFIX + "X86_SCONV_F2L" + POSTFIX;
2842     static {
2843         machOnlyNameRegex(X86_SCONV_F2L, "convF2L_reg_reg");
2844     }
2845 
2846     public static final String X86_SCONV_D2I_AVX10_2 = PREFIX + "X86_SCONV_D2I_AVX10_2" + POSTFIX;
2847     static {
2848         machOnlyNameRegex(X86_SCONV_D2I_AVX10_2, "convD2I_(reg_reg|reg_mem)_avx10_2");
2849     }
2850 
2851     public static final String X86_SCONV_D2L_AVX10_2 = PREFIX + "X86_SCONV_D2L_AVX10_2" + POSTFIX;
2852     static {
2853         machOnlyNameRegex(X86_SCONV_D2L_AVX10_2, "convD2L_(reg_reg|reg_mem)_avx10_2");
2854     }
2855 
2856     public static final String X86_SCONV_F2I_AVX10_2 = PREFIX + "X86_SCONV_F2I_AVX10_2" + POSTFIX;
2857     static {
2858         machOnlyNameRegex(X86_SCONV_F2I_AVX10_2, "convF2I_(reg_reg|reg_mem)_avx10_2");
2859     }
2860 
2861     public static final String X86_SCONV_F2L_AVX10_2 = PREFIX + "X86_SCONV_F2L_AVX10_2" + POSTFIX;
2862     static {
2863         machOnlyNameRegex(X86_SCONV_F2L_AVX10_2, "convF2L_(reg_reg|reg_mem)_avx10_2");
2864     }
2865 
2866     public static final String X86_VCAST_F2X = PREFIX + "X86_VCAST_F2X" + POSTFIX;
2867     static {
2868         machOnlyNameRegex(X86_VCAST_F2X, "castFtoX_reg_(av|eve)x");
2869     }
2870 
2871     public static final String X86_VCAST_D2X = PREFIX + "X86_VCAST_D2X" + POSTFIX;
2872     static {
2873         machOnlyNameRegex(X86_VCAST_D2X, "castDtoX_reg_(av|eve)x");
2874     }
2875 
2876     public static final String X86_VCAST_F2X_AVX10_2 = PREFIX + "X86_VCAST_F2X_AVX10_2" + POSTFIX;
2877     static {
2878         machOnlyNameRegex(X86_VCAST_F2X_AVX10_2, "castFtoX_(reg|mem)_avx10_2");
2879     }
2880 
2881     public static final String X86_VCAST_D2X_AVX10_2 = PREFIX + "X86_VCAST_D2X_AVX10_2" + POSTFIX;
2882     static {
2883         machOnlyNameRegex(X86_VCAST_D2X_AVX10_2, "castDtoX_(reg|mem)_avx10_2");
2884     }
2885 
2886     public static final String XOR = PREFIX + "XOR" + POSTFIX;
2887     static {
2888         beforeMatchingNameRegex(XOR, "Xor(I|L)");
2889     }
2890 
2891     public static final String XOR_I = PREFIX + "XOR_I" + POSTFIX;
2892     static {
2893         beforeMatchingNameRegex(XOR_I, "XorI");
2894     }
2895 
2896     public static final String XOR_L = PREFIX + "XOR_L" + POSTFIX;
2897     static {
2898         beforeMatchingNameRegex(XOR_L, "XorL");
2899     }
2900 
2901     public static final String XOR_VB = VECTOR_PREFIX + "XOR_VB" + POSTFIX;
2902     static {
2903         vectorNode(XOR_VB, "XorV", TYPE_BYTE);
2904     }
2905 
2906     public static final String XOR_VS = VECTOR_PREFIX + "XOR_VS" + POSTFIX;
2907     static {
2908         vectorNode(XOR_VS, "XorV", TYPE_SHORT);
2909     }
2910 
2911     public static final String XOR_VI = VECTOR_PREFIX + "XOR_VI" + POSTFIX;
2912     static {
2913         vectorNode(XOR_VI, "XorV", TYPE_INT);
2914     }
2915 
2916     public static final String XOR_VL = VECTOR_PREFIX + "XOR_VL" + POSTFIX;
2917     static {
2918         vectorNode(XOR_VL, "XorV", TYPE_LONG);
2919     }
2920 
2921     public static final String XOR_V = PREFIX + "XOR_V" + POSTFIX;
2922     static {
2923         beforeMatchingNameRegex(XOR_V, "XorV");
2924     }
2925 
2926     public static final String XOR_V_MASK = PREFIX + "XOR_V_MASK" + POSTFIX;
2927     static {
2928         beforeMatchingNameRegex(XOR_V_MASK, "XorVMask");
2929     }
2930 
2931     public static final String XOR_REDUCTION_V = PREFIX + "XOR_REDUCTION_V" + POSTFIX;
2932     static {
2933         superWordNodes(XOR_REDUCTION_V, "XorReductionV");
2934     }
2935 
2936     public static final String XOR3_NEON = PREFIX + "XOR3_NEON" + POSTFIX;
2937     static {
2938         machOnlyNameRegex(XOR3_NEON, "veor3_neon");
2939     }
2940 
2941     public static final String XOR3_SVE = PREFIX + "XOR3_SVE" + POSTFIX;
2942     static {
2943         machOnlyNameRegex(XOR3_SVE, "veor3_sve");
2944     }
2945 
2946     public static final String COMPRESS_BITS_VI = VECTOR_PREFIX + "COMPRESS_BITS_VI" + POSTFIX;
2947     static {
2948         vectorNode(COMPRESS_BITS_VI, "CompressBitsV", TYPE_INT);
2949     }
2950 
2951     public static final String COMPRESS_BITS_VL = VECTOR_PREFIX + "COMPRESS_BITS_VL" + POSTFIX;
2952     static {
2953         vectorNode(COMPRESS_BITS_VL, "CompressBitsV", TYPE_LONG);
2954     }
2955 
2956     public static final String EXPAND_BITS_VI = VECTOR_PREFIX + "EXPAND_BITS_VI" + POSTFIX;
2957     static {
2958         vectorNode(EXPAND_BITS_VI, "ExpandBitsV", TYPE_INT);
2959     }
2960 
2961     public static final String EXPAND_BITS_VL = VECTOR_PREFIX + "EXPAND_BITS_VL" + POSTFIX;
2962     static {
2963         vectorNode(EXPAND_BITS_VL, "ExpandBitsV", TYPE_LONG);
2964     }
2965 
2966     public static final String COMPRESS_VB = VECTOR_PREFIX + "COMPRESS_VB" + POSTFIX;
2967     static {
2968         vectorNode(COMPRESS_VB, "CompressV", TYPE_BYTE);
2969     }
2970 
2971     public static final String COMPRESS_VS = VECTOR_PREFIX + "COMPRESS_VS" + POSTFIX;
2972     static {
2973         vectorNode(COMPRESS_VS, "CompressV", TYPE_SHORT);
2974     }
2975 
2976     public static final String COMPRESS_VI = VECTOR_PREFIX + "COMPRESS_VI" + POSTFIX;
2977     static {
2978         vectorNode(COMPRESS_VI, "CompressV", TYPE_INT);
2979     }
2980 
2981     public static final String COMPRESS_VL = VECTOR_PREFIX + "COMPRESS_VL" + POSTFIX;
2982     static {
2983         vectorNode(COMPRESS_VL, "CompressV", TYPE_LONG);
2984     }
2985 
2986     public static final String COMPRESS_VF = VECTOR_PREFIX + "COMPRESS_VF" + POSTFIX;
2987     static {
2988         vectorNode(COMPRESS_VF, "CompressV", TYPE_FLOAT);
2989     }
2990 
2991     public static final String COMPRESS_VD = VECTOR_PREFIX + "COMPRESS_VD" + POSTFIX;
2992     static {
2993         vectorNode(COMPRESS_VD, "CompressV", TYPE_DOUBLE);
2994     }
2995 
2996     public static final String EXPAND_VB = VECTOR_PREFIX + "EXPAND_VB" + POSTFIX;
2997     static {
2998         vectorNode(EXPAND_VB, "ExpandV", TYPE_BYTE);
2999     }
3000 
3001     public static final String EXPAND_VS = VECTOR_PREFIX + "EXPAND_VS" + POSTFIX;
3002     static {
3003         vectorNode(EXPAND_VS, "ExpandV", TYPE_SHORT);
3004     }
3005 
3006     public static final String EXPAND_VI = VECTOR_PREFIX + "EXPAND_VI" + POSTFIX;
3007     static {
3008         vectorNode(EXPAND_VI, "ExpandV", TYPE_INT);
3009     }
3010 
3011     public static final String EXPAND_VL = VECTOR_PREFIX + "EXPAND_VL" + POSTFIX;
3012     static {
3013         vectorNode(EXPAND_VL, "ExpandV", TYPE_LONG);
3014     }
3015 
3016     public static final String EXPAND_VF = VECTOR_PREFIX + "EXPAND_VF" + POSTFIX;
3017     static {
3018         vectorNode(EXPAND_VF, "ExpandV", TYPE_FLOAT);
3019     }
3020 
3021     public static final String EXPAND_VD = VECTOR_PREFIX + "EXPAND_VD" + POSTFIX;
3022     static {
3023         vectorNode(EXPAND_VD, "ExpandV", TYPE_DOUBLE);
3024     }
3025 
3026     public static final String Z_LOAD_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_LOAD_P_WITH_BARRIER_FLAG" + POSTFIX;
3027     static {
3028         String regex = START + "zLoadP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
3029         machOnly(Z_LOAD_P_WITH_BARRIER_FLAG, regex);
3030     }
3031 
3032     public static final String Z_STORE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_STORE_P_WITH_BARRIER_FLAG" + POSTFIX;
3033     static {
3034         String regex = START + "zStoreP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
3035         machOnly(Z_STORE_P_WITH_BARRIER_FLAG, regex);
3036     }
3037 
3038     public static final String Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG" + POSTFIX;
3039     static {
3040         String regex = START + "zCompareAndSwapP" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
3041         machOnly(Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, regex);
3042     }
3043 
3044     public static final String Z_GET_AND_SET_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_GET_AND_SET_P_WITH_BARRIER_FLAG" + POSTFIX;
3045     static {
3046         String regex = START + "(zXChgP)|(zGetAndSetP\\S*)" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
3047         machOnly(Z_GET_AND_SET_P_WITH_BARRIER_FLAG, regex);
3048     }
3049 
3050     public static final String X86_LOCK_ADDB_REG = PREFIX + "X86_LOCK_ADDB_REG" + POSTFIX;
3051     static {
3052         machOnlyNameRegex(X86_LOCK_ADDB_REG, "xaddB_reg_no_res");
3053     }
3054 
3055     public static final String X86_LOCK_ADDB_IMM = PREFIX + "X86_LOCK_ADDB_IMM" + POSTFIX;
3056     static {
3057         machOnlyNameRegex(X86_LOCK_ADDB_IMM, "xaddB_imm_no_res");
3058     }
3059 
3060     public static final String X86_LOCK_XADDB = PREFIX + "X86_LOCK_XADDB" + POSTFIX;
3061     static {
3062         machOnlyNameRegex(X86_LOCK_XADDB, "xaddB");
3063     }
3064 
3065     public static final String X86_LOCK_ADDS_REG = PREFIX + "X86_LOCK_ADDS_REG" + POSTFIX;
3066     static {
3067         machOnlyNameRegex(X86_LOCK_ADDS_REG, "xaddS_reg_no_res");
3068     }
3069 
3070     public static final String X86_LOCK_ADDS_IMM = PREFIX + "X86_LOCK_ADDS_IMM" + POSTFIX;
3071     static {
3072         machOnlyNameRegex(X86_LOCK_ADDS_IMM, "xaddS_imm_no_res");
3073     }
3074 
3075     public static final String X86_LOCK_XADDS = PREFIX + "X86_LOCK_XADDS" + POSTFIX;
3076     static {
3077         machOnlyNameRegex(X86_LOCK_XADDS, "xaddS");
3078     }
3079 
3080     public static final String X86_LOCK_ADDI_REG = PREFIX + "X86_LOCK_ADDI_REG" + POSTFIX;
3081     static {
3082         machOnlyNameRegex(X86_LOCK_ADDI_REG, "xaddI_reg_no_res");
3083     }
3084 
3085     public static final String X86_LOCK_ADDI_IMM = PREFIX + "X86_LOCK_ADDI_IMM" + POSTFIX;
3086     static {
3087         machOnlyNameRegex(X86_LOCK_ADDI_IMM, "xaddI_imm_no_res");
3088     }
3089 
3090     public static final String X86_LOCK_XADDI = PREFIX + "X86_LOCK_XADDI" + POSTFIX;
3091     static {
3092         machOnlyNameRegex(X86_LOCK_XADDI, "xaddI");
3093     }
3094 
3095     public static final String X86_LOCK_ADDL_REG = PREFIX + "X86_LOCK_ADDL_REG" + POSTFIX;
3096     static {
3097         machOnlyNameRegex(X86_LOCK_ADDL_REG, "xaddL_reg_no_res");
3098     }
3099 
3100     public static final String X86_LOCK_ADDL_IMM = PREFIX + "X86_LOCK_ADDL_IMM" + POSTFIX;
3101     static {
3102         machOnlyNameRegex(X86_LOCK_ADDL_IMM, "xaddL_imm_no_res");
3103     }
3104 
3105     public static final String X86_LOCK_XADDL = PREFIX + "X86_LOCK_XADDL" + POSTFIX;
3106     static {
3107         machOnlyNameRegex(X86_LOCK_XADDL, "xaddL");
3108     }
3109 
3110     public static final String X86_TESTI_REG = PREFIX + "X86_TESTI_REG" + POSTFIX;
3111     static {
3112         machOnlyNameRegex(X86_TESTI_REG, "testI_reg");
3113     }
3114 
3115     public static final String X86_TESTL_REG = PREFIX + "X86_TESTL_REG" + POSTFIX;
3116     static {
3117         machOnlyNameRegex(X86_TESTL_REG, "testL_reg");
3118     }
3119 
3120     public static final String X86_CMOVEL_IMM01 = PREFIX + "X86_CMOVEL_IMM01" + POSTFIX;
3121     static {
3122         machOnlyNameRegex(X86_CMOVEL_IMM01, "cmovL_imm_01");
3123     }
3124 
3125     public static final String X86_CMOVEL_IMM01U = PREFIX + "X86_CMOVEL_IMM01U" + POSTFIX;
3126     static {
3127         machOnlyNameRegex(X86_CMOVEL_IMM01U, "cmovL_imm_01U");
3128     }
3129 
3130     public static final String X86_CMOVEL_IMM01UCF = PREFIX + "X86_CMOVEL_IMM01UCF" + POSTFIX;
3131     static {
3132         machOnlyNameRegex(X86_CMOVEL_IMM01UCF, "cmovL_imm_01UCF");
3133     }
3134 
3135     public static final String X86_CMOVEL_IMM01UCFE = PREFIX + "X86_CMOVEL_IMM01UCFE" + POSTFIX;
3136     static {
3137         machOnlyNameRegex(X86_CMOVEL_IMM01UCFE, "cmovL_imm_01UCFE");
3138     }
3139 
3140     public static final String MOD_F = PREFIX + "MOD_F" + POSTFIX;
3141     static {
3142         String regex = START + "ModF" + MID + END;
3143         macroNodes(MOD_F, regex);
3144     }
3145 
3146     public static final String MOD_D = PREFIX + "MOD_D" + POSTFIX;
3147     static {
3148         String regex = START + "ModD" + MID + END;
3149         macroNodes(MOD_D, regex);
3150     }
3151 
3152     public static final String POW_D = PREFIX + "POW_D" + POSTFIX;
3153     static {
3154         String regex = START + "PowD" + MID + END;
3155         macroNodes(POW_D, regex);
3156     }
3157 
3158     public static final String BLACKHOLE = PREFIX + "BLACKHOLE" + POSTFIX;
3159     static {
3160         fromBeforeRemoveUselessToFinalCode(BLACKHOLE, "Blackhole");
3161     }
3162 
3163     public static final String REACHABILITY_FENCE = PREFIX + "REACHABILITY_FENCE" + POSTFIX;
3164     static {
3165         fromBeforeRemoveUselessToFinalCode(REACHABILITY_FENCE, "ReachabilityFence");
3166     }
3167 
3168     public static final String SELECT_FROM_TWO_VECTOR_VB = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VB" + POSTFIX;
3169     static {
3170         vectorNode(SELECT_FROM_TWO_VECTOR_VB, "SelectFromTwoVector", TYPE_BYTE);
3171     }
3172 
3173     public static final String SELECT_FROM_TWO_VECTOR_VS = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VS" + POSTFIX;
3174     static {
3175         vectorNode(SELECT_FROM_TWO_VECTOR_VS, "SelectFromTwoVector", TYPE_SHORT);
3176     }
3177 
3178     public static final String SELECT_FROM_TWO_VECTOR_VI = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VI" + POSTFIX;
3179     static {
3180         vectorNode(SELECT_FROM_TWO_VECTOR_VI, "SelectFromTwoVector", TYPE_INT);
3181     }
3182 
3183     public static final String SELECT_FROM_TWO_VECTOR_VF = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VF" + POSTFIX;
3184     static {
3185         vectorNode(SELECT_FROM_TWO_VECTOR_VF, "SelectFromTwoVector", TYPE_FLOAT);
3186     }
3187 
3188     public static final String SELECT_FROM_TWO_VECTOR_VD = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VD" + POSTFIX;
3189     static {
3190         vectorNode(SELECT_FROM_TWO_VECTOR_VD, "SelectFromTwoVector", TYPE_DOUBLE);
3191     }
3192 
3193     public static final String SELECT_FROM_TWO_VECTOR_VL = VECTOR_PREFIX + "SELECT_FROM_TWO_VECTOR_VL" + POSTFIX;
3194     static {
3195         vectorNode(SELECT_FROM_TWO_VECTOR_VL, "SelectFromTwoVector", TYPE_LONG);
3196     }
3197 
3198     public static final String REPLICATE_HF = PREFIX + "REPLICATE_HF" + POSTFIX;
3199     static {
3200         machOnlyNameRegex(REPLICATE_HF, "replicateHF");
3201     }
3202 
3203     public static final String REPLICATE_HF_IMM8 = PREFIX + "REPLICATE_HF_IMM8" + POSTFIX;
3204     static {
3205         machOnlyNameRegex(REPLICATE_HF_IMM8, "replicateHF_imm8_gt128b");
3206     }
3207 
3208     public static final String OPAQUE_CONSTANT_BOOL = PREFIX + "OPAQUE_CONSTANT_BOOL" + POSTFIX;
3209     static {
3210         beforeMatchingNameRegex(OPAQUE_CONSTANT_BOOL, "OpaqueConstantBool");
3211     }
3212 
3213     /*
3214      * Utility methods to set up IR_NODE_MAPPINGS.
3215      */
3216 
3217     /**
3218      * Apply {@code regex} on all machine independent ideal graph phases up to and including
3219      * {@link CompilePhase#BEFORE_MATCHING}.
3220      */
3221     private static void beforeMatching(String irNodePlaceholder, String regex) {
3222         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
3223     }
3224 
3225     /**
3226      * Apply {@code irNodeRegex} as regex for the IR node name on all machine independent ideal graph phases up to and
3227      * including {@link CompilePhase#BEFORE_MATCHING}.
3228      */
3229     private static void beforeMatchingNameRegex(String irNodePlaceholder, String irNodeRegex) {
3230         String regex = START + irNodeRegex + MID + END;
3231         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
3232     }
3233 
3234     /**
3235      * Apply {@code irNodeRegex} as regex for the IR vector node name on all machine independent ideal graph phases up to and
3236      * including {@link CompilePhase#BEFORE_MATCHING}. Since this is a vector node, we can also check the vector element
3237      * type {@code typeString} and the vector size (number of elements), {@see VECTOR_SIZE}.
3238      */
3239     private static void vectorNode(String irNodePlaceholder, String irNodeRegex, String typeString) {
3240         TestFramework.check(isVectorIRNode(irNodePlaceholder), "vectorNode: failed prefix check for irNodePlaceholder "
3241                                                                + irNodePlaceholder + " -> did you use VECTOR_PREFIX?");
3242         // IS_REPLACED is later replaced with the specific type and size of the vector.
3243         String regex = START + irNodeRegex + MID  + IS_REPLACED + END;
3244         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
3245         VECTOR_NODE_TYPE.put(irNodePlaceholder, typeString);
3246     }
3247 
3248     /**
3249      * Apply {@code regex} on all ideal graph phases up to and including {@link CompilePhase#BEFORE_MACRO_EXPANSION}.
3250      */
3251     private static void macroNodes(String irNodePlaceholder, String regex) {
3252         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.BEFORE_MACRO_EXPANSION, regex,
3253                                                                           CompilePhase.BEFORE_STRINGOPTS,
3254                                                                           CompilePhase.BEFORE_MACRO_EXPANSION));
3255     }
3256 
3257     private static void callOfNodes(String irNodePlaceholder, String callRegex) {
3258         String regex = START + callRegex + MID + IS_REPLACED + " " +  END;
3259         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
3260     }
3261 
3262     /**
3263      * Apply {@code regex} on all machine dependant ideal graph phases (i.e. on the mach graph) starting from
3264      * {@link CompilePhase#MATCHING}.
3265      */
3266     private static void optoOnly(String irNodePlaceholder, String regex) {
3267         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.OPTO_ASSEMBLY, regex));
3268     }
3269 
3270     private static void machOnly(String irNodePlaceholder, String regex) {
3271         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex));
3272     }
3273 
3274     private static void machOnlyNameRegex(String irNodePlaceholder, String irNodeRegex) {
3275         String regex = START + irNodeRegex + MID + END;
3276         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex));
3277     }
3278 
3279     /**
3280      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#AFTER_CLOOPS}.
3281      */
3282     private static void fromAfterCountedLoops(String irNodePlaceholder, String regex) {
3283         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
3284                                                                           CompilePhase.AFTER_CLOOPS,
3285                                                                           CompilePhase.FINAL_CODE));
3286     }
3287 
3288     /**
3289      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS}.
3290      */
3291     private static void fromBeforeCountedLoops(String irNodePlaceholder, String regex) {
3292         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
3293                                                                           CompilePhase.BEFORE_CLOOPS,
3294                                                                           CompilePhase.FINAL_CODE));
3295     }
3296 
3297     /**
3298      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS} up to and
3299      * including {@link CompilePhase#BEFORE_MATCHING}
3300      */
3301     private static void fromMacroToBeforeMatching(String irNodePlaceholder, String regex) {
3302         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
3303                                                                           CompilePhase.AFTER_MACRO_EXPANSION,
3304                                                                           CompilePhase.BEFORE_MATCHING));
3305     }
3306 
3307     /**
3308      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS} up to and
3309      * including {@link CompilePhase#BEFORE_MATCHING}
3310      */
3311     private static void afterBarrierExpansionToBeforeMatching(String irNodePlaceholder, String regex) {
3312         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
3313                                                                           CompilePhase.OPTIMIZE_FINISHED,
3314                                                                           CompilePhase.BEFORE_MATCHING));
3315     }
3316 
3317     /**
3318      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_LOOP_OPTS}
3319      * up to and including {@link CompilePhase#AFTER_LOOP_OPTS}.
3320      */
3321     private static void duringLoopOpts(String irNodePlaceholder, String regex) {
3322         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.AFTER_LOOP_OPTS, regex,
3323                                                                           CompilePhase.BEFORE_LOOP_OPTS,
3324                                                                           CompilePhase.AFTER_LOOP_OPTS));
3325     }
3326 
3327     private static void trapNodes(String irNodePlaceholder, String trapReason) {
3328         String regex = START + "CallStaticJava" + MID + "uncommon_trap.*" + trapReason + END;
3329         beforeMatching(irNodePlaceholder, regex);
3330     }
3331 
3332     private static void parsePredicateNodes(String irNodePlaceholder, String label) {
3333         String regex = START + "ParsePredicate" + MID + "#" + label + " " + END;
3334         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.AFTER_PARSING, regex,
3335                                                                           CompilePhase.AFTER_PARSING,
3336                                                                           CompilePhase.AFTER_LOOP_OPTS));
3337     }
3338 
3339     // Typename in load/store have the structure:
3340     // @ptrtype:fully/qualified/package/name/to/TheClass:ptrlattice+12
3341     // with ptrtype being the kind of the type such as instptr, aryptr, etc, and ptrlattice being
3342     // the kind of the value such as BotPTR, NotNull, etc.
3343     // And variation:
3344     // - after ptrtype, we can have "stable:" or other labels, with optional space after ':'
3345     // - the class can actually be a nested class, with $ separator (and it must be ok to give only the deepest one
3346     // - after the class name, we can have a comma-separated list of implemented interfaces enclosed in parentheses
3347     // Worst case, it can be something like:
3348     // @bla: bli:a/b/c$d$e (f/g,h/i/j):NotNull+24
3349 
3350     // @ matches the start character of the pattern
3351     // (\w+: ?)+ tries to match the pattern 'ptrtype:' or 'stable:' with optional trailing whitespaces
3352     // [\\w/\\$] tries to match the pattern such as 'a/b/', 'a/b', or '/b' but also nested class such as '$c' or '$c$d'
3353     // \b asserts that the next character is a word character
3354     private static final String LOAD_STORE_PREFIX = "@(\\w+: ?)+[\\w/\\$]*\\b";
3355     // ( \([^\)]+\))? tries to match the pattern ' (f/g,h/i/j)'
3356     // :\w+ tries to match the pattern ':NotNull'
3357     // .* tries to match the remaining of the pattern
3358     private static final String LOAD_STORE_SUFFIX = "( \\([^\\)]+\\))?:\\w+.*";
3359 
3360     private static void loadOfNodes(String irNodePlaceholder, String irNodeRegex) {
3361         String regex = START + irNodeRegex + MID + LOAD_STORE_PREFIX + IS_REPLACED + LOAD_STORE_SUFFIX + END;
3362         beforeMatching(irNodePlaceholder, regex);
3363     }
3364 
3365     private static void storeOfNodes(String irNodePlaceholder, String irNodeRegex) {
3366         String regex = START + irNodeRegex + MID + LOAD_STORE_PREFIX + IS_REPLACED + LOAD_STORE_SUFFIX + END;
3367         beforeMatching(irNodePlaceholder, regex);
3368     }
3369 
3370     private static void safepointScalarobjectOfNodes(String irNodePlaceholder, String irNodeRegex) {
3371         String regex = START + irNodeRegex + MID + ".*" + IS_REPLACED + ".*" + END;
3372         beforeMatching(irNodePlaceholder, regex);
3373     }
3374 
3375     private static void fromBeforeRemoveUselessToFinalCode(String irNodePlaceholder, String irNodeRegex) {
3376         String regex = START + irNodeRegex + MID + END;
3377         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
3378                 CompilePhase.BEFORE_REMOVEUSELESS,
3379                 CompilePhase.FINAL_CODE));
3380     }
3381 
3382     /**
3383      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#PHASEIDEALLOOP1} which is the
3384      * first phase that could contain vector nodes from super word.
3385      */
3386     private static void superWordNodes(String irNodePlaceholder, String irNodeRegex) {
3387         String regex = START + irNodeRegex + MID + END;
3388         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
3389                                                                           CompilePhase.PHASEIDEALLOOP1,
3390                                                                           CompilePhase.BEFORE_MATCHING));
3391     }
3392 
3393 
3394     /*
3395      * Methods used internally by the IR framework.
3396      */
3397 
3398     /**
3399      * Is {@code irNodeString} an IR node placeholder string?
3400      */
3401     public static boolean isIRNode(String irNodeString) {
3402         return irNodeString.startsWith(PREFIX);
3403     }
3404 
3405     /**
3406      * Is {@code irCompositeNodeString} an IR composite node placeholder string?
3407      */
3408     public static boolean isCompositeIRNode(String irCompositeNodeString) {
3409         return irCompositeNodeString.startsWith(COMPOSITE_PREFIX);
3410     }
3411 
3412     /**
3413      * Is {@code irVectorNodeString} an IR vector node placeholder string?
3414      */
3415     public static boolean isVectorIRNode(String irVectorNodeString) {
3416         return irVectorNodeString.startsWith(VECTOR_PREFIX);
3417     }
3418 
3419     /**
3420      * Is {@code irVectorSizeString} a vector size string?
3421      */
3422     public static boolean isVectorSize(String irVectorSizeString) {
3423         return irVectorSizeString.startsWith(VECTOR_SIZE);
3424     }
3425 
3426     /**
3427      * Parse {@code sizeString} and generate a regex pattern to match for the size in the IR dump.
3428      */
3429     public static String parseVectorNodeSize(String sizeString, String typeString, VMInfo vmInfo) {
3430         if (sizeString.equals(VECTOR_SIZE_TAG_ANY)) {
3431             return "\\\\d+"; // match with any number
3432         }
3433         // Try to parse any tags, convert to comma separated list of ints
3434         sizeString = parseVectorNodeSizeTag(sizeString, typeString, vmInfo);
3435         // Parse comma separated list of numbers
3436         String[] sizes = sizeString.split(",");
3437         String regex = "";
3438         for (int i = 0; i < sizes.length; i++) {
3439             int size = 0;
3440             try {
3441                 size = Integer.parseInt(sizes[i]);
3442             } catch (NumberFormatException e) {
3443                 throw new TestFormatException("Vector node has invalid size \"" + sizes[i] + "\", in \"" + sizeString + "\"");
3444             }
3445             TestFormat.checkNoReport(size > 1, "Vector node size must be 2 or larger, but got \"" + sizes[i] + "\", in \"" + sizeString + "\"");
3446             regex += ((i > 0) ? "|" : "") + size;
3447         }
3448         if (sizes.length > 1) {
3449            regex = "(" + regex + ")";
3450         }
3451         return regex;
3452     }
3453 
3454     /**
3455      * If {@code sizeTagString} is a size tag, return the list of accepted sizes, else return sizeTagString.
3456      */
3457     public static String parseVectorNodeSizeTag(String sizeTagString, String typeString, VMInfo vmInfo) {
3458         // Parse out "min(a,b,c,...)"
3459         if (sizeTagString.startsWith("min(") && sizeTagString.endsWith(")")) {
3460             return parseVectorNodeSizeTagMin(sizeTagString, typeString, vmInfo);
3461         }
3462 
3463         // Parse individual tags
3464         return switch (sizeTagString) {
3465             case VECTOR_SIZE_TAG_MAX -> String.valueOf(getMaxElementsForType(typeString, vmInfo));
3466             case "max_byte"          -> String.valueOf(getMaxElementsForType(TYPE_BYTE, vmInfo));
3467             case "max_char"          -> String.valueOf(getMaxElementsForType(TYPE_CHAR, vmInfo));
3468             case "max_short"         -> String.valueOf(getMaxElementsForType(TYPE_SHORT, vmInfo));
3469             case "max_int"           -> String.valueOf(getMaxElementsForType(TYPE_INT, vmInfo));
3470             case "max_long"          -> String.valueOf(getMaxElementsForType(TYPE_LONG, vmInfo));
3471             case "max_float"         -> String.valueOf(getMaxElementsForType(TYPE_FLOAT, vmInfo));
3472             case "max_double"        -> String.valueOf(getMaxElementsForType(TYPE_DOUBLE, vmInfo));
3473             case "LoopMaxUnroll"     -> String.valueOf(vmInfo.getLongValue("LoopMaxUnroll"));
3474             default                  -> sizeTagString;
3475         };
3476     }
3477 
3478     /**
3479      * Parse {@code sizeTagString}, which must be a min-clause.
3480      */
3481     public static String parseVectorNodeSizeTagMin(String sizeTagString, String typeString, VMInfo vmInfo) {
3482         String[] tags = sizeTagString.substring(4, sizeTagString.length() - 1).split(",");
3483         TestFormat.checkNoReport(tags.length > 1, "Vector node size \"min(...)\" must have at least 2 comma separated arguments, got \"" + sizeTagString + "\"");
3484         int minVal = 1024;
3485         for (int i = 0; i < tags.length; i++) {
3486             String tag = parseVectorNodeSizeTag(tags[i].trim(), typeString, vmInfo);
3487             int tag_val = 0;
3488             try {
3489                 tag_val = Integer.parseInt(tag);
3490             } catch (NumberFormatException e) {
3491                 throw new TestFormatException("Vector node has invalid size in \"min(...)\", argument " + i + ", \"" + tag + "\", in \"" + sizeTagString + "\"");
3492             }
3493             minVal = Math.min(minVal, tag_val);
3494         }
3495         return String.valueOf(minVal);
3496     }
3497 
3498     /**
3499      * Return maximal number of elements that can fit in a vector of the specified type.
3500      */
3501     public static long getMaxElementsForType(String typeString, VMInfo vmInfo) {
3502         long maxVectorSize = vmInfo.getLongValue("MaxVectorSize");
3503         TestFormat.checkNoReport(maxVectorSize > 0, "VMInfo: MaxVectorSize is not larger than zero");
3504         long maxBytes = maxVectorSize;
3505 
3506         if (Platform.isX64() || Platform.isX86()) {
3507             maxBytes = Math.min(maxBytes, getMaxElementsForTypeOnX86(typeString, vmInfo));
3508         }
3509 
3510         // compute elements per vector: vector bytes divided by bytes per element
3511         int bytes = getTypeSizeInBytes(typeString);
3512         return maxBytes / bytes;
3513     }
3514 
3515     /**
3516      * Return maximal number of elements that can fit in a vector of the specified type, on x86 / x64.
3517      */
3518     public static long getMaxElementsForTypeOnX86(String typeString, VMInfo vmInfo) {
3519         // restrict maxBytes for specific features, see Matcher::vector_width_in_bytes in x86.ad:
3520         boolean avx1 = vmInfo.hasCPUFeature("avx");
3521         boolean avx2 = vmInfo.hasCPUFeature("avx2");
3522         boolean avx512 = vmInfo.hasCPUFeature("avx512f");
3523         boolean avx512bw = vmInfo.hasCPUFeature("avx512bw");
3524         long maxBytes;
3525         if (avx512) {
3526             maxBytes = 64;
3527         } else if (avx2) {
3528             maxBytes = 32;
3529         } else {
3530             maxBytes = 16;
3531         }
3532         if (avx1 && (typeString.equals(TYPE_FLOAT) || typeString.equals(TYPE_DOUBLE))) {
3533             maxBytes = avx512 ? 64 : 32;
3534         }
3535         if (avx512 && (typeString.equals(TYPE_BYTE) || typeString.equals(TYPE_SHORT) || typeString.equals(TYPE_CHAR))) {
3536             maxBytes = avx512bw ? 64 : 32;
3537         }
3538 
3539         return maxBytes;
3540     }
3541 
3542     /**
3543      * Return size in bytes of type named by {@code typeString}, return 0 if it does not name a type.
3544      */
3545     public static int getTypeSizeInBytes(String typeString) {
3546         return switch (typeString) {
3547             case TYPE_BYTE, TYPE_BOOLEAN -> 1;
3548             case TYPE_CHAR, TYPE_SHORT   -> 2;
3549             case TYPE_INT, TYPE_FLOAT    -> 4;
3550             case TYPE_LONG, TYPE_DOUBLE  -> 8;
3551             default                      -> 0;
3552         };
3553     }
3554 
3555     /**
3556      * Returns "IRNode.XYZ", where XYZ is one of the IR node placeholder variable names defined above.
3557      */
3558     public static String getIRNodeAccessString(String irNodeString) {
3559         int prefixLength;
3560         if (isCompositeIRNode(irNodeString)) {
3561             TestFramework.check(irNodeString.length() > COMPOSITE_PREFIX.length() + POSTFIX.length(),
3562                                 "Invalid composite node placeholder: " + irNodeString);
3563             prefixLength = COMPOSITE_PREFIX.length();
3564         } else if (isVectorIRNode(irNodeString)) {
3565             TestFramework.check(irNodeString.length() > VECTOR_PREFIX.length() + POSTFIX.length(),
3566                                 "Invalid vector node placeholder: " + irNodeString);
3567             prefixLength = VECTOR_PREFIX.length();
3568         } else {
3569             prefixLength = PREFIX.length();
3570         }
3571         return "IRNode." + irNodeString.substring(prefixLength, irNodeString.length() - POSTFIX.length());
3572     }
3573 
3574     /**
3575      * Is this IR node supported on current platform, used VM build, etc.?
3576      * Throws a {@link CheckedTestFrameworkException} if the IR node is unsupported.
3577      */
3578     public static void checkIRNodeSupported(String node) throws CheckedTestFrameworkException {
3579         switch (node) {
3580             case INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP -> {
3581                 if (!WhiteBox.getWhiteBox().isJVMCISupportedByGC()) {
3582                     throw new CheckedTestFrameworkException("INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP is unsupported " +
3583                                                             "in builds without JVMCI.");
3584                 }
3585             }
3586             case CHECKCAST_ARRAYCOPY -> {
3587                 if (Platform.isS390x()) {
3588                     throw new CheckedTestFrameworkException("CHECKCAST_ARRAYCOPY is unsupported on s390.");
3589                 }
3590             }
3591             case IS_FINITE_D, IS_FINITE_F -> {
3592                 if (!Platform.isRISCV64()) {
3593                     throw new CheckedTestFrameworkException("IS_FINITE_* is only supported on riscv64.");
3594                 }
3595             }
3596             // default: do nothing -> IR node is supported and can be used by the user.
3597         }
3598     }
3599 
3600     /**
3601      * Get the regex of an IR node for a specific compile phase. If {@code irNode} is not an IR node placeholder string
3602      * or if there is no regex specified for {@code compilePhase}, a {@link TestFormatException} is reported.
3603      */
3604     public static String getRegexForCompilePhase(String irNode, CompilePhase compilePhase) {
3605         IRNodeMapEntry entry = IR_NODE_MAPPINGS.get(irNode);
3606         String failMsg = "IR Node \"" + irNode + "\" defined in class IRNode has no regex/compiler phase mapping " +
3607                          "(i.e. no static initializer block that adds a mapping entry to IRNode.IR_NODE_MAPPINGS)." +
3608                          System.lineSeparator() +
3609                          "   Have you just created the entry \"" + irNode + "\" in class IRNode and forgot to add a " +
3610                          "mapping?" + System.lineSeparator() +
3611                          "   Violation";
3612         TestFormat.checkNoReport(entry != null, failMsg);
3613         String regex = entry.regexForCompilePhase(compilePhase);
3614         failMsg = "IR Node \"" + irNode + "\" defined in class IRNode has no regex defined for compile phase "
3615                   + compilePhase + "." + System.lineSeparator() +
3616                   "   If you think this compile phase should be supported, update the mapping for \"" + irNode +
3617                   "\" in class IRNode (i.e the static initializer block immediately following the definition of \"" +
3618                   irNode + "\")." + System.lineSeparator() +
3619                   "   Violation";
3620         TestFormat.checkNoReport(regex != null, failMsg);
3621         return regex;
3622     }
3623 
3624     /**
3625      * Get the default phase of an IR node. If {@code irNode} is not an IR node placeholder string, a
3626      * {@link TestFormatException} is reported.
3627      */
3628     public static CompilePhase getDefaultPhase(String irNode) {
3629         IRNodeMapEntry entry = IR_NODE_MAPPINGS.get(irNode);
3630         String failMsg = "\"" + irNode + "\" is not an IR node defined in class IRNode and " +
3631                          "has therefore no default compile phase specified." + System.lineSeparator() +
3632                          "   If your regex represents a C2 IR node, consider adding an entry to class IRNode together " +
3633                          "with a static initializer block that adds a mapping to IRNode.IR_NODE_MAPPINGS." +
3634                          System.lineSeparator() +
3635                          "   Otherwise, set the @IR \"phase\" attribute to a compile phase different from " +
3636                          "CompilePhase.DEFAULT to explicitly tell the IR framework on which compile phase your rule" +
3637                          " should be applied on." + System.lineSeparator() +
3638                          "   Violation";
3639         TestFormat.checkNoReport(entry != null, failMsg);
3640         return entry.defaultCompilePhase();
3641     }
3642 
3643     public static String getVectorNodeType(String irNode) {
3644         String typeString = VECTOR_NODE_TYPE.get(irNode);
3645         String failMsg = "\"" + irNode + "\" is not a Vector IR node defined in class IRNode";
3646         TestFormat.check(typeString != null, failMsg);
3647         return typeString;
3648     }
3649 }