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: unassignedb...@nondot.org
          Reporter: dpreobrazhen...@luxoft.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to