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

Reinstate testB_mem_imm pattern in x86_64.ad

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 12
    • hotspot
    • b21
    • x86_64
    • generic

      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.

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

              Created:
              Updated:
              Resolved: