[llvm-bugs] [Bug 49164] New: [AMDGPU][MC][GFX10] Incorrect handling of FLAT instructions with saddr=null

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 12 09:13:07 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49164

            Bug ID: 49164
           Summary: [AMDGPU][MC][GFX10] Incorrect handling of FLAT
                    instructions with saddr=null
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AMDGPU
          Assignee: unassignedbugs at nondot.org
          Reporter: dpreobrazhensky at luxoft.com
                CC: llvm-bugs at lists.llvm.org

FLAT GLOBAL instructions with saddr=null are handled incorrectly. 'null' is an
alias for 'off' but it is handled as a regular register and results in an
invalid vaddr size.

Examples:

    global_atomic_add v1, v2, null

This is not a valid code but it is assembled ok and results in the same
encoding as the following legal instruction:

    global_atomic_add v[1:2], v2, off

There is a similar issue with FLAT SCRATCH instructions. For example, the
following instruction is illegal, but it is accepted by llvm assembler:

    scratch_load_ubyte v1, off, null

The produced code is the same as generated for the following legal instruction:

    scratch_load_ubyte v1, v0, off

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210212/a5b41828/attachment.html>


More information about the llvm-bugs mailing list