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

Reinstate testB_mem_imm pattern in x86_64.ad

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b21
    • CPU:
      x86_64
    • OS:
      generic

      Description

      The current fix for JDK-8213473 replaces 'testB_mem_imm' with 'testUB_mem_imm' in 'x86_64.ad' which is fine for unsigned bytes, for example:
        if ((flags & 0x80) != 0) ...

      But per JLS §5.6.2 & §5.1.2, if we have something like:
        if ((flags & (byte)0x80) != 0) ...

      the mask is 32-bit sign-extended and 'LoadB' isn't converted to 'LoadUB' in 'AndINode::Ideal' which is fine.

      Unfortunately 'testUB_mem_imm' won't be matched in this case, so I guess we'd need both 'testB_mem_imm' & 'testUB_mem_imm' patterns.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bsrbnd Bernard Blaser
                Reporter:
                bsrbnd Bernard Blaser
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: