AArch64: generate better code for Vector API allTrue

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: 16
    • Component/s: hotspot
    • None
    • b17
    • aarch64
    • generic

                  "andr $tmp, T8B, $src1, $src2\t# src2 is maskAllTrue\n\t"
                  "notr $tmp, T8B, $tmp\n\t"
                  "addv $tmp, T8B, $tmp\n\t"
                  "umov $dst, $tmp, B, 0\n\t"
                  "cmp $dst, 0\n\t"
                  "cset $dst"

      Could be optimized to:

                  "uminv $tmp, T8B, $src1\n\t"
                  "umov $dst, $tmp, B, 0\n\t"
                  "cmp $dst, 0xff\n\t"
                  "cset $dst"

      jmh:
      https://github.com/openjdk/panama-vector/blob/vectorIntrinsics/test/jdk/jdk/incubator/vector/benchmark/src/main/java/benchmark/bigdata/BooleanArrayCheck.java

            Assignee:
            Ningsheng Jian (Inactive)
            Reporter:
            Ningsheng Jian (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: