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