Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8264409

AArch64: generate better code for Vector API allTrue

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 16
    • 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

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

              Created:
              Updated:
              Resolved: