1 /*
   2  * Copyright (c) 2021, 2023, 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.irmatching.parser.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     private static final String START = "(\\d+(\\s){2}(";
 103     private static final String MID = ".*)+(\\s){2}===.*";
 104     private static final String END = ")";
 105     private static final String STORE_OF_CLASS_POSTFIX = "(:|\\+)\\S* \\*" + END;
 106     private static final String LOAD_OF_CLASS_POSTFIX = "(:|\\+)\\S* \\*" + END;
 107 
 108     public static final String IS_REPLACED = "#IS_REPLACED#"; // Is replaced by an additional user-defined string.
 109 
 110     public static final String VECTOR_SIZE = "_@";
 111     public static final String VECTOR_SIZE_TAG_ANY = "any";
 112     public static final String VECTOR_SIZE_TAG_MAX = "max_for_type";
 113     public static final String VECTOR_SIZE_ANY = VECTOR_SIZE + VECTOR_SIZE_TAG_ANY; // default for counts "=0" and failOn
 114     public static final String VECTOR_SIZE_MAX = VECTOR_SIZE + VECTOR_SIZE_TAG_MAX; // default in counts
 115     public static final String VECTOR_SIZE_2   = VECTOR_SIZE + "2";
 116     public static final String VECTOR_SIZE_4   = VECTOR_SIZE + "4";
 117     public static final String VECTOR_SIZE_8   = VECTOR_SIZE + "8";
 118     public static final String VECTOR_SIZE_16  = VECTOR_SIZE + "16";
 119     public static final String VECTOR_SIZE_32  = VECTOR_SIZE + "32";
 120     public static final String VECTOR_SIZE_64  = VECTOR_SIZE + "64";
 121 
 122     private static final String TYPE_BYTE   = "byte";
 123     private static final String TYPE_CHAR   = "char";
 124     private static final String TYPE_SHORT  = "short";
 125     private static final String TYPE_INT    = "int";
 126     private static final String TYPE_LONG   = "long";
 127     private static final String TYPE_FLOAT  = "float";
 128     private static final String TYPE_DOUBLE = "double";
 129 
 130     /**
 131      * IR placeholder string to regex-for-compile-phase map.
 132      */
 133     private static final Map<String, IRNodeMapEntry> IR_NODE_MAPPINGS = new HashMap<>();
 134 
 135     /**
 136      * Map every vectorNode to a type string.
 137      */
 138     private static final Map<String, String> VECTOR_NODE_TYPE = new HashMap<>();
 139 
 140     /*
 141      * Start of IR placeholder string definitions followed by a static block defining the regex-for-compile-phase mapping.
 142      * An IR node placeholder string must start with PREFIX for normal IR nodes or COMPOSITE_PREFIX for composite IR
 143      * nodes, or VECTOR_PREFIX for vector nodes (see class description above).
 144      *
 145      * An IR node definition looks like this:
 146      *
 147      * public static final String IR_NODE = [PREFIX|COMPOSITE_PREFIX|VECTOR_PREFIX] + "IR_NODE" + POSTFIX;
 148      * static {
 149      *    // Define IR_NODE to regex-for-compile-phase mapping. Create a new IRNodeMapEntry object and add it to
 150      *    // IR_NODE_MAPPINGS. This can be done by using the helper methods defined after all IR node placeholder string
 151      *    // definitions.
 152      * }
 153      */
 154 
 155     public static final String ABS_D = PREFIX + "ABS_D" + POSTFIX;
 156     static {
 157         beforeMatchingNameRegex(ABS_D, "AbsD");
 158     }
 159 
 160     public static final String ABS_F = PREFIX + "ABS_F" + POSTFIX;
 161     static {
 162         beforeMatchingNameRegex(ABS_F, "AbsF");
 163     }
 164 
 165     public static final String ABS_I = PREFIX + "ABS_I" + POSTFIX;
 166     static {
 167         beforeMatchingNameRegex(ABS_I, "AbsI");
 168     }
 169 
 170     public static final String ABS_L = PREFIX + "ABS_L" + POSTFIX;
 171     static {
 172         beforeMatchingNameRegex(ABS_L, "AbsL");
 173     }
 174 
 175     public static final String ABS_VB = VECTOR_PREFIX + "ABS_VB" + POSTFIX;
 176     static {
 177         vectorNode(ABS_VB, "AbsVB", TYPE_BYTE);
 178     }
 179 
 180     // ABS_VC / AbsVC does not exist (char is 2 byte unsigned)
 181 
 182     public static final String ABS_VS = VECTOR_PREFIX + "ABS_VS" + POSTFIX;
 183     static {
 184         vectorNode(ABS_VS, "AbsVS", TYPE_SHORT);
 185     }
 186 
 187     public static final String ABS_VI = VECTOR_PREFIX + "ABS_VI" + POSTFIX;
 188     static {
 189         vectorNode(ABS_VI, "AbsVI", TYPE_INT);
 190     }
 191 
 192     public static final String ABS_VL = VECTOR_PREFIX + "ABS_VL" + POSTFIX;
 193     static {
 194         vectorNode(ABS_VL, "AbsVL", TYPE_LONG);
 195     }
 196 
 197     public static final String ABS_VF = VECTOR_PREFIX + "ABS_VF" + POSTFIX;
 198     static {
 199         vectorNode(ABS_VF, "AbsVF", TYPE_FLOAT);
 200     }
 201 
 202     public static final String ABS_VD = VECTOR_PREFIX + "ABS_VD" + POSTFIX;
 203     static {
 204         vectorNode(ABS_VD, "AbsVD", TYPE_DOUBLE);
 205     }
 206 
 207     public static final String ADD = PREFIX + "ADD" + POSTFIX;
 208     static {
 209         beforeMatchingNameRegex(ADD, "Add(I|L|F|D|P)");
 210     }
 211 
 212     public static final String ADD_I = PREFIX + "ADD_I" + POSTFIX;
 213     static {
 214         beforeMatchingNameRegex(ADD_I, "AddI");
 215     }
 216 
 217     public static final String ADD_L = PREFIX + "ADD_L" + POSTFIX;
 218     static {
 219         beforeMatchingNameRegex(ADD_L, "AddL");
 220     }
 221 
 222     public static final String ADD_VD = VECTOR_PREFIX + "ADD_VD" + POSTFIX;
 223     static {
 224         vectorNode(ADD_VD, "AddVD", TYPE_DOUBLE);
 225     }
 226 
 227     public static final String ADD_VI = VECTOR_PREFIX + "ADD_VI" + POSTFIX;
 228     static {
 229         vectorNode(ADD_VI, "AddVI", TYPE_INT);
 230     }
 231 
 232     public static final String ADD_VF = VECTOR_PREFIX + "ADD_VF" + POSTFIX;
 233     static {
 234         vectorNode(ADD_VF, "AddVF", TYPE_FLOAT);
 235     }
 236 
 237     public static final String ADD_VB = VECTOR_PREFIX + "ADD_VB" + POSTFIX;
 238     static {
 239         vectorNode(ADD_VB, "AddVB", TYPE_BYTE);
 240     }
 241 
 242     public static final String ADD_VS = VECTOR_PREFIX + "ADD_VS" + POSTFIX;
 243     static {
 244         vectorNode(ADD_VS, "AddVS", TYPE_SHORT);
 245     }
 246 
 247     public static final String ADD_VL = VECTOR_PREFIX + "ADD_VL" + POSTFIX;
 248     static {
 249         vectorNode(ADD_VL, "AddVL", TYPE_LONG);
 250     }
 251 
 252     public static final String ADD_REDUCTION_V = PREFIX + "ADD_REDUCTION_V" + POSTFIX;
 253     static {
 254         beforeMatchingNameRegex(ADD_REDUCTION_V, "AddReductionV(B|S|I|L|F|D)");
 255     }
 256 
 257     public static final String ADD_REDUCTION_VD = PREFIX + "ADD_REDUCTION_VD" + POSTFIX;
 258     static {
 259         superWordNodes(ADD_REDUCTION_VD, "AddReductionVD");
 260     }
 261 
 262     public static final String ADD_REDUCTION_VF = PREFIX + "ADD_REDUCTION_VF" + POSTFIX;
 263     static {
 264         superWordNodes(ADD_REDUCTION_VF, "AddReductionVF");
 265     }
 266 
 267     public static final String ADD_REDUCTION_VI = PREFIX + "ADD_REDUCTION_VI" + POSTFIX;
 268     static {
 269         superWordNodes(ADD_REDUCTION_VI, "AddReductionVI");
 270     }
 271 
 272     public static final String ADD_REDUCTION_VL = PREFIX + "ADD_REDUCTION_VL" + POSTFIX;
 273     static {
 274         superWordNodes(ADD_REDUCTION_VL, "AddReductionVL");
 275     }
 276 
 277     public static final String ALLOC = PREFIX + "ALLOC" + POSTFIX;
 278     static {
 279         String optoRegex = "(.*precise .*\\R((.*(?i:mov|mv|xorl|nop|spill).*|\\s*)\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java" + END;
 280         allocNodes(ALLOC, "Allocate", optoRegex);
 281     }
 282 
 283     public static final String ALLOC_OF = COMPOSITE_PREFIX + "ALLOC_OF" + POSTFIX;
 284     static {
 285         String regex = "(.*precise .*" + IS_REPLACED + ":.*\\R((.*(?i:mov|mv|xorl|nop|spill).*|\\s*)\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java" + END;
 286         optoOnly(ALLOC_OF, regex);
 287     }
 288 
 289     public static final String ALLOC_ARRAY = PREFIX + "ALLOC_ARRAY" + POSTFIX;
 290     static {
 291         String optoRegex = "(.*precise \\[.*\\R((.*(?i:mov|mv|xor|nop|spill).*|\\s*|.*(LGHI|LI).*)\\R)*.*(?i:call,static).*wrapper for: _new_array_Java" + END;
 292         allocNodes(ALLOC_ARRAY, "AllocateArray", optoRegex);
 293     }
 294 
 295     public static final String ALLOC_ARRAY_OF = COMPOSITE_PREFIX + "ALLOC_ARRAY_OF" + POSTFIX;
 296     static {
 297         String regex = "(.*precise \\[.*" + IS_REPLACED + ":.*\\R((.*(?i:mov|mv|xorl|nop|spill).*|\\s*|.*(LGHI|LI).*)\\R)*.*(?i:call,static).*wrapper for: _new_array_Java" + END;
 298         optoOnly(ALLOC_ARRAY_OF, regex);
 299     }
 300 
 301     public static final String AND = PREFIX + "AND" + POSTFIX;
 302     static {
 303         beforeMatchingNameRegex(AND, "And(I|L)");
 304     }
 305 
 306     public static final String AND_I = PREFIX + "AND_I" + POSTFIX;
 307     static {
 308         beforeMatchingNameRegex(AND_I, "AndI");
 309     }
 310 
 311     public static final String AND_L = PREFIX + "AND_L" + POSTFIX;
 312     static {
 313         beforeMatchingNameRegex(AND_L, "AndL");
 314     }
 315 
 316     public static final String AND_VB = VECTOR_PREFIX + "AND_VB" + POSTFIX;
 317     static {
 318         vectorNode(AND_VB, "AndV", TYPE_BYTE);
 319     }
 320 
 321     public static final String AND_VC = VECTOR_PREFIX + "AND_VC" + POSTFIX;
 322     static {
 323         vectorNode(AND_VC, "AndV", TYPE_CHAR);
 324     }
 325 
 326     public static final String AND_VS = VECTOR_PREFIX + "AND_VS" + POSTFIX;
 327     static {
 328         vectorNode(AND_VS, "AndV", TYPE_SHORT);
 329     }
 330 
 331     public static final String AND_VI = VECTOR_PREFIX + "AND_VI" + POSTFIX;
 332     static {
 333         vectorNode(AND_VI, "AndV", TYPE_INT);
 334     }
 335 
 336     public static final String AND_VL = VECTOR_PREFIX + "AND_VL" + POSTFIX;
 337     static {
 338         vectorNode(AND_VL, "AndV", TYPE_LONG);
 339     }
 340 
 341     public static final String AND_V_MASK = PREFIX + "AND_V_MASK" + POSTFIX;
 342     static {
 343         beforeMatchingNameRegex(AND_V_MASK, "AndVMask");
 344     }
 345 
 346     public static final String AND_REDUCTION_V = PREFIX + "AND_REDUCTION_V" + POSTFIX;
 347     static {
 348         superWordNodes(AND_REDUCTION_V, "AndReductionV");
 349     }
 350 
 351     public static final String CALL = PREFIX + "CALL" + POSTFIX;
 352     static {
 353         beforeMatchingNameRegex(CALL, "Call.*Java");
 354     }
 355 
 356     public static final String CALL_OF_METHOD = COMPOSITE_PREFIX + "CALL_OF_METHOD" + POSTFIX;
 357     static {
 358         callOfNodes(CALL_OF_METHOD, "Call.*Java");
 359     }
 360 
 361     public static final String STATIC_CALL_OF_METHOD = COMPOSITE_PREFIX + "STATIC_CALL_OF_METHOD" + POSTFIX;
 362     static {
 363         callOfNodes(STATIC_CALL_OF_METHOD, "CallStaticJava");
 364     }
 365 
 366     public static final String CAST_II = PREFIX + "CAST_II" + POSTFIX;
 367     static {
 368         beforeMatchingNameRegex(CAST_II, "CastII");
 369     }
 370 
 371     public static final String CAST_LL = PREFIX + "CAST_LL" + POSTFIX;
 372     static {
 373         beforeMatchingNameRegex(CAST_LL, "CastLL");
 374     }
 375 
 376     public static final String CHECKCAST_ARRAY = PREFIX + "CHECKCAST_ARRAY" + POSTFIX;
 377     static {
 378         String regex = "(((?i:cmp|CLFI|CLR).*precise \\[.*:|.*(?i:mov|mv|or).*precise \\[.*:.*\\R.*(cmp|CMP|CLR))" + END;
 379         optoOnly(CHECKCAST_ARRAY, regex);
 380     }
 381 
 382     public static final String CHECKCAST_ARRAY_OF = COMPOSITE_PREFIX + "CHECKCAST_ARRAY_OF" + POSTFIX;
 383     static {
 384         String regex = "(((?i:cmp|CLFI|CLR).*precise \\[.*" + IS_REPLACED + ":|.*(?i:mov|mv|or).*precise \\[.*" + IS_REPLACED + ":.*\\R.*(cmp|CMP|CLR))" + END;
 385         optoOnly(CHECKCAST_ARRAY_OF, regex);
 386     }
 387 
 388     // Does not work on s390 (a rule containing this regex will be skipped on s390).
 389     public static final String CHECKCAST_ARRAYCOPY = PREFIX + "CHECKCAST_ARRAYCOPY" + POSTFIX;
 390     static {
 391         String regex = "(.*((?i:call_leaf_nofp,runtime)|CALL,\\s?runtime leaf nofp|BCTRL.*.leaf call).*checkcast_arraycopy.*" + END;
 392         optoOnly(CHECKCAST_ARRAYCOPY, regex);
 393     }
 394 
 395     public static final String CLASS_CHECK_TRAP = PREFIX + "CLASS_CHECK_TRAP" + POSTFIX;
 396     static {
 397         trapNodes(CLASS_CHECK_TRAP, "class_check");
 398     }
 399 
 400     public static final String CMOVE_I = PREFIX + "CMOVE_I" + POSTFIX;
 401     static {
 402         beforeMatchingNameRegex(CMOVE_I, "CMoveI");
 403     }
 404 
 405     public static final String CMP_I = PREFIX + "CMP_I" + POSTFIX;
 406     static {
 407         beforeMatchingNameRegex(CMP_I, "CmpI");
 408     }
 409 
 410     public static final String CMP_L = PREFIX + "CMP_L" + POSTFIX;
 411     static {
 412         beforeMatchingNameRegex(CMP_L, "CmpL");
 413     }
 414 
 415     public static final String CMP_U = PREFIX + "CMP_U" + POSTFIX;
 416     static {
 417         beforeMatchingNameRegex(CMP_U, "CmpU");
 418     }
 419 
 420     public static final String CMP_U3 = PREFIX + "CMP_U3" + POSTFIX;
 421     static {
 422         beforeMatchingNameRegex(CMP_U3, "CmpU3");
 423     }
 424 
 425     public static final String CMP_UL = PREFIX + "CMP_UL" + POSTFIX;
 426     static {
 427         beforeMatchingNameRegex(CMP_UL, "CmpUL");
 428     }
 429 
 430     public static final String CMP_UL3 = PREFIX + "CMP_UL3" + POSTFIX;
 431     static {
 432         beforeMatchingNameRegex(CMP_UL3, "CmpUL3");
 433     }
 434 
 435     public static final String CMP_P = PREFIX + "CMP_P" + POSTFIX;
 436     static {
 437         beforeMatchingNameRegex(CMP_P, "CmpP");
 438     }
 439 
 440     public static final String COMPRESS_BITS = PREFIX + "COMPRESS_BITS" + POSTFIX;
 441     static {
 442         beforeMatchingNameRegex(COMPRESS_BITS, "CompressBits");
 443     }
 444 
 445     public static final String CONV = PREFIX + "CONV" + POSTFIX;
 446     static {
 447         beforeMatchingNameRegex(CONV, "Conv");
 448     }
 449 
 450     public static final String CONV_I2L = PREFIX + "CONV_I2L" + POSTFIX;
 451     static {
 452         beforeMatchingNameRegex(CONV_I2L, "ConvI2L");
 453     }
 454 
 455     public static final String CONV_L2I = PREFIX + "CONV_L2I" + POSTFIX;
 456     static {
 457         beforeMatchingNameRegex(CONV_L2I, "ConvL2I");
 458     }
 459 
 460     public static final String CON_I = PREFIX + "CON_I" + POSTFIX;
 461     static {
 462         beforeMatchingNameRegex(CON_I, "ConI");
 463     }
 464 
 465     public static final String CON_L = PREFIX + "CON_L" + POSTFIX;
 466     static {
 467         beforeMatchingNameRegex(CON_L, "ConL");
 468     }
 469 
 470     public static final String COUNTED_LOOP = PREFIX + "COUNTED_LOOP" + POSTFIX;
 471     static {
 472         String regex = START + "CountedLoop\\b" + MID + END;
 473         fromAfterCountedLoops(COUNTED_LOOP, regex);
 474     }
 475 
 476     public static final String COUNTED_LOOP_MAIN = PREFIX + "COUNTED_LOOP_MAIN" + POSTFIX;
 477     static {
 478         String regex = START + "CountedLoop\\b" + MID + "main" + END;
 479         fromAfterCountedLoops(COUNTED_LOOP_MAIN, regex);
 480     }
 481 
 482     public static final String DIV = PREFIX + "DIV" + POSTFIX;
 483     static {
 484         beforeMatchingNameRegex(DIV, "Div(I|L|F|D)");
 485     }
 486 
 487     public static final String DIV_BY_ZERO_TRAP = PREFIX + "DIV_BY_ZERO_TRAP" + POSTFIX;
 488     static {
 489         trapNodes(DIV_BY_ZERO_TRAP, "div0_check");
 490     }
 491 
 492     public static final String DIV_L = PREFIX + "DIV_L" + POSTFIX;
 493     static {
 494         beforeMatchingNameRegex(DIV_L, "DivL");
 495     }
 496 
 497     public static final String DIV_VF = VECTOR_PREFIX + "DIV_VF" + POSTFIX;
 498     static {
 499         vectorNode(DIV_VF, "DivVF", TYPE_FLOAT);
 500     }
 501 
 502     public static final String DIV_VD = VECTOR_PREFIX + "DIV_VD" + POSTFIX;
 503     static {
 504         vectorNode(DIV_VD, "DivVD", TYPE_DOUBLE);
 505     }
 506 
 507     public static final String DYNAMIC_CALL_OF_METHOD = COMPOSITE_PREFIX + "DYNAMIC_CALL_OF_METHOD" + POSTFIX;
 508     static {
 509         callOfNodes(DYNAMIC_CALL_OF_METHOD, "CallDynamicJava");
 510     }
 511 
 512     public static final String EXPAND_BITS = PREFIX + "EXPAND_BITS" + POSTFIX;
 513     static {
 514         beforeMatchingNameRegex(EXPAND_BITS, "ExpandBits");
 515     }
 516 
 517     public static final String FAST_LOCK = PREFIX + "FAST_LOCK" + POSTFIX;
 518     static {
 519         beforeMatchingNameRegex(FAST_LOCK, "FastLock");
 520     }
 521 
 522     public static final String FAST_UNLOCK = PREFIX + "FAST_UNLOCK" + POSTFIX;
 523     static {
 524         String regex = START + "FastUnlock" + MID + END;
 525         fromMacroToBeforeMatching(FAST_UNLOCK, regex);
 526     }
 527 
 528     public static final String FIELD_ACCESS = PREFIX + "FIELD_ACCESS" + POSTFIX;
 529     static {
 530         String regex = "(.*Field: *" + END;
 531         optoOnly(FIELD_ACCESS, regex);
 532     }
 533 
 534     public static final String FMA_VF = VECTOR_PREFIX + "FMA_VF" + POSTFIX;
 535     static {
 536         vectorNode(FMA_VF, "FmaVF", TYPE_FLOAT);
 537     }
 538 
 539     public static final String FMA_VD = VECTOR_PREFIX + "FMA_VD" + POSTFIX;
 540     static {
 541         vectorNode(FMA_VD, "FmaVD", TYPE_DOUBLE);
 542     }
 543 
 544     public static final String IF = PREFIX + "IF" + POSTFIX;
 545     static {
 546         beforeMatchingNameRegex(IF, "If\\b");
 547     }
 548 
 549     // Does not work for VM builds without JVMCI like x86_32 (a rule containing this regex will be skipped without having JVMCI built).
 550     public static final String INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP = PREFIX + "INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP" + POSTFIX;
 551     static {
 552         trapNodes(INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP,"intrinsic_or_type_checked_inlining");
 553     }
 554 
 555     public static final String INTRINSIC_TRAP = PREFIX + "INTRINSIC_TRAP" + POSTFIX;
 556     static {
 557         trapNodes(INTRINSIC_TRAP,"intrinsic");
 558     }
 559 
 560     // Is only supported on riscv64.
 561     public static final String IS_FINITE_D = PREFIX + "IS_FINITE_D" + POSTFIX;
 562     static {
 563         beforeMatchingNameRegex(IS_FINITE_D, "IsFiniteD");
 564     }
 565 
 566     // Is only supported on riscv64.
 567     public static final String IS_FINITE_F = PREFIX + "IS_FINITE_F" + POSTFIX;
 568     static {
 569         beforeMatchingNameRegex(IS_FINITE_F, "IsFiniteF");
 570     }
 571 
 572     public static final String IS_INFINITE_D = PREFIX + "IS_INFINITE_D" + POSTFIX;
 573     static {
 574         beforeMatchingNameRegex(IS_INFINITE_D, "IsInfiniteD");
 575     }
 576 
 577     public static final String IS_INFINITE_F = PREFIX + "IS_INFINITE_F" + POSTFIX;
 578     static {
 579         beforeMatchingNameRegex(IS_INFINITE_F, "IsInfiniteF");
 580     }
 581 
 582     public static final String LOAD = PREFIX + "LOAD" + POSTFIX;
 583     static {
 584         beforeMatchingNameRegex(LOAD, "Load(B|UB|S|US|I|L|F|D|P|N)");
 585     }
 586 
 587     public static final String LOAD_OF_CLASS = COMPOSITE_PREFIX + "LOAD_OF_CLASS" + POSTFIX;
 588     static {
 589         loadOfNodes(LOAD_OF_CLASS, "Load(B|UB|S|US|I|L|F|D|P|N)");
 590     }
 591 
 592     public static final String LOAD_B = PREFIX + "LOAD_B" + POSTFIX;
 593     static {
 594         beforeMatchingNameRegex(LOAD_B, "LoadB");
 595     }
 596 
 597     public static final String LOAD_B_OF_CLASS = COMPOSITE_PREFIX + "LOAD_B_OF_CLASS" + POSTFIX;
 598     static {
 599         loadOfNodes(LOAD_B_OF_CLASS, "LoadB");
 600     }
 601 
 602     public static final String LOAD_D = PREFIX + "LOAD_D" + POSTFIX;
 603     static {
 604         beforeMatchingNameRegex(LOAD_D, "LoadD");
 605     }
 606 
 607     public static final String LOAD_D_OF_CLASS = COMPOSITE_PREFIX + "LOAD_D_OF_CLASS" + POSTFIX;
 608     static {
 609         loadOfNodes(LOAD_D_OF_CLASS, "LoadD");
 610     }
 611 
 612     public static final String LOAD_F = PREFIX + "LOAD_F" + POSTFIX;
 613     static {
 614         beforeMatchingNameRegex(LOAD_F, "LoadF");
 615     }
 616 
 617     public static final String LOAD_F_OF_CLASS = COMPOSITE_PREFIX + "LOAD_F_OF_CLASS" + POSTFIX;
 618     static {
 619         loadOfNodes(LOAD_F_OF_CLASS, "LoadF");
 620     }
 621 
 622     public static final String LOAD_I = PREFIX + "LOAD_I" + POSTFIX;
 623     static {
 624         beforeMatchingNameRegex(LOAD_I, "LoadI");
 625     }
 626 
 627     public static final String LOAD_I_OF_CLASS = COMPOSITE_PREFIX + "LOAD_I_OF_CLASS" + POSTFIX;
 628     static {
 629         loadOfNodes(LOAD_I_OF_CLASS, "LoadI");
 630     }
 631 
 632     public static final String LOAD_KLASS = PREFIX + "LOAD_KLASS" + POSTFIX;
 633     static {
 634         beforeMatchingNameRegex(LOAD_KLASS, "LoadKlass");
 635     }
 636 
 637     public static final String LOAD_NKLASS = PREFIX + "LOAD_NKLASS" + POSTFIX;
 638     static {
 639         beforeMatchingNameRegex(LOAD_NKLASS, "LoadNKlass");
 640     }
 641 
 642     public static final String LOAD_KLASS_OR_NKLASS = PREFIX + "LOAD_KLASS_OR_NKLASS" + POSTFIX;
 643     static {
 644         beforeMatchingNameRegex(LOAD_KLASS_OR_NKLASS, "LoadN?Klass");
 645     }
 646 
 647     public static final String LOAD_L = PREFIX + "LOAD_L" + POSTFIX;
 648     static {
 649         beforeMatchingNameRegex(LOAD_L, "LoadL");
 650     }
 651 
 652     public static final String LOAD_L_OF_CLASS = COMPOSITE_PREFIX + "LOAD_L_OF_CLASS" + POSTFIX;
 653     static {
 654         loadOfNodes(LOAD_L_OF_CLASS, "LoadL");
 655     }
 656 
 657     public static final String LOAD_N = PREFIX + "LOAD_N" + POSTFIX;
 658     static {
 659         beforeMatchingNameRegex(LOAD_N, "LoadN");
 660     }
 661 
 662     public static final String LOAD_N_OF_CLASS = COMPOSITE_PREFIX + "LOAD_N_OF_CLASS" + POSTFIX;
 663     static {
 664         loadOfNodes(LOAD_N_OF_CLASS, "LoadN");
 665     }
 666 
 667     public static final String LOAD_OF_FIELD = COMPOSITE_PREFIX + "LOAD_OF_FIELD" + POSTFIX;
 668     static {
 669         String regex = START + "Load(B|C|S|I|L|F|D|P|N)" + MID + "@.*name=" + IS_REPLACED + ",.*" + END;
 670         beforeMatching(LOAD_OF_FIELD, regex);
 671     }
 672 
 673     public static final String LOAD_P = PREFIX + "LOAD_P" + POSTFIX;
 674     static {
 675         beforeMatchingNameRegex(LOAD_P, "LoadP");
 676     }
 677 
 678     public static final String LOAD_P_OF_CLASS = COMPOSITE_PREFIX + "LOAD_P_OF_CLASS" + POSTFIX;
 679     static {
 680         loadOfNodes(LOAD_P_OF_CLASS, "LoadP");
 681     }
 682 
 683     public static final String LOAD_S = PREFIX + "LOAD_S" + POSTFIX;
 684     static {
 685         beforeMatchingNameRegex(LOAD_S, "LoadS");
 686     }
 687 
 688     public static final String LOAD_S_OF_CLASS = COMPOSITE_PREFIX + "LOAD_S_OF_CLASS" + POSTFIX;
 689     static {
 690         loadOfNodes(LOAD_S_OF_CLASS, "LoadS");
 691     }
 692 
 693     public static final String LOAD_UB = PREFIX + "LOAD_UB" + POSTFIX;
 694     static {
 695         beforeMatchingNameRegex(LOAD_UB, "LoadUB");
 696     }
 697 
 698     public static final String LOAD_UB_OF_CLASS = COMPOSITE_PREFIX + "LOAD_UB_OF_CLASS" + POSTFIX;
 699     static {
 700         loadOfNodes(LOAD_UB_OF_CLASS, "LoadUB");
 701     }
 702 
 703     public static final String LOAD_US = PREFIX + "LOAD_US" + POSTFIX;
 704     static {
 705         beforeMatchingNameRegex(LOAD_US, "LoadUS");
 706     }
 707 
 708     public static final String LOAD_US_OF_CLASS = COMPOSITE_PREFIX + "LOAD_US_OF_CLASS" + POSTFIX;
 709     static {
 710         loadOfNodes(LOAD_US_OF_CLASS, "LoadUS");
 711     }
 712 
 713     public static final String LOAD_VECTOR_B = VECTOR_PREFIX + "LOAD_VECTOR_B" + POSTFIX;
 714     static {
 715         vectorNode(LOAD_VECTOR_B, "LoadVector", TYPE_BYTE);
 716     }
 717 
 718     public static final String LOAD_VECTOR_C = VECTOR_PREFIX + "LOAD_VECTOR_C" + POSTFIX;
 719     static {
 720         vectorNode(LOAD_VECTOR_C, "LoadVector", TYPE_CHAR);
 721     }
 722 
 723     public static final String LOAD_VECTOR_S = VECTOR_PREFIX + "LOAD_VECTOR_S" + POSTFIX;
 724     static {
 725         vectorNode(LOAD_VECTOR_S, "LoadVector", TYPE_SHORT);
 726     }
 727 
 728     public static final String LOAD_VECTOR_I = VECTOR_PREFIX + "LOAD_VECTOR_I" + POSTFIX;
 729     static {
 730         vectorNode(LOAD_VECTOR_I, "LoadVector", TYPE_INT);
 731     }
 732 
 733     public static final String LOAD_VECTOR_L = VECTOR_PREFIX + "LOAD_VECTOR_L" + POSTFIX;
 734     static {
 735         vectorNode(LOAD_VECTOR_L, "LoadVector", TYPE_LONG);
 736     }
 737 
 738     public static final String LOAD_VECTOR_F = VECTOR_PREFIX + "LOAD_VECTOR_F" + POSTFIX;
 739     static {
 740         vectorNode(LOAD_VECTOR_F, "LoadVector", TYPE_FLOAT);
 741     }
 742 
 743     public static final String LOAD_VECTOR_D = VECTOR_PREFIX + "LOAD_VECTOR_D" + POSTFIX;
 744     static {
 745         vectorNode(LOAD_VECTOR_D, "LoadVector", TYPE_DOUBLE);
 746     }
 747 
 748     public static final String LOAD_VECTOR_GATHER = PREFIX + "LOAD_VECTOR_GATHER" + POSTFIX;
 749     static {
 750         beforeMatchingNameRegex(LOAD_VECTOR_GATHER, "LoadVectorGather");
 751     }
 752 
 753     public static final String LOAD_VECTOR_GATHER_MASKED = PREFIX + "LOAD_VECTOR_GATHER_MASKED" + POSTFIX;
 754     static {
 755         beforeMatchingNameRegex(LOAD_VECTOR_GATHER_MASKED, "LoadVectorGatherMasked");
 756     }
 757 
 758     public static final String LONG_COUNTED_LOOP = PREFIX + "LONG_COUNTED_LOOP" + POSTFIX;
 759     static {
 760         String regex = START + "LongCountedLoop\\b" + MID + END;
 761         fromAfterCountedLoops(LONG_COUNTED_LOOP, regex);
 762     }
 763 
 764     public static final String LOOP = PREFIX + "LOOP" + POSTFIX;
 765     static {
 766         String regex = START + "Loop" + MID + END;
 767         fromBeforeCountedLoops(LOOP, regex);
 768     }
 769 
 770     public static final String LSHIFT = PREFIX + "LSHIFT" + POSTFIX;
 771     static {
 772         beforeMatchingNameRegex(LSHIFT, "LShift(I|L)");
 773     }
 774 
 775     public static final String LSHIFT_I = PREFIX + "LSHIFT_I" + POSTFIX;
 776     static {
 777         beforeMatchingNameRegex(LSHIFT_I, "LShiftI");
 778     }
 779 
 780     public static final String LSHIFT_L = PREFIX + "LSHIFT_L" + POSTFIX;
 781     static {
 782         beforeMatchingNameRegex(LSHIFT_L, "LShiftL");
 783     }
 784 
 785     public static final String LSHIFT_VB = VECTOR_PREFIX + "LSHIFT_VB" + POSTFIX;
 786     static {
 787         vectorNode(LSHIFT_VB, "LShiftVB", TYPE_BYTE);
 788     }
 789 
 790     public static final String LSHIFT_VS = VECTOR_PREFIX + "LSHIFT_VS" + POSTFIX;
 791     static {
 792         vectorNode(LSHIFT_VS, "LShiftVS", TYPE_SHORT);
 793     }
 794 
 795     public static final String LSHIFT_VC = VECTOR_PREFIX + "LSHIFT_VC" + POSTFIX;
 796     static {
 797         vectorNode(LSHIFT_VC, "LShiftVS", TYPE_CHAR); // using short op with char type
 798     }
 799 
 800     public static final String LSHIFT_VI = VECTOR_PREFIX + "LSHIFT_VI" + POSTFIX;
 801     static {
 802         vectorNode(LSHIFT_VI, "LShiftVI", TYPE_INT);
 803     }
 804 
 805     public static final String LSHIFT_VL = VECTOR_PREFIX + "LSHIFT_VL" + POSTFIX;
 806     static {
 807         vectorNode(LSHIFT_VL, "LShiftVL", TYPE_LONG);
 808     }
 809 
 810     public static final String MACRO_LOGIC_V = PREFIX + "MACRO_LOGIC_V" + POSTFIX;
 811     static {
 812         afterBarrierExpansionToBeforeMatching(MACRO_LOGIC_V, "MacroLogicV");
 813     }
 814 
 815     public static final String MAX = PREFIX + "MAX" + POSTFIX;
 816     static {
 817         beforeMatchingNameRegex(MAX, "Max(I|L)");
 818     }
 819 
 820     public static final String MAX_D_REDUCTION_REG = PREFIX + "MAX_D_REDUCTION_REG" + POSTFIX;
 821     static {
 822         machOnlyNameRegex(MAX_D_REDUCTION_REG, "maxD_reduction_reg");
 823     }
 824 
 825     public static final String MAX_D_REG = PREFIX + "MAX_D_REG" + POSTFIX;
 826     static {
 827         machOnlyNameRegex(MAX_D_REG, "maxD_reg");
 828     }
 829 
 830     public static final String MAX_F_REDUCTION_REG = PREFIX + "MAX_F_REDUCTION_REG" + POSTFIX;
 831     static {
 832         machOnlyNameRegex(MAX_F_REDUCTION_REG, "maxF_reduction_reg");
 833     }
 834 
 835     public static final String MAX_F_REG = PREFIX + "MAX_F_REG" + POSTFIX;
 836     static {
 837         machOnlyNameRegex(MAX_F_REG, "maxF_reg");
 838     }
 839 
 840     public static final String MAX_I = PREFIX + "MAX_I" + POSTFIX;
 841     static {
 842         beforeMatchingNameRegex(MAX_I, "MaxI");
 843     }
 844 
 845     public static final String MAX_L = PREFIX + "MAX_L" + POSTFIX;
 846     static {
 847         beforeMatchingNameRegex(MAX_L, "MaxL");
 848     }
 849 
 850     public static final String MAX_VI = VECTOR_PREFIX + "MAX_VI" + POSTFIX;
 851     static {
 852         vectorNode(MAX_VI, "MaxV", TYPE_INT);
 853     }
 854 
 855     public static final String MAX_VF = VECTOR_PREFIX + "MAX_VF" + POSTFIX;
 856     static {
 857         vectorNode(MAX_VF, "MaxV", TYPE_FLOAT);
 858     }
 859 
 860     public static final String MAX_VD = VECTOR_PREFIX + "MAX_VD" + POSTFIX;
 861     static {
 862         vectorNode(MAX_VD, "MaxV", TYPE_DOUBLE);
 863     }
 864 
 865     public static final String MEMBAR = PREFIX + "MEMBAR" + POSTFIX;
 866     static {
 867         beforeMatchingNameRegex(MEMBAR, "MemBar");
 868     }
 869 
 870     public static final String MEMBAR_STORESTORE = PREFIX + "MEMBAR_STORESTORE" + POSTFIX;
 871     static {
 872         beforeMatchingNameRegex(MEMBAR_STORESTORE, "MemBarStoreStore");
 873     }
 874 
 875     public static final String MIN = PREFIX + "MIN" + POSTFIX;
 876     static {
 877         beforeMatchingNameRegex(MIN, "Min(I|L)");
 878     }
 879 
 880     public static final String MIN_D_REDUCTION_REG = PREFIX + "MIN_D_REDUCTION_REG" + POSTFIX;
 881     static {
 882         machOnlyNameRegex(MIN_D_REDUCTION_REG, "minD_reduction_reg");
 883     }
 884 
 885     public static final String MIN_D_REG = PREFIX + "MIN_D_REG" + POSTFIX;
 886     static {
 887         machOnlyNameRegex(MIN_D_REG, "minD_reg");
 888     }
 889 
 890     public static final String MIN_F_REDUCTION_REG = PREFIX + "MIN_F_REDUCTION_REG" + POSTFIX;
 891     static {
 892         machOnlyNameRegex(MIN_F_REDUCTION_REG, "minF_reduction_reg");
 893     }
 894 
 895     public static final String MIN_F_REG = PREFIX + "MIN_F_REG" + POSTFIX;
 896     static {
 897         machOnlyNameRegex(MIN_F_REG, "minF_reg");
 898     }
 899 
 900     public static final String MIN_I = PREFIX + "MIN_I" + POSTFIX;
 901     static {
 902         beforeMatchingNameRegex(MIN_I, "MinI");
 903     }
 904 
 905     public static final String MIN_L = PREFIX + "MIN_L" + POSTFIX;
 906     static {
 907         beforeMatchingNameRegex(MIN_L, "MinL");
 908     }
 909 
 910     public static final String MIN_VI = VECTOR_PREFIX + "MIN_VI" + POSTFIX;
 911     static {
 912         vectorNode(MIN_VI, "MinV", TYPE_INT);
 913     }
 914 
 915     public static final String MIN_VF = VECTOR_PREFIX + "MIN_VF" + POSTFIX;
 916     static {
 917         vectorNode(MIN_VF, "MinV", TYPE_FLOAT);
 918     }
 919 
 920     public static final String MIN_VD = VECTOR_PREFIX + "MIN_VD" + POSTFIX;
 921     static {
 922         vectorNode(MIN_VD, "MinV", TYPE_DOUBLE);
 923     }
 924 
 925     public static final String MUL = PREFIX + "MUL" + POSTFIX;
 926     static {
 927         beforeMatchingNameRegex(MUL, "Mul(I|L|F|D)");
 928     }
 929 
 930     public static final String MUL_ADD_S2I = PREFIX + "MUL_ADD_S2I" + POSTFIX;
 931     static {
 932         beforeMatchingNameRegex(MUL_ADD_S2I, "MulAddS2I");
 933     }
 934 
 935     public static final String MUL_ADD_VS2VI = VECTOR_PREFIX + "MUL_ADD_VS2VI" + POSTFIX;
 936     static {
 937         vectorNode(MUL_ADD_VS2VI, "MulAddVS2VI", TYPE_INT);
 938     }
 939 
 940     // Can only be used if avx512_vnni is available.
 941     public static final String MUL_ADD_VS2VI_VNNI = PREFIX + "MUL_ADD_VS2VI_VNNI" + POSTFIX;
 942     static {
 943         machOnly(MUL_ADD_VS2VI_VNNI, "vmuladdaddS2I_reg");
 944     }
 945 
 946     public static final String MUL_D = PREFIX + "MUL_D" + POSTFIX;
 947     static {
 948         beforeMatchingNameRegex(MUL_D, "MulD");
 949     }
 950 
 951     public static final String MUL_F = PREFIX + "MUL_F" + POSTFIX;
 952     static {
 953         beforeMatchingNameRegex(MUL_F, "MulF");
 954     }
 955 
 956     public static final String MUL_I = PREFIX + "MUL_I" + POSTFIX;
 957     static {
 958         beforeMatchingNameRegex(MUL_I, "MulI");
 959     }
 960 
 961     public static final String MUL_L = PREFIX + "MUL_L" + POSTFIX;
 962     static {
 963         beforeMatchingNameRegex(MUL_L, "MulL");
 964     }
 965 
 966     public static final String MUL_VL = VECTOR_PREFIX + "MUL_VL" + POSTFIX;
 967     static {
 968         vectorNode(MUL_VL, "MulVL", TYPE_LONG);
 969     }
 970 
 971     public static final String MUL_VI = VECTOR_PREFIX + "MUL_VI" + POSTFIX;
 972     static {
 973         vectorNode(MUL_VI, "MulVI", TYPE_INT);
 974     }
 975 
 976     public static final String MUL_VF = VECTOR_PREFIX + "MUL_VF" + POSTFIX;
 977     static {
 978         vectorNode(MUL_VF, "MulVF", TYPE_FLOAT);
 979     }
 980 
 981     public static final String MUL_VD = VECTOR_PREFIX + "MUL_VD" + POSTFIX;
 982     static {
 983         vectorNode(MUL_VD, "MulVD", TYPE_DOUBLE);
 984     }
 985 
 986     public static final String MUL_VB = VECTOR_PREFIX + "MUL_VB" + POSTFIX;
 987     static {
 988         vectorNode(MUL_VB, "MulVB", TYPE_BYTE);
 989     }
 990 
 991     public static final String MUL_VS = VECTOR_PREFIX + "MUL_VS" + POSTFIX;
 992     static {
 993         vectorNode(MUL_VS, "MulVS", TYPE_SHORT);
 994     }
 995 
 996     public static final String MUL_REDUCTION_VD = PREFIX + "MUL_REDUCTION_VD" + POSTFIX;
 997     static {
 998         superWordNodes(MUL_REDUCTION_VD, "MulReductionVD");
 999     }
1000 
1001     public static final String MUL_REDUCTION_VF = PREFIX + "MUL_REDUCTION_VF" + POSTFIX;
1002     static {
1003         superWordNodes(MUL_REDUCTION_VF, "MulReductionVF");
1004     }
1005 
1006     public static final String MUL_REDUCTION_VI = PREFIX + "MUL_REDUCTION_VI" + POSTFIX;
1007     static {
1008         superWordNodes(MUL_REDUCTION_VI, "MulReductionVI");
1009     }
1010 
1011     public static final String MUL_REDUCTION_VL = PREFIX + "MUL_REDUCTION_VL" + POSTFIX;
1012     static {
1013         superWordNodes(MUL_REDUCTION_VL, "MulReductionVL");
1014     }
1015 
1016     public static final String MIN_REDUCTION_V = PREFIX + "MIN_REDUCTION_V" + POSTFIX;
1017     static {
1018         superWordNodes(MIN_REDUCTION_V, "MinReductionV");
1019     }
1020 
1021     public static final String MAX_REDUCTION_V = PREFIX + "MAX_REDUCTION_V" + POSTFIX;
1022     static {
1023         superWordNodes(MAX_REDUCTION_V, "MaxReductionV");
1024     }
1025 
1026     public static final String NEG_VF = VECTOR_PREFIX + "NEG_VF" + POSTFIX;
1027     static {
1028         vectorNode(NEG_VF, "NegVF", TYPE_FLOAT);
1029     }
1030 
1031     public static final String NEG_VD = VECTOR_PREFIX + "NEG_VD" + POSTFIX;
1032     static {
1033         vectorNode(NEG_VD, "NegVD", TYPE_DOUBLE);
1034     }
1035 
1036     public static final String NOP = PREFIX + "NOP" + POSTFIX;
1037     static {
1038         machOnlyNameRegex(NOP, "Nop");
1039     }
1040 
1041     public static final String NULL_ASSERT_TRAP = PREFIX + "NULL_ASSERT_TRAP" + POSTFIX;
1042     static {
1043         trapNodes(NULL_ASSERT_TRAP,"null_assert");
1044     }
1045 
1046     public static final String NULL_CHECK_TRAP = PREFIX + "NULL_CHECK_TRAP" + POSTFIX;
1047     static {
1048         trapNodes(NULL_CHECK_TRAP,"null_check");
1049     }
1050 
1051     public static final String OR_VB = VECTOR_PREFIX + "OR_VB" + POSTFIX;
1052     static {
1053         vectorNode(OR_VB, "OrV", TYPE_BYTE);
1054     }
1055 
1056     public static final String OR_VS = VECTOR_PREFIX + "OR_VS" + POSTFIX;
1057     static {
1058         vectorNode(OR_VS, "OrV", TYPE_SHORT);
1059     }
1060 
1061     public static final String OR_VI = VECTOR_PREFIX + "OR_VI" + POSTFIX;
1062     static {
1063         vectorNode(OR_VI, "OrV", TYPE_INT);
1064     }
1065 
1066     public static final String OR_VL = VECTOR_PREFIX + "OR_VL" + POSTFIX;
1067     static {
1068         vectorNode(OR_VL, "OrV", TYPE_LONG);
1069     }
1070 
1071     public static final String OR_V_MASK = PREFIX + "OR_V_MASK" + POSTFIX;
1072     static {
1073         beforeMatchingNameRegex(OR_V_MASK, "OrVMask");
1074     }
1075 
1076     public static final String OR_REDUCTION_V = PREFIX + "OR_REDUCTION_V" + POSTFIX;
1077     static {
1078         superWordNodes(OR_REDUCTION_V, "OrReductionV");
1079     }
1080 
1081     public static final String OUTER_STRIP_MINED_LOOP = PREFIX + "OUTER_STRIP_MINED_LOOP" + POSTFIX;
1082     static {
1083         String regex = START + "OuterStripMinedLoop\\b" + MID + END;
1084         fromAfterCountedLoops(OUTER_STRIP_MINED_LOOP, regex);
1085     }
1086 
1087     public static final String PARTIAL_SUBTYPE_CHECK = PREFIX + "PARTIAL_SUBTYPE_CHECK" + POSTFIX;
1088     static {
1089         beforeMatchingNameRegex(PARTIAL_SUBTYPE_CHECK, "PartialSubtypeCheck");
1090     }
1091 
1092     public static final String PHI = PREFIX + "PHI" + POSTFIX;
1093     static {
1094         beforeMatchingNameRegex(PHI, "Phi");
1095     }
1096 
1097     public static final String POPCOUNT_L = PREFIX + "POPCOUNT_L" + POSTFIX;
1098     static {
1099         beforeMatchingNameRegex(POPCOUNT_L, "PopCountL");
1100     }
1101 
1102     public static final String POPCOUNT_VI = VECTOR_PREFIX + "POPCOUNT_VI" + POSTFIX;
1103     static {
1104         vectorNode(POPCOUNT_VI, "PopCountVI", TYPE_INT);
1105     }
1106 
1107     public static final String POPCOUNT_VL = VECTOR_PREFIX + "POPCOUNT_VL" + POSTFIX;
1108     static {
1109         vectorNode(POPCOUNT_VL, "PopCountVL", TYPE_LONG);
1110     }
1111 
1112     public static final String COUNTTRAILINGZEROS_VL = VECTOR_PREFIX + "COUNTTRAILINGZEROS_VL" + POSTFIX;
1113     static {
1114         vectorNode(COUNTTRAILINGZEROS_VL, "CountTrailingZerosV", TYPE_LONG);
1115     }
1116 
1117     public static final String COUNTLEADINGZEROS_VL = VECTOR_PREFIX + "COUNTLEADINGZEROS_VL" + POSTFIX;
1118     static {
1119         vectorNode(COUNTLEADINGZEROS_VL, "CountLeadingZerosV", TYPE_LONG);
1120     }
1121 
1122     public static final String POPULATE_INDEX = PREFIX + "POPULATE_INDEX" + POSTFIX;
1123     static {
1124         String regex = START + "PopulateIndex" + MID + END;
1125         IR_NODE_MAPPINGS.put(POPULATE_INDEX, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
1126                                                                        CompilePhase.AFTER_CLOOPS,
1127                                                                        CompilePhase.BEFORE_MATCHING));
1128     }
1129 
1130     public static final String PREDICATE_TRAP = PREFIX + "PREDICATE_TRAP" + POSTFIX;
1131     static {
1132         trapNodes(PREDICATE_TRAP,"predicate");
1133     }
1134 
1135     public static final String RANGE_CHECK_TRAP = PREFIX + "RANGE_CHECK_TRAP" + POSTFIX;
1136     static {
1137         trapNodes(RANGE_CHECK_TRAP,"range_check");
1138     }
1139 
1140     public static final String REPLICATE_B = VECTOR_PREFIX + "REPLICATE_B" + POSTFIX;
1141     static {
1142         vectorNode(REPLICATE_B, "Replicate", TYPE_BYTE);
1143     }
1144 
1145     public static final String REPLICATE_S = VECTOR_PREFIX + "REPLICATE_S" + POSTFIX;
1146     static {
1147         vectorNode(REPLICATE_S, "Replicate", TYPE_SHORT);
1148     }
1149 
1150     public static final String REPLICATE_I = VECTOR_PREFIX + "REPLICATE_I" + POSTFIX;
1151     static {
1152         vectorNode(REPLICATE_I, "Replicate", TYPE_INT);
1153     }
1154 
1155     public static final String REPLICATE_L = VECTOR_PREFIX + "REPLICATE_L" + POSTFIX;
1156     static {
1157         vectorNode(REPLICATE_L, "Replicate", TYPE_LONG);
1158     }
1159 
1160     public static final String REPLICATE_F = VECTOR_PREFIX + "REPLICATE_F" + POSTFIX;
1161     static {
1162         vectorNode(REPLICATE_F, "Replicate", TYPE_FLOAT);
1163     }
1164 
1165     public static final String REPLICATE_D = VECTOR_PREFIX + "REPLICATE_D" + POSTFIX;
1166     static {
1167         vectorNode(REPLICATE_D, "Replicate", TYPE_DOUBLE);
1168     }
1169 
1170     public static final String REVERSE_BYTES_VB = VECTOR_PREFIX + "REVERSE_BYTES_VB" + POSTFIX;
1171     static {
1172         vectorNode(REVERSE_BYTES_VB, "ReverseBytesV", TYPE_BYTE);
1173     }
1174 
1175     public static final String REVERSE_BYTES_VS = VECTOR_PREFIX + "REVERSE_BYTES_VS" + POSTFIX;
1176     static {
1177         vectorNode(REVERSE_BYTES_VS, "ReverseBytesV", TYPE_SHORT);
1178     }
1179 
1180     public static final String REVERSE_BYTES_VI = VECTOR_PREFIX + "REVERSE_BYTES_VI" + POSTFIX;
1181     static {
1182         vectorNode(REVERSE_BYTES_VI, "ReverseBytesV", TYPE_INT);
1183     }
1184 
1185     public static final String REVERSE_BYTES_VL = VECTOR_PREFIX + "REVERSE_BYTES_VL" + POSTFIX;
1186     static {
1187         vectorNode(REVERSE_BYTES_VL, "ReverseBytesV", TYPE_LONG);
1188     }
1189 
1190     public static final String REVERSE_I = PREFIX + "REVERSE_I" + POSTFIX;
1191     static {
1192         beforeMatchingNameRegex(REVERSE_I, "ReverseI");
1193     }
1194 
1195     public static final String REVERSE_L = PREFIX + "REVERSE_L" + POSTFIX;
1196     static {
1197         beforeMatchingNameRegex(REVERSE_L, "ReverseL");
1198     }
1199 
1200     public static final String REVERSE_VI = VECTOR_PREFIX + "REVERSE_VI" + POSTFIX;
1201     static {
1202         vectorNode(REVERSE_VI, "ReverseV", TYPE_INT);
1203     }
1204 
1205     public static final String REVERSE_VL = VECTOR_PREFIX + "REVERSE_VL" + POSTFIX;
1206     static {
1207         vectorNode(REVERSE_VL, "ReverseV", TYPE_LONG);
1208     }
1209 
1210     public static final String ROUND_VD = VECTOR_PREFIX + "ROUND_VD" + POSTFIX;
1211     static {
1212         vectorNode(ROUND_VD, "RoundVD", TYPE_LONG);
1213     }
1214 
1215     public static final String ROUND_VF = VECTOR_PREFIX + "ROUND_VF" + POSTFIX;
1216     static {
1217         vectorNode(ROUND_VF, "RoundVF", TYPE_INT);
1218     }
1219 
1220     public static final String ROTATE_LEFT = PREFIX + "ROTATE_LEFT" + POSTFIX;
1221     static {
1222         beforeMatchingNameRegex(ROTATE_LEFT, "RotateLeft");
1223     }
1224 
1225     public static final String ROTATE_RIGHT = PREFIX + "ROTATE_RIGHT" + POSTFIX;
1226     static {
1227         beforeMatchingNameRegex(ROTATE_RIGHT, "RotateRight");
1228     }
1229 
1230     public static final String ROTATE_LEFT_V = PREFIX + "ROTATE_LEFT_V" + POSTFIX;
1231     static {
1232         beforeMatchingNameRegex(ROTATE_LEFT_V, "RotateLeftV");
1233     }
1234 
1235     public static final String ROTATE_RIGHT_V = PREFIX + "ROTATE_RIGHT_V" + POSTFIX;
1236     static {
1237         beforeMatchingNameRegex(ROTATE_RIGHT_V, "RotateRightV");
1238     }
1239 
1240     public static final String ROUND_DOUBLE_MODE_V = VECTOR_PREFIX + "ROUND_DOUBLE_MODE_V" + POSTFIX;
1241     static {
1242         vectorNode(ROUND_DOUBLE_MODE_V, "RoundDoubleModeV", TYPE_DOUBLE);
1243     }
1244 
1245     public static final String RSHIFT = PREFIX + "RSHIFT" + POSTFIX;
1246     static {
1247         beforeMatchingNameRegex(RSHIFT, "RShift(I|L)");
1248     }
1249 
1250     public static final String RSHIFT_I = PREFIX + "RSHIFT_I" + POSTFIX;
1251     static {
1252         beforeMatchingNameRegex(RSHIFT_I, "RShiftI");
1253     }
1254 
1255     public static final String RSHIFT_L = PREFIX + "RSHIFT_L" + POSTFIX;
1256     static {
1257         beforeMatchingNameRegex(RSHIFT_L, "RShiftL");
1258     }
1259 
1260     public static final String RSHIFT_VB = VECTOR_PREFIX + "RSHIFT_VB" + POSTFIX;
1261     static {
1262         vectorNode(RSHIFT_VB, "RShiftVB", TYPE_BYTE);
1263     }
1264 
1265     public static final String RSHIFT_VS = VECTOR_PREFIX + "RSHIFT_VS" + POSTFIX;
1266     static {
1267         vectorNode(RSHIFT_VS, "RShiftVS", TYPE_SHORT);
1268     }
1269 
1270     public static final String RSHIFT_VC = VECTOR_PREFIX + "RSHIFT_VC" + POSTFIX;
1271     static {
1272         vectorNode(RSHIFT_VC, "RShiftVS", TYPE_CHAR); // short computation with char type
1273     }
1274 
1275     public static final String RSHIFT_VI = VECTOR_PREFIX + "RSHIFT_VI" + POSTFIX;
1276     static {
1277         vectorNode(RSHIFT_VI, "RShiftVI", TYPE_INT);
1278     }
1279 
1280     public static final String RSHIFT_VL = VECTOR_PREFIX + "RSHIFT_VL" + POSTFIX;
1281     static {
1282         vectorNode(RSHIFT_VL, "RShiftVL", TYPE_LONG);
1283     }
1284 
1285     public static final String SAFEPOINT = PREFIX + "SAFEPOINT" + POSTFIX;
1286     static {
1287         beforeMatchingNameRegex(SAFEPOINT, "SafePoint");
1288     }
1289 
1290     public static final String SCOPE_OBJECT = PREFIX + "SCOPE_OBJECT" + POSTFIX;
1291     static {
1292         String regex = "(.*# ScObj.*" + END;
1293         optoOnly(SCOPE_OBJECT, regex);
1294     }
1295 
1296     public static final String SIGNUM_VD = VECTOR_PREFIX + "SIGNUM_VD" + POSTFIX;
1297     static {
1298         vectorNode(SIGNUM_VD, "SignumVD", TYPE_DOUBLE);
1299     }
1300 
1301     public static final String SIGNUM_VF = VECTOR_PREFIX + "SIGNUM_VF" + POSTFIX;
1302     static {
1303         vectorNode(SIGNUM_VF, "SignumVF", TYPE_FLOAT);
1304     }
1305 
1306     public static final String SQRT_VF = VECTOR_PREFIX + "SQRT_VF" + POSTFIX;
1307     static {
1308         vectorNode(SQRT_VF, "SqrtVF", TYPE_FLOAT);
1309     }
1310 
1311     public static final String SQRT_VD = VECTOR_PREFIX + "SQRT_VD" + POSTFIX;
1312     static {
1313         vectorNode(SQRT_VD, "SqrtVD", TYPE_DOUBLE);
1314     }
1315 
1316     public static final String STORE = PREFIX + "STORE" + POSTFIX;
1317     static {
1318         beforeMatchingNameRegex(STORE, "Store(B|C|S|I|L|F|D|P|N)");
1319     }
1320 
1321     public static final String STORE_B = PREFIX + "STORE_B" + POSTFIX;
1322     static {
1323         beforeMatchingNameRegex(STORE_B, "StoreB");
1324     }
1325 
1326     public static final String STORE_B_OF_CLASS = COMPOSITE_PREFIX + "STORE_B_OF_CLASS" + POSTFIX;
1327     static {
1328         storeOfNodes(STORE_B_OF_CLASS, "StoreB");
1329     }
1330 
1331     public static final String STORE_C = PREFIX + "STORE_C" + POSTFIX;
1332     static {
1333         beforeMatchingNameRegex(STORE_C, "StoreC");
1334     }
1335 
1336     public static final String STORE_C_OF_CLASS = COMPOSITE_PREFIX + "STORE_C_OF_CLASS" + POSTFIX;
1337     static {
1338         storeOfNodes(STORE_C_OF_CLASS, "StoreC");
1339     }
1340 
1341     public static final String STORE_D = PREFIX + "STORE_D" + POSTFIX;
1342     static {
1343         beforeMatchingNameRegex(STORE_D, "StoreD");
1344     }
1345 
1346     public static final String STORE_D_OF_CLASS = COMPOSITE_PREFIX + "STORE_D_OF_CLASS" + POSTFIX;
1347     static {
1348         storeOfNodes(STORE_D_OF_CLASS, "StoreD");
1349     }
1350 
1351     public static final String STORE_F = PREFIX + "STORE_F" + POSTFIX;
1352     static {
1353         beforeMatchingNameRegex(STORE_F, "StoreF");
1354     }
1355 
1356     public static final String STORE_F_OF_CLASS = COMPOSITE_PREFIX + "STORE_F_OF_CLASS" + POSTFIX;
1357     static {
1358         storeOfNodes(STORE_F_OF_CLASS, "StoreF");
1359     }
1360 
1361     public static final String STORE_I = PREFIX + "STORE_I" + POSTFIX;
1362     static {
1363         beforeMatchingNameRegex(STORE_I, "StoreI");
1364     }
1365 
1366     public static final String STORE_I_OF_CLASS = COMPOSITE_PREFIX + "STORE_I_OF_CLASS" + POSTFIX;
1367     static {
1368         storeOfNodes(STORE_I_OF_CLASS, "StoreI");
1369     }
1370 
1371     public static final String STORE_L = PREFIX + "STORE_L" + POSTFIX;
1372     static {
1373         beforeMatchingNameRegex(STORE_L, "StoreL");
1374     }
1375 
1376     public static final String STORE_L_OF_CLASS = COMPOSITE_PREFIX + "STORE_L_OF_CLASS" + POSTFIX;
1377     static {
1378         storeOfNodes(STORE_L_OF_CLASS, "StoreL");
1379     }
1380 
1381     public static final String STORE_N = PREFIX + "STORE_N" + POSTFIX;
1382     static {
1383         beforeMatchingNameRegex(STORE_N, "StoreN");
1384     }
1385 
1386     public static final String STORE_N_OF_CLASS = COMPOSITE_PREFIX + "STORE_N_OF_CLASS" + POSTFIX;
1387     static {
1388         storeOfNodes(STORE_N_OF_CLASS, "StoreN");
1389     }
1390 
1391     public static final String STORE_OF_CLASS = COMPOSITE_PREFIX + "STORE_OF_CLASS" + POSTFIX;
1392     static {
1393         storeOfNodes(STORE_OF_CLASS, "Store(B|C|S|I|L|F|D|P|N)");
1394     }
1395 
1396     public static final String STORE_OF_FIELD = COMPOSITE_PREFIX + "STORE_OF_FIELD" + POSTFIX;
1397     static {
1398         String regex = START + "Store(B|C|S|I|L|F|D|P|N)" + MID + "@.*name=" + IS_REPLACED + ",.*" + END;
1399         beforeMatching(STORE_OF_FIELD, regex);
1400     }
1401 
1402     public static final String STORE_P = PREFIX + "STORE_P" + POSTFIX;
1403     static {
1404         beforeMatchingNameRegex(STORE_P, "StoreP");
1405     }
1406 
1407     public static final String STORE_P_OF_CLASS = COMPOSITE_PREFIX + "STORE_P_OF_CLASS" + POSTFIX;
1408     static {
1409         storeOfNodes(STORE_P_OF_CLASS, "StoreP");
1410     }
1411 
1412     public static final String STORE_VECTOR = PREFIX + "STORE_VECTOR" + POSTFIX;
1413     static {
1414         beforeMatchingNameRegex(STORE_VECTOR, "StoreVector");
1415     }
1416 
1417     public static final String STORE_VECTOR_SCATTER = PREFIX + "STORE_VECTOR_SCATTER" + POSTFIX;
1418     static {
1419         beforeMatchingNameRegex(STORE_VECTOR_SCATTER, "StoreVectorScatter");
1420     }
1421 
1422     public static final String STORE_VECTOR_SCATTER_MASKED = PREFIX + "STORE_VECTOR_SCATTER_MASKED" + POSTFIX;
1423     static {
1424         beforeMatchingNameRegex(STORE_VECTOR_SCATTER_MASKED, "StoreVectorScatterMasked");
1425     }
1426 
1427     public static final String SUB = PREFIX + "SUB" + POSTFIX;
1428     static {
1429         beforeMatchingNameRegex(SUB, "Sub(I|L|F|D)");
1430     }
1431 
1432     public static final String SUB_D = PREFIX + "SUB_D" + POSTFIX;
1433     static {
1434         beforeMatchingNameRegex(SUB_D, "SubD");
1435     }
1436 
1437     public static final String SUB_F = PREFIX + "SUB_F" + POSTFIX;
1438     static {
1439         beforeMatchingNameRegex(SUB_F, "SubF");
1440     }
1441 
1442     public static final String SUB_I = PREFIX + "SUB_I" + POSTFIX;
1443     static {
1444         beforeMatchingNameRegex(SUB_I, "SubI");
1445     }
1446 
1447     public static final String SUB_L = PREFIX + "SUB_L" + POSTFIX;
1448     static {
1449         beforeMatchingNameRegex(SUB_L, "SubL");
1450     }
1451 
1452     public static final String SUB_VB = VECTOR_PREFIX + "SUB_VB" + POSTFIX;
1453     static {
1454         vectorNode(SUB_VB, "SubVB", TYPE_BYTE);
1455     }
1456 
1457     public static final String SUB_VS = VECTOR_PREFIX + "SUB_VS" + POSTFIX;
1458     static {
1459         vectorNode(SUB_VS, "SubVS", TYPE_SHORT);
1460     }
1461 
1462     public static final String SUB_VI = VECTOR_PREFIX + "SUB_VI" + POSTFIX;
1463     static {
1464         vectorNode(SUB_VI, "SubVI", TYPE_INT);
1465     }
1466 
1467     public static final String SUB_VL = VECTOR_PREFIX + "SUB_VL" + POSTFIX;
1468     static {
1469         vectorNode(SUB_VL, "SubVL", TYPE_LONG);
1470     }
1471 
1472     public static final String SUB_VF = VECTOR_PREFIX + "SUB_VF" + POSTFIX;
1473     static {
1474         vectorNode(SUB_VF, "SubVF", TYPE_FLOAT);
1475     }
1476 
1477     public static final String SUB_VD = VECTOR_PREFIX + "SUB_VD" + POSTFIX;
1478     static {
1479         vectorNode(SUB_VD, "SubVD", TYPE_DOUBLE);
1480     }
1481 
1482     public static final String SUBTYPE_CHECK = PREFIX + "SUBTYPE_CHECK" + POSTFIX;
1483     static {
1484         beforeMatchingNameRegex(SUBTYPE_CHECK, "SubTypeCheck");
1485     }
1486 
1487     public static final String TRAP = PREFIX + "TRAP" + POSTFIX;
1488     static {
1489         trapNodes(TRAP,"reason");
1490     }
1491 
1492     public static final String UDIV_I = PREFIX + "UDIV_I" + POSTFIX;
1493     static {
1494         beforeMatchingNameRegex(UDIV_I, "UDivI");
1495     }
1496 
1497     public static final String UDIV_L = PREFIX + "UDIV_L" + POSTFIX;
1498     static {
1499         beforeMatchingNameRegex(UDIV_L, "UDivL");
1500     }
1501 
1502     public static final String UDIV_MOD_I = PREFIX + "UDIV_MOD_I" + POSTFIX;
1503     static {
1504         beforeMatchingNameRegex(UDIV_MOD_I, "UDivModI");
1505     }
1506 
1507     public static final String UDIV_MOD_L = PREFIX + "UDIV_MOD_L" + POSTFIX;
1508     static {
1509         beforeMatchingNameRegex(UDIV_MOD_L, "UDivModL");
1510     }
1511 
1512     public static final String UMOD_I = PREFIX + "UMOD_I" + POSTFIX;
1513     static {
1514         beforeMatchingNameRegex(UMOD_I, "UModI");
1515     }
1516 
1517     public static final String UMOD_L = PREFIX + "UMOD_L" + POSTFIX;
1518     static {
1519         beforeMatchingNameRegex(UMOD_L, "UModL");
1520     }
1521 
1522     public static final String UNHANDLED_TRAP = PREFIX + "UNHANDLED_TRAP" + POSTFIX;
1523     static {
1524         trapNodes(UNHANDLED_TRAP,"unhandled");
1525     }
1526 
1527     public static final String UNSTABLE_IF_TRAP = PREFIX + "UNSTABLE_IF_TRAP" + POSTFIX;
1528     static {
1529         trapNodes(UNSTABLE_IF_TRAP,"unstable_if");
1530     }
1531 
1532     public static final String URSHIFT = PREFIX + "URSHIFT" + POSTFIX;
1533     static {
1534         beforeMatchingNameRegex(URSHIFT, "URShift(B|S|I|L)");
1535     }
1536 
1537     public static final String URSHIFT_B = PREFIX + "URSHIFT_B" + POSTFIX;
1538     static {
1539         beforeMatchingNameRegex(URSHIFT_B, "URShiftB");
1540     }
1541 
1542     public static final String URSHIFT_I = PREFIX + "URSHIFT_I" + POSTFIX;
1543     static {
1544         beforeMatchingNameRegex(URSHIFT_I, "URShiftI");
1545     }
1546 
1547     public static final String URSHIFT_L = PREFIX + "URSHIFT_L" + POSTFIX;
1548     static {
1549         beforeMatchingNameRegex(URSHIFT_L, "URShiftL");
1550     }
1551 
1552     public static final String URSHIFT_S = PREFIX + "URSHIFT_S" + POSTFIX;
1553     static {
1554         beforeMatchingNameRegex(URSHIFT_S, "URShiftS");
1555     }
1556 
1557     public static final String URSHIFT_VB = VECTOR_PREFIX + "URSHIFT_VB" + POSTFIX;
1558     static {
1559         vectorNode(URSHIFT_VB, "URShiftVB", TYPE_BYTE);
1560     }
1561 
1562     public static final String URSHIFT_VS = VECTOR_PREFIX + "URSHIFT_VS" + POSTFIX;
1563     static {
1564         vectorNode(URSHIFT_VS, "URShiftVS", TYPE_SHORT);
1565     }
1566 
1567     public static final String URSHIFT_VC = VECTOR_PREFIX + "URSHIFT_VC" + POSTFIX;
1568     static {
1569         vectorNode(URSHIFT_VC, "URShiftVS", TYPE_CHAR); // short computation with char type
1570     }
1571 
1572     public static final String URSHIFT_VI = VECTOR_PREFIX + "URSHIFT_VI" + POSTFIX;
1573     static {
1574         vectorNode(URSHIFT_VI, "URShiftVI", TYPE_INT);
1575     }
1576 
1577     public static final String URSHIFT_VL = VECTOR_PREFIX + "URSHIFT_VL" + POSTFIX;
1578     static {
1579         vectorNode(URSHIFT_VL, "URShiftVL", TYPE_LONG);
1580     }
1581 
1582     public static final String VAND_NOT_I = PREFIX + "VAND_NOT_I" + POSTFIX;
1583     static {
1584         machOnlyNameRegex(VAND_NOT_I, "vand_notI");
1585     }
1586 
1587     public static final String VAND_NOT_L = PREFIX + "VAND_NOT_L" + POSTFIX;
1588     static {
1589         machOnlyNameRegex(VAND_NOT_L, "vand_notL");
1590     }
1591 
1592     public static final String VECTOR_BLEND_B = VECTOR_PREFIX + "VECTOR_BLEND_B" + POSTFIX;
1593     static {
1594         vectorNode(VECTOR_BLEND_B, "VectorBlend", TYPE_BYTE);
1595     }
1596 
1597     public static final String VECTOR_BLEND_F = VECTOR_PREFIX + "VECTOR_BLEND_F" + POSTFIX;
1598     static {
1599         vectorNode(VECTOR_BLEND_F, "VectorBlend", TYPE_FLOAT);
1600     }
1601 
1602     public static final String VECTOR_BLEND_D = VECTOR_PREFIX + "VECTOR_BLEND_D" + POSTFIX;
1603     static {
1604         vectorNode(VECTOR_BLEND_D, "VectorBlend", TYPE_DOUBLE);
1605     }
1606 
1607     public static final String VECTOR_MASK_CMP_I = VECTOR_PREFIX + "VECTOR_MASK_CMP_I" + POSTFIX;
1608     static {
1609         vectorNode(VECTOR_MASK_CMP_I, "VectorMaskCmp", TYPE_INT);
1610     }
1611 
1612     public static final String VECTOR_MASK_CMP_L = VECTOR_PREFIX + "VECTOR_MASK_CMP_L" + POSTFIX;
1613     static {
1614         vectorNode(VECTOR_MASK_CMP_L, "VectorMaskCmp", TYPE_LONG);
1615     }
1616 
1617     public static final String VECTOR_MASK_CMP_F = VECTOR_PREFIX + "VECTOR_MASK_CMP_F" + POSTFIX;
1618     static {
1619         vectorNode(VECTOR_MASK_CMP_F, "VectorMaskCmp", TYPE_FLOAT);
1620     }
1621 
1622     public static final String VECTOR_MASK_CMP_D = VECTOR_PREFIX + "VECTOR_MASK_CMP_D" + POSTFIX;
1623     static {
1624         vectorNode(VECTOR_MASK_CMP_D, "VectorMaskCmp", TYPE_DOUBLE);
1625     }
1626 
1627     public static final String VECTOR_CAST_B2S = VECTOR_PREFIX + "VECTOR_CAST_B2S" + POSTFIX;
1628     static {
1629         vectorNode(VECTOR_CAST_B2S, "VectorCastB2X", TYPE_SHORT);
1630     }
1631 
1632     public static final String VECTOR_CAST_B2I = VECTOR_PREFIX + "VECTOR_CAST_B2I" + POSTFIX;
1633     static {
1634         vectorNode(VECTOR_CAST_B2I, "VectorCastB2X", TYPE_INT);
1635     }
1636 
1637     public static final String VECTOR_CAST_B2L = VECTOR_PREFIX + "VECTOR_CAST_B2L" + POSTFIX;
1638     static {
1639         vectorNode(VECTOR_CAST_B2L, "VectorCastB2X", TYPE_LONG);
1640     }
1641 
1642     public static final String VECTOR_CAST_B2F = VECTOR_PREFIX + "VECTOR_CAST_B2F" + POSTFIX;
1643     static {
1644         vectorNode(VECTOR_CAST_B2F, "VectorCastB2X", TYPE_FLOAT);
1645     }
1646 
1647     public static final String VECTOR_CAST_B2D = VECTOR_PREFIX + "VECTOR_CAST_B2D" + POSTFIX;
1648     static {
1649         vectorNode(VECTOR_CAST_B2D, "VectorCastB2X", TYPE_DOUBLE);
1650     }
1651 
1652     public static final String VECTOR_CAST_D2B = VECTOR_PREFIX + "VECTOR_CAST_D2B" + POSTFIX;
1653     static {
1654         vectorNode(VECTOR_CAST_D2B, "VectorCastD2X", TYPE_BYTE);
1655     }
1656 
1657     public static final String VECTOR_CAST_D2S = VECTOR_PREFIX + "VECTOR_CAST_D2S" + POSTFIX;
1658     static {
1659         vectorNode(VECTOR_CAST_D2S, "VectorCastD2X", TYPE_SHORT);
1660     }
1661 
1662     public static final String VECTOR_CAST_D2I = VECTOR_PREFIX + "VECTOR_CAST_D2I" + POSTFIX;
1663     static {
1664         vectorNode(VECTOR_CAST_D2I, "VectorCastD2X", TYPE_INT);
1665     }
1666 
1667     public static final String VECTOR_CAST_D2L = VECTOR_PREFIX + "VECTOR_CAST_D2L" + POSTFIX;
1668     static {
1669         vectorNode(VECTOR_CAST_D2L, "VectorCastD2X", TYPE_LONG);
1670     }
1671 
1672     public static final String VECTOR_CAST_D2F = VECTOR_PREFIX + "VECTOR_CAST_D2F" + POSTFIX;
1673     static {
1674         vectorNode(VECTOR_CAST_D2F, "VectorCastD2X", TYPE_FLOAT);
1675     }
1676 
1677     public static final String VECTOR_CAST_F2B = VECTOR_PREFIX + "VECTOR_CAST_F2B" + POSTFIX;
1678     static {
1679         vectorNode(VECTOR_CAST_F2B, "VectorCastF2X", TYPE_BYTE);
1680     }
1681 
1682     public static final String VECTOR_CAST_F2S = VECTOR_PREFIX + "VECTOR_CAST_F2S" + POSTFIX;
1683     static {
1684         vectorNode(VECTOR_CAST_F2S, "VectorCastF2X", TYPE_SHORT);
1685     }
1686 
1687     public static final String VECTOR_CAST_F2I = VECTOR_PREFIX + "VECTOR_CAST_F2I" + POSTFIX;
1688     static {
1689         vectorNode(VECTOR_CAST_F2I, "VectorCastF2X", TYPE_INT);
1690     }
1691 
1692     public static final String VECTOR_CAST_F2L = VECTOR_PREFIX + "VECTOR_CAST_F2L" + POSTFIX;
1693     static {
1694         vectorNode(VECTOR_CAST_F2L, "VectorCastF2X", TYPE_LONG);
1695     }
1696 
1697     public static final String VECTOR_CAST_F2D = VECTOR_PREFIX + "VECTOR_CAST_F2D" + POSTFIX;
1698     static {
1699         vectorNode(VECTOR_CAST_F2D, "VectorCastF2X", TYPE_DOUBLE);
1700     }
1701 
1702     public static final String VECTOR_CAST_I2B = VECTOR_PREFIX + "VECTOR_CAST_I2B" + POSTFIX;
1703     static {
1704         vectorNode(VECTOR_CAST_I2B, "VectorCastI2X", TYPE_BYTE);
1705     }
1706 
1707     public static final String VECTOR_CAST_I2S = VECTOR_PREFIX + "VECTOR_CAST_I2S" + POSTFIX;
1708     static {
1709         vectorNode(VECTOR_CAST_I2S, "VectorCastI2X", TYPE_SHORT);
1710     }
1711 
1712     public static final String VECTOR_CAST_I2L = VECTOR_PREFIX + "VECTOR_CAST_I2L" + POSTFIX;
1713     static {
1714         vectorNode(VECTOR_CAST_I2L, "VectorCastI2X", TYPE_LONG);
1715     }
1716 
1717     public static final String VECTOR_CAST_I2F = VECTOR_PREFIX + "VECTOR_CAST_I2F" + POSTFIX;
1718     static {
1719         vectorNode(VECTOR_CAST_I2F, "VectorCastI2X", TYPE_FLOAT);
1720     }
1721 
1722     public static final String VECTOR_CAST_I2D = VECTOR_PREFIX + "VECTOR_CAST_I2D" + POSTFIX;
1723     static {
1724         vectorNode(VECTOR_CAST_I2D, "VectorCastI2X", TYPE_DOUBLE);
1725     }
1726 
1727     public static final String VECTOR_CAST_L2B = VECTOR_PREFIX + "VECTOR_CAST_L2B" + POSTFIX;
1728     static {
1729         vectorNode(VECTOR_CAST_L2B, "VectorCastL2X", TYPE_BYTE);
1730     }
1731 
1732     public static final String VECTOR_CAST_L2S = VECTOR_PREFIX + "VECTOR_CAST_L2S" + POSTFIX;
1733     static {
1734         vectorNode(VECTOR_CAST_L2S, "VectorCastL2X", TYPE_SHORT);
1735     }
1736 
1737     public static final String VECTOR_CAST_L2I = VECTOR_PREFIX + "VECTOR_CAST_L2I" + POSTFIX;
1738     static {
1739         vectorNode(VECTOR_CAST_L2I, "VectorCastL2X", TYPE_INT);
1740     }
1741 
1742     public static final String VECTOR_CAST_L2F = VECTOR_PREFIX + "VECTOR_CAST_L2F" + POSTFIX;
1743     static {
1744         vectorNode(VECTOR_CAST_L2F, "VectorCastL2X", TYPE_FLOAT);
1745     }
1746 
1747     public static final String VECTOR_CAST_L2D = VECTOR_PREFIX + "VECTOR_CAST_L2D" + POSTFIX;
1748     static {
1749         vectorNode(VECTOR_CAST_L2D, "VectorCastL2X", TYPE_DOUBLE);
1750     }
1751 
1752     public static final String VECTOR_CAST_S2B = VECTOR_PREFIX + "VECTOR_CAST_S2B" + POSTFIX;
1753     static {
1754         vectorNode(VECTOR_CAST_S2B, "VectorCastS2X", TYPE_BYTE);
1755     }
1756 
1757     public static final String VECTOR_CAST_S2I = VECTOR_PREFIX + "VECTOR_CAST_S2I" + POSTFIX;
1758     static {
1759         vectorNode(VECTOR_CAST_S2I, "VectorCastS2X", TYPE_INT);
1760     }
1761 
1762     public static final String VECTOR_CAST_S2L = VECTOR_PREFIX + "VECTOR_CAST_S2L" + POSTFIX;
1763     static {
1764         vectorNode(VECTOR_CAST_S2L, "VectorCastS2X", TYPE_LONG);
1765     }
1766 
1767     public static final String VECTOR_CAST_S2F = VECTOR_PREFIX + "VECTOR_CAST_S2F" + POSTFIX;
1768     static {
1769         vectorNode(VECTOR_CAST_S2F, "VectorCastS2X", TYPE_FLOAT);
1770     }
1771 
1772     public static final String VECTOR_CAST_S2D = VECTOR_PREFIX + "VECTOR_CAST_S2D" + POSTFIX;
1773     static {
1774         vectorNode(VECTOR_CAST_S2D, "VectorCastS2X", TYPE_DOUBLE);
1775     }
1776 
1777     public static final String VECTOR_CAST_F2HF = VECTOR_PREFIX + "VECTOR_CAST_F2HF" + POSTFIX;
1778     static {
1779         vectorNode(VECTOR_CAST_F2HF, "VectorCastF2HF", TYPE_SHORT);
1780     }
1781 
1782     public static final String VECTOR_CAST_HF2F = VECTOR_PREFIX + "VECTOR_CAST_HF2F" + POSTFIX;
1783     static {
1784         vectorNode(VECTOR_CAST_HF2F, "VectorCastHF2F", TYPE_FLOAT);
1785     }
1786 
1787     public static final String VECTOR_MASK_CAST = PREFIX + "VECTOR_MASK_CAST" + POSTFIX;
1788     static {
1789         beforeMatchingNameRegex(VECTOR_MASK_CAST, "VectorMaskCast");
1790     }
1791 
1792     public static final String VECTOR_REINTERPRET = PREFIX + "VECTOR_REINTERPRET" + POSTFIX;
1793     static {
1794         beforeMatchingNameRegex(VECTOR_REINTERPRET, "VectorReinterpret");
1795     }
1796 
1797     public static final String VECTOR_UCAST_B2S = VECTOR_PREFIX + "VECTOR_UCAST_B2S" + POSTFIX;
1798     static {
1799         vectorNode(VECTOR_UCAST_B2S, "VectorUCastB2X", TYPE_SHORT);
1800     }
1801 
1802     public static final String VECTOR_UCAST_B2I = VECTOR_PREFIX + "VECTOR_UCAST_B2I" + POSTFIX;
1803     static {
1804         vectorNode(VECTOR_UCAST_B2I, "VectorUCastB2X", TYPE_INT);
1805     }
1806 
1807     public static final String VECTOR_UCAST_B2L = VECTOR_PREFIX + "VECTOR_UCAST_B2L" + POSTFIX;
1808     static {
1809         vectorNode(VECTOR_UCAST_B2L, "VectorUCastB2X", TYPE_LONG);
1810     }
1811 
1812     public static final String VECTOR_UCAST_I2L = VECTOR_PREFIX + "VECTOR_UCAST_I2L" + POSTFIX;
1813     static {
1814         vectorNode(VECTOR_UCAST_I2L, "VectorUCastI2X", TYPE_LONG);
1815     }
1816 
1817     public static final String VECTOR_UCAST_S2I = VECTOR_PREFIX + "VECTOR_UCAST_S2I" + POSTFIX;
1818     static {
1819         vectorNode(VECTOR_UCAST_S2I, "VectorUCastS2X", TYPE_INT);
1820     }
1821 
1822     public static final String VECTOR_UCAST_S2L = VECTOR_PREFIX + "VECTOR_UCAST_S2L" + POSTFIX;
1823     static {
1824         vectorNode(VECTOR_UCAST_S2L, "VectorUCastS2X", TYPE_LONG);
1825     }
1826 
1827     public static final String VECTOR_TEST = PREFIX + "VECTOR_TEST" + POSTFIX;
1828     static {
1829         beforeMatchingNameRegex(VECTOR_TEST, "VectorTest");
1830     }
1831 
1832     public static final String VFABD = PREFIX + "VFABD" + POSTFIX;
1833     static {
1834         machOnlyNameRegex(VFABD, "vfabd");
1835     }
1836 
1837     public static final String VFABD_MASKED = PREFIX + "VFABD_MASKED" + POSTFIX;
1838     static {
1839         machOnlyNameRegex(VFABD_MASKED, "vfabd_masked");
1840     }
1841 
1842     public static final String VFMSB_MASKED = PREFIX + "VFMSB_MASKED" + POSTFIX;
1843     static {
1844         machOnlyNameRegex(VFMSB_MASKED, "vfmsb_masked");
1845     }
1846 
1847     public static final String VFNMAD_MASKED = PREFIX + "VFNMAD_MASKED" + POSTFIX;
1848     static {
1849         machOnlyNameRegex(VFNMAD_MASKED, "vfnmad_masked");
1850     }
1851 
1852     public static final String VFNMSB_MASKED = PREFIX + "VFNMSB_MASKED" + POSTFIX;
1853     static {
1854         machOnlyNameRegex(VFNMSB_MASKED, "vfnmsb_masked");
1855     }
1856 
1857     public static final String VFMAD_MASKED = PREFIX + "VFMAD_MASKED" + POSTFIX;
1858     static {
1859         machOnlyNameRegex(VFMAD_MASKED, "vfmad_masked");
1860     }
1861 
1862     public static final String VMASK_AND_NOT_L = PREFIX + "VMASK_AND_NOT_L" + POSTFIX;
1863     static {
1864         machOnlyNameRegex(VMASK_AND_NOT_L, "vmask_and_notL");
1865     }
1866 
1867     public static final String VMLA = PREFIX + "VMLA" + POSTFIX;
1868     static {
1869         machOnlyNameRegex(VMLA, "vmla");
1870     }
1871 
1872     public static final String VMLA_MASKED = PREFIX + "VMLA_MASKED" + POSTFIX;
1873     static {
1874         machOnlyNameRegex(VMLA_MASKED, "vmla_masked");
1875     }
1876 
1877     public static final String FMSUB = PREFIX + "FMSUB" + POSTFIX;
1878     static {
1879         machOnlyNameRegex(FMSUB, "msub(F|D)_reg_reg");
1880     }
1881 
1882     public static final String FNMADD = PREFIX + "FNMADD" + POSTFIX;
1883     static {
1884         machOnlyNameRegex(FNMADD, "mnadd(F|D)_reg_reg");
1885     }
1886 
1887     public static final String FNMSUB = PREFIX + "FNMSUB" + POSTFIX;
1888     static {
1889         machOnlyNameRegex(FNMSUB, "mnsub(F|D)_reg_reg");
1890     }
1891 
1892     public static final String VFMLA = PREFIX + "VFMLA" + POSTFIX;
1893     static {
1894         machOnlyNameRegex(VFMLA, "vfmla");
1895     }
1896 
1897     public static final String VFMLS = PREFIX + "VFMLS" + POSTFIX;
1898     static {
1899         machOnlyNameRegex(VFMLS, "vfmls");
1900     }
1901 
1902     public static final String VFNMLA = PREFIX + "VFNMLA" + POSTFIX;
1903     static {
1904         machOnlyNameRegex(VFNMLA, "vfnmla");
1905     }
1906 
1907     public static final String VMLS = PREFIX + "VMLS" + POSTFIX;
1908     static {
1909         machOnlyNameRegex(VMLS, "vmls");
1910     }
1911 
1912     public static final String VMLS_MASKED = PREFIX + "VMLS_MASKED" + POSTFIX;
1913     static {
1914         machOnlyNameRegex(VMLS_MASKED, "vmls_masked");
1915     }
1916 
1917     public static final String VMASK_CMP_ZERO_I_NEON = PREFIX + "VMASK_CMP_ZERO_I_NEON" + POSTFIX;
1918     static {
1919         machOnlyNameRegex(VMASK_CMP_ZERO_I_NEON, "vmaskcmp_zeroI_neon");
1920     }
1921 
1922     public static final String VMASK_CMP_ZERO_L_NEON = PREFIX + "VMASK_CMP_ZERO_L_NEON" + POSTFIX;
1923     static {
1924         machOnlyNameRegex(VMASK_CMP_ZERO_L_NEON, "vmaskcmp_zeroL_neon");
1925     }
1926 
1927     public static final String VMASK_CMP_ZERO_F_NEON = PREFIX + "VMASK_CMP_ZERO_F_NEON" + POSTFIX;
1928     static {
1929         machOnlyNameRegex(VMASK_CMP_ZERO_F_NEON, "vmaskcmp_zeroF_neon");
1930     }
1931 
1932     public static final String VMASK_CMP_ZERO_D_NEON = PREFIX + "VMASK_CMP_ZERO_D_NEON" + POSTFIX;
1933     static {
1934         machOnlyNameRegex(VMASK_CMP_ZERO_D_NEON, "vmaskcmp_zeroD_neon");
1935     }
1936 
1937     public static final String VMASK_CMP_IMM_I_SVE = PREFIX + "VMASK_CMP_IMM_I_SVE" + POSTFIX;
1938     static {
1939         machOnlyNameRegex(VMASK_CMP_IMM_I_SVE, "vmaskcmp_immI_sve");
1940     }
1941 
1942     public static final String VMASK_CMPU_IMM_I_SVE = PREFIX + "VMASK_CMPU_IMM_I_SVE" + POSTFIX;
1943     static {
1944         machOnlyNameRegex(VMASK_CMPU_IMM_I_SVE, "vmaskcmpU_immI_sve");
1945     }
1946 
1947     public static final String VMASK_CMP_IMM_L_SVE = PREFIX + "VMASK_CMP_IMM_L_SVE" + POSTFIX;
1948     static {
1949         machOnlyNameRegex(VMASK_CMP_IMM_L_SVE, "vmaskcmp_immL_sve");
1950     }
1951 
1952     public static final String VMASK_CMPU_IMM_L_SVE = PREFIX + "VMASK_CMPU_IMM_L_SVE" + POSTFIX;
1953     static {
1954         machOnlyNameRegex(VMASK_CMPU_IMM_L_SVE, "vmaskcmpU_immL_sve");
1955     }
1956 
1957     public static final String VNOT_I_MASKED = PREFIX + "VNOT_I_MASKED" + POSTFIX;
1958     static {
1959         machOnlyNameRegex(VNOT_I_MASKED, "vnotI_masked");
1960     }
1961 
1962     public static final String VNOT_L_MASKED = PREFIX + "VNOT_L_MASKED" + POSTFIX;
1963     static {
1964         machOnlyNameRegex(VNOT_L_MASKED, "vnotL_masked");
1965     }
1966 
1967     public static final String VSTOREMASK_TRUECOUNT = PREFIX + "VSTOREMASK_TRUECOUNT" + POSTFIX;
1968     static {
1969         machOnlyNameRegex(VSTOREMASK_TRUECOUNT, "vstoremask_truecount_neon");
1970     }
1971 
1972     public static final String XOR = PREFIX + "XOR" + POSTFIX;
1973     static {
1974         beforeMatchingNameRegex(XOR, "Xor(I|L)");
1975     }
1976 
1977     public static final String XOR_I = PREFIX + "XOR_I" + POSTFIX;
1978     static {
1979         beforeMatchingNameRegex(XOR_I, "XorI");
1980     }
1981 
1982     public static final String XOR_L = PREFIX + "XOR_L" + POSTFIX;
1983     static {
1984         beforeMatchingNameRegex(XOR_L, "XorL");
1985     }
1986 
1987     public static final String XOR_VB = VECTOR_PREFIX + "XOR_VB" + POSTFIX;
1988     static {
1989         vectorNode(XOR_VB, "XorV", TYPE_BYTE);
1990     }
1991 
1992     public static final String XOR_VS = VECTOR_PREFIX + "XOR_VS" + POSTFIX;
1993     static {
1994         vectorNode(XOR_VS, "XorV", TYPE_SHORT);
1995     }
1996 
1997     public static final String XOR_VI = VECTOR_PREFIX + "XOR_VI" + POSTFIX;
1998     static {
1999         vectorNode(XOR_VI, "XorV", TYPE_INT);
2000     }
2001 
2002     public static final String XOR_VL = VECTOR_PREFIX + "XOR_VL" + POSTFIX;
2003     static {
2004         vectorNode(XOR_VL, "XorV", TYPE_LONG);
2005     }
2006 
2007     public static final String XOR_V_MASK = PREFIX + "XOR_V_MASK" + POSTFIX;
2008     static {
2009         beforeMatchingNameRegex(XOR_V_MASK, "XorVMask");
2010     }
2011 
2012     public static final String XOR_REDUCTION_V = PREFIX + "XOR_REDUCTION_V" + POSTFIX;
2013     static {
2014         superWordNodes(XOR_REDUCTION_V, "XorReductionV");
2015     }
2016 
2017     public static final String XOR3_NEON = PREFIX + "XOR3_NEON" + POSTFIX;
2018     static {
2019         machOnlyNameRegex(XOR3_NEON, "veor3_neon");
2020     }
2021 
2022     public static final String XOR3_SVE = PREFIX + "XOR3_SVE" + POSTFIX;
2023     static {
2024         machOnlyNameRegex(XOR3_SVE, "veor3_sve");
2025     }
2026 
2027     public static final String COMPRESS_BITS_VI = VECTOR_PREFIX + "COMPRESS_BITS_VI" + POSTFIX;
2028     static {
2029         vectorNode(COMPRESS_BITS_VI, "CompressBitsV", TYPE_INT);
2030     }
2031 
2032     public static final String COMPRESS_BITS_VL = VECTOR_PREFIX + "COMPRESS_BITS_VL" + POSTFIX;
2033     static {
2034         vectorNode(COMPRESS_BITS_VL, "CompressBitsV", TYPE_LONG);
2035     }
2036 
2037     public static final String EXPAND_BITS_VI = VECTOR_PREFIX + "EXPAND_BITS_VI" + POSTFIX;
2038     static {
2039         vectorNode(EXPAND_BITS_VI, "ExpandBitsV", TYPE_INT);
2040     }
2041 
2042     public static final String EXPAND_BITS_VL = VECTOR_PREFIX + "EXPAND_BITS_VL" + POSTFIX;
2043     static {
2044         vectorNode(EXPAND_BITS_VL, "ExpandBitsV", TYPE_LONG);
2045     }
2046 
2047     public static final String Z_LOAD_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_LOAD_P_WITH_BARRIER_FLAG" + POSTFIX;
2048     static {
2049         String regex = START + "zLoadP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
2050         machOnly(Z_LOAD_P_WITH_BARRIER_FLAG, regex);
2051     }
2052 
2053     public static final String Z_STORE_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_STORE_P_WITH_BARRIER_FLAG" + POSTFIX;
2054     static {
2055         String regex = START + "zStoreP\\S*" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
2056         machOnly(Z_STORE_P_WITH_BARRIER_FLAG, regex);
2057     }
2058 
2059     public static final String Z_GET_AND_SET_P_WITH_BARRIER_FLAG = COMPOSITE_PREFIX + "Z_GET_AND_SET_P_WITH_BARRIER_FLAG" + POSTFIX;
2060     static {
2061         String regex = START + "(zXChgP)|(zGetAndSetP\\S*)" + MID + "barrier\\(\\s*" + IS_REPLACED + "\\s*\\)" + END;
2062         machOnly(Z_GET_AND_SET_P_WITH_BARRIER_FLAG, regex);
2063     }
2064 
2065     public static final String X86_LOCK_ADDB_REG = PREFIX + "X86_LOCK_ADDB_REG" + POSTFIX;
2066     static {
2067         machOnlyNameRegex(X86_LOCK_ADDB_REG, "xaddB_reg_no_res");
2068     }
2069 
2070     public static final String X86_LOCK_ADDB_IMM = PREFIX + "X86_LOCK_ADDB_IMM" + POSTFIX;
2071     static {
2072         machOnlyNameRegex(X86_LOCK_ADDB_IMM, "xaddB_imm_no_res");
2073     }
2074 
2075     public static final String X86_LOCK_XADDB = PREFIX + "X86_LOCK_XADDB" + POSTFIX;
2076     static {
2077         machOnlyNameRegex(X86_LOCK_XADDB, "xaddB");
2078     }
2079 
2080     public static final String X86_LOCK_ADDS_REG = PREFIX + "X86_LOCK_ADDS_REG" + POSTFIX;
2081     static {
2082         machOnlyNameRegex(X86_LOCK_ADDS_REG, "xaddS_reg_no_res");
2083     }
2084 
2085     public static final String X86_LOCK_ADDS_IMM = PREFIX + "X86_LOCK_ADDS_IMM" + POSTFIX;
2086     static {
2087         machOnlyNameRegex(X86_LOCK_ADDS_IMM, "xaddS_imm_no_res");
2088     }
2089 
2090     public static final String X86_LOCK_XADDS = PREFIX + "X86_LOCK_XADDS" + POSTFIX;
2091     static {
2092         machOnlyNameRegex(X86_LOCK_XADDS, "xaddS");
2093     }
2094 
2095     public static final String X86_LOCK_ADDI_REG = PREFIX + "X86_LOCK_ADDI_REG" + POSTFIX;
2096     static {
2097         machOnlyNameRegex(X86_LOCK_ADDI_REG, "xaddI_reg_no_res");
2098     }
2099 
2100     public static final String X86_LOCK_ADDI_IMM = PREFIX + "X86_LOCK_ADDI_IMM" + POSTFIX;
2101     static {
2102         machOnlyNameRegex(X86_LOCK_ADDI_IMM, "xaddI_imm_no_res");
2103     }
2104 
2105     public static final String X86_LOCK_XADDI = PREFIX + "X86_LOCK_XADDI" + POSTFIX;
2106     static {
2107         machOnlyNameRegex(X86_LOCK_XADDI, "xaddI");
2108     }
2109 
2110     public static final String X86_LOCK_ADDL_REG = PREFIX + "X86_LOCK_ADDL_REG" + POSTFIX;
2111     static {
2112         machOnlyNameRegex(X86_LOCK_ADDL_REG, "xaddL_reg_no_res");
2113     }
2114 
2115     public static final String X86_LOCK_ADDL_IMM = PREFIX + "X86_LOCK_ADDL_IMM" + POSTFIX;
2116     static {
2117         machOnlyNameRegex(X86_LOCK_ADDL_IMM, "xaddL_imm_no_res");
2118     }
2119 
2120     public static final String X86_LOCK_XADDL = PREFIX + "X86_LOCK_XADDL" + POSTFIX;
2121     static {
2122         machOnlyNameRegex(X86_LOCK_XADDL, "xaddL");
2123     }
2124 
2125     public static final String X86_TESTI_REG = PREFIX + "X86_TESTI_REG" + POSTFIX;
2126     static {
2127         machOnlyNameRegex(X86_TESTI_REG, "testI_reg");
2128     }
2129 
2130     public static final String X86_TESTL_REG = PREFIX + "X86_TESTL_REG" + POSTFIX;
2131     static {
2132         machOnlyNameRegex(X86_TESTL_REG, "testL_reg");
2133     }
2134 
2135     /*
2136      * Utility methods to set up IR_NODE_MAPPINGS.
2137      */
2138 
2139     /**
2140      * Apply {@code regex} on all machine independent ideal graph phases up to and including
2141      * {@link CompilePhase#BEFORE_MATCHING}.
2142      */
2143     private static void beforeMatching(String irNodePlaceholder, String regex) {
2144         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2145     }
2146 
2147     /**
2148      * Apply {@code irNodeRegex} as regex for the IR node name on all machine independent ideal graph phases up to and
2149      * including {@link CompilePhase#BEFORE_MATCHING}.
2150      */
2151     private static void beforeMatchingNameRegex(String irNodePlaceholder, String irNodeRegex) {
2152         String regex = START + irNodeRegex + MID + END;
2153         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2154     }
2155 
2156     /**
2157      * Apply {@code irNodeRegex} as regex for the IR vector node name on all machine independent ideal graph phases up to and
2158      * including {@link CompilePhase#BEFORE_MATCHING}. Since this is a vector node, we can also check the vector element
2159      * type {@code typeString} and the vector size (number of elements), {@see VECTOR_SIZE}.
2160      */
2161     private static void vectorNode(String irNodePlaceholder, String irNodeRegex, String typeString) {
2162         TestFramework.check(isVectorIRNode(irNodePlaceholder), "vectorNode: failed prefix check for irNodePlaceholder "
2163                                                                + irNodePlaceholder + " -> did you use VECTOR_PREFIX?");
2164         // IS_REPLACED is later replaced with the specific type and size of the vector.
2165         String regex = START + irNodeRegex + MID  + IS_REPLACED + END;
2166         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2167         VECTOR_NODE_TYPE.put(irNodePlaceholder, typeString);
2168     }
2169 
2170     private static void allocNodes(String irNode, String irNodeName, String optoRegex) {
2171         String idealIndependentRegex = START + irNodeName + "\\b" + MID + END;
2172         Map<PhaseInterval, String> intervalToRegexMap = new HashMap<>();
2173         intervalToRegexMap.put(new PhaseInterval(CompilePhase.BEFORE_REMOVEUSELESS, CompilePhase.PHASEIDEALLOOP_ITERATIONS),
2174                                idealIndependentRegex);
2175         intervalToRegexMap.put(new PhaseInterval(CompilePhase.PRINT_OPTO_ASSEMBLY), optoRegex);
2176         MultiPhaseRangeEntry entry = new MultiPhaseRangeEntry(CompilePhase.PRINT_OPTO_ASSEMBLY, intervalToRegexMap);
2177         IR_NODE_MAPPINGS.put(irNode, entry);
2178     }
2179 
2180     private static void callOfNodes(String irNodePlaceholder, String callRegex) {
2181         String regex = START + callRegex + MID + IS_REPLACED + " " +  END;
2182         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.IDEAL_INDEPENDENT, regex));
2183     }
2184 
2185     /**
2186      * Apply {@code regex} on all machine dependant ideal graph phases (i.e. on the mach graph) starting from
2187      * {@link CompilePhase#MATCHING}.
2188      */
2189     private static void optoOnly(String irNodePlaceholder, String regex) {
2190         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.OPTO_ASSEMBLY, regex));
2191     }
2192 
2193     private static void machOnly(String irNodePlaceholder, String regex) {
2194         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex));
2195     }
2196 
2197     private static void machOnlyNameRegex(String irNodePlaceholder, String irNodeRegex) {
2198         String regex = START + irNodeRegex + MID + END;
2199         IR_NODE_MAPPINGS.put(irNodePlaceholder, new RegexTypeEntry(RegexType.MACH, regex));
2200     }
2201 
2202     /**
2203      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#AFTER_CLOOPS}.
2204      */
2205     private static void fromAfterCountedLoops(String irNodePlaceholder, String regex) {
2206         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
2207                                                                           CompilePhase.AFTER_CLOOPS,
2208                                                                           CompilePhase.FINAL_CODE));
2209     }
2210 
2211     /**
2212      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS}.
2213      */
2214     private static void fromBeforeCountedLoops(String irNodePlaceholder, String regex) {
2215         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
2216                                                                           CompilePhase.BEFORE_CLOOPS,
2217                                                                           CompilePhase.FINAL_CODE));
2218     }
2219 
2220     /**
2221      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS} up to and
2222      * including {@link CompilePhase#BEFORE_MATCHING}
2223      */
2224     private static void fromMacroToBeforeMatching(String irNodePlaceholder, String regex) {
2225         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
2226                                                                           CompilePhase.MACRO_EXPANSION,
2227                                                                           CompilePhase.BEFORE_MATCHING));
2228     }
2229 
2230     /**
2231      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#BEFORE_CLOOPS} up to and
2232      * including {@link CompilePhase#BEFORE_MATCHING}
2233      */
2234     private static void afterBarrierExpansionToBeforeMatching(String irNodePlaceholder, String regex) {
2235         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
2236                                                                           CompilePhase.OPTIMIZE_FINISHED,
2237                                                                           CompilePhase.BEFORE_MATCHING));
2238     }
2239 
2240     private static void trapNodes(String irNodePlaceholder, String trapReason) {
2241         String regex = START + "CallStaticJava" + MID + "uncommon_trap.*" + trapReason + END;
2242         beforeMatching(irNodePlaceholder, regex);
2243     }
2244 
2245     private static void loadOfNodes(String irNodePlaceholder, String irNodeRegex) {
2246         String regex = START + irNodeRegex + MID + "@\\S*" + IS_REPLACED + LOAD_OF_CLASS_POSTFIX;
2247         beforeMatching(irNodePlaceholder, regex);
2248     }
2249 
2250     private static void storeOfNodes(String irNodePlaceholder, String irNodeRegex) {
2251         String regex = START + irNodeRegex + MID + "@\\S*" + IS_REPLACED + STORE_OF_CLASS_POSTFIX;
2252         beforeMatching(irNodePlaceholder, regex);
2253     }
2254 
2255     /**
2256      * Apply {@code regex} on all ideal graph phases starting from {@link CompilePhase#PHASEIDEALLOOP1} which is the
2257      * first phase that could contain vector nodes from super word.
2258      */
2259     private static void superWordNodes(String irNodePlaceholder, String irNodeRegex) {
2260         String regex = START + irNodeRegex + MID + END;
2261         IR_NODE_MAPPINGS.put(irNodePlaceholder, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
2262                                                                           CompilePhase.PHASEIDEALLOOP1,
2263                                                                           CompilePhase.BEFORE_MATCHING));
2264     }
2265 
2266 
2267     /*
2268      * Methods used internally by the IR framework.
2269      */
2270 
2271     /**
2272      * Is {@code irNodeString} an IR node placeholder string?
2273      */
2274     public static boolean isIRNode(String irNodeString) {
2275         return irNodeString.startsWith(PREFIX);
2276     }
2277 
2278     /**
2279      * Is {@code irCompositeNodeString} an IR composite node placeholder string?
2280      */
2281     public static boolean isCompositeIRNode(String irCompositeNodeString) {
2282         return irCompositeNodeString.startsWith(COMPOSITE_PREFIX);
2283     }
2284 
2285     /**
2286      * Is {@code irVectorNodeString} an IR vector node placeholder string?
2287      */
2288     public static boolean isVectorIRNode(String irVectorNodeString) {
2289         return irVectorNodeString.startsWith(VECTOR_PREFIX);
2290     }
2291 
2292     /**
2293      * Is {@code irVectorSizeString} a vector size string?
2294      */
2295     public static boolean isVectorSize(String irVectorSizeString) {
2296         return irVectorSizeString.startsWith(VECTOR_SIZE);
2297     }
2298 
2299     /**
2300      * Parse {@code sizeString} and generate a regex pattern to match for the size in the IR dump.
2301      */
2302     public static String parseVectorNodeSize(String sizeString, String typeString, VMInfo vmInfo) {
2303         if (sizeString.equals(VECTOR_SIZE_TAG_ANY)) {
2304             return "\\\\d+"; // match with any number
2305         }
2306         // Try to parse any tags, convert to comma separated list of ints
2307         sizeString = parseVectorNodeSizeTag(sizeString, typeString, vmInfo);
2308         // Parse comma separated list of numbers
2309         String[] sizes = sizeString.split(",");
2310         String regex = "";
2311         for (int i = 0; i < sizes.length; i++) {
2312             int size = 0;
2313             try {
2314                 size = Integer.parseInt(sizes[i]);
2315             } catch (NumberFormatException e) {
2316                 throw new TestFormatException("Vector node has invalid size \"" + sizes[i] + "\", in \"" + sizeString + "\"");
2317             }
2318             TestFormat.checkNoReport(size > 1, "Vector node size must be 2 or larger, but got \"" + sizes[i] + "\", in \"" + sizeString + "\"");
2319             regex += ((i > 0) ? "|" : "") + size;
2320         }
2321         if (sizes.length > 1) {
2322            regex = "(" + regex + ")";
2323         }
2324         return regex;
2325     }
2326 
2327     /**
2328      * If {@code sizeTagString} is a size tag, return the list of accepted sizes, else return sizeTagString.
2329      */
2330     public static String parseVectorNodeSizeTag(String sizeTagString, String typeString, VMInfo vmInfo) {
2331         // Parse out "min(a,b,c,...)"
2332         if (sizeTagString.startsWith("min(") && sizeTagString.endsWith(")")) {
2333             return parseVectorNodeSizeTagMin(sizeTagString, typeString, vmInfo);
2334         }
2335 
2336         // Parse individual tags
2337         return switch (sizeTagString) {
2338             case VECTOR_SIZE_TAG_MAX -> String.valueOf(getMaxElementsForType(typeString, vmInfo));
2339             case "max_byte"          -> String.valueOf(getMaxElementsForType(TYPE_BYTE, vmInfo));
2340             case "max_char"          -> String.valueOf(getMaxElementsForType(TYPE_CHAR, vmInfo));
2341             case "max_short"         -> String.valueOf(getMaxElementsForType(TYPE_SHORT, vmInfo));
2342             case "max_int"           -> String.valueOf(getMaxElementsForType(TYPE_INT, vmInfo));
2343             case "max_long"          -> String.valueOf(getMaxElementsForType(TYPE_LONG, vmInfo));
2344             case "max_float"         -> String.valueOf(getMaxElementsForType(TYPE_FLOAT, vmInfo));
2345             case "max_double"        -> String.valueOf(getMaxElementsForType(TYPE_DOUBLE, vmInfo));
2346             case "LoopMaxUnroll"     -> String.valueOf(vmInfo.getLongValue("LoopMaxUnroll"));
2347             default                  -> sizeTagString;
2348         };
2349     }
2350 
2351     /**
2352      * Parse {@code sizeTagString}, which must be a min-clause.
2353      */
2354     public static String parseVectorNodeSizeTagMin(String sizeTagString, String typeString, VMInfo vmInfo) {
2355         String[] tags = sizeTagString.substring(4, sizeTagString.length() - 1).split(",");
2356         TestFormat.checkNoReport(tags.length > 1, "Vector node size \"min(...)\" must have at least 2 comma separated arguments, got \"" + sizeTagString + "\"");
2357         int minVal = 1024;
2358         for (int i = 0; i < tags.length; i++) {
2359             String tag = parseVectorNodeSizeTag(tags[i].trim(), typeString, vmInfo);
2360             int tag_val = 0;
2361             try {
2362                 tag_val = Integer.parseInt(tag);
2363             } catch (NumberFormatException e) {
2364                 throw new TestFormatException("Vector node has invalid size in \"min(...)\", argument " + i + ", \"" + tag + "\", in \"" + sizeTagString + "\"");
2365             }
2366             minVal = Math.min(minVal, tag_val);
2367         }
2368         return String.valueOf(minVal);
2369     }
2370 
2371     /**
2372      * Return maximal number of elements that can fit in a vector of the specified type.
2373      */
2374     public static long getMaxElementsForType(String typeString, VMInfo vmInfo) {
2375         long maxVectorSize = vmInfo.getLongValue("MaxVectorSize");
2376         TestFormat.checkNoReport(maxVectorSize > 0, "VMInfo: MaxVectorSize is not larger than zero");
2377         long maxBytes = maxVectorSize;
2378 
2379         if (Platform.isX64() || Platform.isX86()) {
2380             maxBytes = Math.min(maxBytes, getMaxElementsForTypeOnX86(typeString, vmInfo));
2381         }
2382 
2383         // compute elements per vector: vector bytes divided by bytes per element
2384         int bytes = getTypeSizeInBytes(typeString);
2385         return maxBytes / bytes;
2386     }
2387 
2388     /**
2389      * Return maximal number of elements that can fit in a vector of the specified type, on x86 / x64.
2390      */
2391     public static long getMaxElementsForTypeOnX86(String typeString, VMInfo vmInfo) {
2392         // restrict maxBytes for specific features, see Matcher::vector_width_in_bytes in x86.ad:
2393         boolean avx1 = vmInfo.hasCPUFeature("avx");
2394         boolean avx2 = vmInfo.hasCPUFeature("avx2");
2395         boolean avx512 = vmInfo.hasCPUFeature("avx512f");
2396         boolean avx512bw = vmInfo.hasCPUFeature("avx512bw");
2397         long maxBytes;
2398         if (avx512) {
2399             maxBytes = 64;
2400         } else if (avx2) {
2401             maxBytes = 32;
2402         } else {
2403             maxBytes = 16;
2404         }
2405         if (avx1 && (typeString.equals(TYPE_FLOAT) || typeString.equals(TYPE_DOUBLE))) {
2406             maxBytes = avx512 ? 64 : 32;
2407         }
2408         if (avx512 && (typeString.equals(TYPE_BYTE) || typeString.equals(TYPE_SHORT) || typeString.equals(TYPE_CHAR))) {
2409             maxBytes = avx512bw ? 64 : 32;
2410         }
2411 
2412         return maxBytes;
2413     }
2414 
2415     /**
2416      * Return size in bytes of type named by {@code typeString}, return 0 if it does not name a type.
2417      */
2418     public static int getTypeSizeInBytes(String typeString) {
2419         return switch (typeString) {
2420             case TYPE_BYTE              -> 1;
2421             case TYPE_CHAR, TYPE_SHORT  -> 2;
2422             case TYPE_INT, TYPE_FLOAT   -> 4;
2423             case TYPE_LONG, TYPE_DOUBLE -> 8;
2424             default                     -> 0;
2425         };
2426     }
2427 
2428     /**
2429      * Returns "IRNode.XYZ", where XYZ is one of the IR node placeholder variable names defined above.
2430      */
2431     public static String getIRNodeAccessString(String irNodeString) {
2432         int prefixLength;
2433         if (isCompositeIRNode(irNodeString)) {
2434             TestFramework.check(irNodeString.length() > COMPOSITE_PREFIX.length() + POSTFIX.length(),
2435                                 "Invalid composite node placeholder: " + irNodeString);
2436             prefixLength = COMPOSITE_PREFIX.length();
2437         } else if (isVectorIRNode(irNodeString)) {
2438             TestFramework.check(irNodeString.length() > VECTOR_PREFIX.length() + POSTFIX.length(),
2439                                 "Invalid vector node placeholder: " + irNodeString);
2440             prefixLength = VECTOR_PREFIX.length();
2441         } else {
2442             prefixLength = PREFIX.length();
2443         }
2444         return "IRNode." + irNodeString.substring(prefixLength, irNodeString.length() - POSTFIX.length());
2445     }
2446 
2447     /**
2448      * Is this IR node supported on current platform, used VM build, etc.?
2449      * Throws a {@link CheckedTestFrameworkException} if the IR node is unsupported.
2450      */
2451     public static void checkIRNodeSupported(String node) throws CheckedTestFrameworkException {
2452         switch (node) {
2453             case INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP -> {
2454                 if (!WhiteBox.getWhiteBox().isJVMCISupportedByGC()) {
2455                     throw new CheckedTestFrameworkException("INTRINSIC_OR_TYPE_CHECKED_INLINING_TRAP is unsupported " +
2456                                                             "in builds without JVMCI.");
2457                 }
2458             }
2459             case CHECKCAST_ARRAYCOPY -> {
2460                 if (Platform.isS390x()) {
2461                     throw new CheckedTestFrameworkException("CHECKCAST_ARRAYCOPY is unsupported on s390.");
2462                 }
2463             }
2464             case IS_FINITE_D, IS_FINITE_F -> {
2465                 if (!Platform.isRISCV64()) {
2466                     throw new CheckedTestFrameworkException("IS_FINITE_* is only supported on riscv64.");
2467                 }
2468             }
2469             // default: do nothing -> IR node is supported and can be used by the user.
2470         }
2471     }
2472 
2473     /**
2474      * Get the regex of an IR node for a specific compile phase. If {@code irNode} is not an IR node placeholder string
2475      * or if there is no regex specified for {@code compilePhase}, a {@link TestFormatException} is reported.
2476      */
2477     public static String getRegexForCompilePhase(String irNode, CompilePhase compilePhase) {
2478         IRNodeMapEntry entry = IR_NODE_MAPPINGS.get(irNode);
2479         String failMsg = "IR Node \"" + irNode + "\" defined in class IRNode has no regex/compiler phase mapping " +
2480                          "(i.e. no static initializer block that adds a mapping entry to IRNode.IR_NODE_MAPPINGS)." +
2481                          System.lineSeparator() +
2482                          "   Have you just created the entry \"" + irNode + "\" in class IRNode and forgot to add a " +
2483                          "mapping?" + System.lineSeparator() +
2484                          "   Violation";
2485         TestFormat.checkNoReport(entry != null, failMsg);
2486         String regex = entry.regexForCompilePhase(compilePhase);
2487         failMsg = "IR Node \"" + irNode + "\" defined in class IRNode has no regex defined for compile phase "
2488                   + compilePhase + "." + System.lineSeparator() +
2489                   "   If you think this compile phase should be supported, update the mapping for \"" + irNode +
2490                   "\" in class IRNode (i.e the static initializer block immediately following the definition of \"" +
2491                   irNode + "\")." + System.lineSeparator() +
2492                   "   Violation";
2493         TestFormat.checkNoReport(regex != null, failMsg);
2494         return regex;
2495     }
2496 
2497     /**
2498      * Get the default phase of an IR node. If {@code irNode} is not an IR node placeholder string, a
2499      * {@link TestFormatException} is reported.
2500      */
2501     public static CompilePhase getDefaultPhase(String irNode) {
2502         IRNodeMapEntry entry = IR_NODE_MAPPINGS.get(irNode);
2503         String failMsg = "\"" + irNode + "\" is not an IR node defined in class IRNode and " +
2504                          "has therefore no default compile phase specified." + System.lineSeparator() +
2505                          "   If your regex represents a C2 IR node, consider adding an entry to class IRNode together " +
2506                          "with a static initializer block that adds a mapping to IRNode.IR_NODE_MAPPINGS." +
2507                          System.lineSeparator() +
2508                          "   Otherwise, set the @IR \"phase\" attribute to a compile phase different from " +
2509                          "CompilePhase.DEFAULT to explicitly tell the IR framework on which compile phase your rule" +
2510                          " should be applied on." + System.lineSeparator() +
2511                          "   Violation";
2512         TestFormat.checkNoReport(entry != null, failMsg);
2513         return entry.defaultCompilePhase();
2514     }
2515 
2516     public static String getVectorNodeType(String irNode) {
2517         String typeString = VECTOR_NODE_TYPE.get(irNode);
2518         String failMsg = "\"" + irNode + "\" is not a Vector IR node defined in class IRNode";
2519         TestFormat.check(typeString != null, failMsg);
2520         return typeString;
2521     }
2522 }