x86: StrIndexOfChar and UseSSE

Andrew Haley aph at redhat.com
Wed May 25 10:12:20 UTC 2016

In x86.ad we have:

  const bool Matcher::match_rule_supported(int opcode) {
    if (!has_match_rule(opcode))
      return false;

    bool ret_value = true;
    switch (opcode) {

      case Op_StrIndexOfChar:
        if (!(UseSSE > 4))
          ret_value = false;


    return ret_value;  // Per default match rules are supported.

So we won't use the StrIndexOfChar intrinsic unless UseSSE > 4.

In vm_version_x86.cpp we have:

  // UseSSE is set to the smaller of what hardware supports and what
  // the command line requires.  I.e., you cannot set UseSSE to 2 on
  // older Pentiums which do not support it.
  if (UseSSE > 4) UseSSE=4;

So, UseSSE can never be > 4.  So we will never use the StrIndexOfChar

What gives?  What is the intrinsic for?


More information about the hotspot-dev mailing list