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

Imprecise bottom type of ExtractB/UB

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 21
    • 21
    • hotspot
    • b17
    • generic
    • generic

    Description

      static ByteVector vecb = ByteVector.broadcast(ByteVector.SPECIES_512, 1);
      public static long byteLt16() {
       return vecb.lane(1);
      }

       0x0000fffe9cc36880: movi v16.16b, #0x1
       0x0000fffe9cc36884: smov x11, v16.b[1]
       0x0000fffe9cc36888: sxtb w10, w11
       0x0000fffe9cc3688c: sxtw x0, w10

       

      The final code has a redundant sxtb, which generated from (RShiftI (LShiftI src lshift_count) rshift_count). This shift pair seems to act the same role which ConvI2L does.

       

      The wrong initial type of ExtractB causes this issue (https://github.com/openjdk/jdk/blob/dbf0905ff4ad6c831095278fc47c3a6354fe3bc1/src/hotspot/share/opto/vectornode.hpp#L1265 ).

      Attachments

        Issue Links

          Activity

            People

              eliu Eric Liu
              eliu Eric Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: