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