[llvm-bugs] [Bug 40806] New: [AMDGPU][MC] Different conversion rules for literals and inlinable constants

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 21 09:01:28 PST 2019


            Bug ID: 40806
           Summary: [AMDGPU][MC] Different conversion rules for literals
                    and inlinable constants
           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

Currently assembler has different conversion rules for integer literals and
integer inlinable constants which may confuse users.

For integer inlinable constants the input number is truncated to the size of
expected operand type without any checks. For example:

    // src0 is encoded as -1
    // high bits "101" are ignored
    v_add_f32 v0, 0x101ffffffff, v0

For integer literals, assembler checks that the truncated bits are either all
zero or all ones. In the latter case the MSB of the result after truncation
must be 1. For example, the following code will trigger an error:

    v_add_f32 v0, 0x101ffffff00, v0

I believe conversion rules for inlinable constants and for literals should be
as close as possible.

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/20190221/5e8e14b1/attachment.html>

More information about the llvm-bugs mailing list