[llvm-bugs] [Bug 28239] New: [mc] image_atomic -- issues with unorm (and other modifiers) and dmask.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 21 08:16:44 PDT 2016


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

            Bug ID: 28239
           Summary: [mc] image_atomic -- issues with unorm (and other
                    modifiers) and dmask.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AMDGPU
          Assignee: artem.tamazov at amd.com
          Reporter: artem.tamazov at amd.com
                CC: llvm-bugs at lists.llvm.org, nikolay.haustov at amd.com
    Classification: Unclassified

Created attachment 16616
  --> https://llvm.org/bugs/attachment.cgi?id=16616&action=edit
06156.tests_tg_gfx7_asm_lit1_bug.06.08.min.image_atomic_add_etc-modifiers-dmask.zip

It seems that unorm (and other modifiers) cannot be used without dmask:
> image_atomic_add v0, v0, s[0:7] dmask:0xF unorm // ok
> image_atomic_add v0, v0, s[0:7]           unorm // failed
it is even more strange taking into account the fact that dmask may be omitted:
> image_atomic_add v0, v0, s[0:7]                 // ok

Another catch is that assembler produces the *same* encoding for V1 and V4
varieties of instructions, which is definitely wrong. Example:
> image_atomic_umin v0, v0    , s[0:7] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x54,0xf0,0x00,0x00,0x00,0x00]
>image_atomic_umin v0, v[0:3], s[0:7] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x54,0xf0,0x00,0x00,0x00,0x00]

The issue needs to be carefully verified/investigated.

Some GFX7 lit tests attached.
These tests are not guaranteed to be valid, though.
Tested with r273139 (git # 4a94acfea8bfd6eb6b5809dd40f03e1fa42e673a)

-- 
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/20160621/172d4592/attachment.html>


More information about the llvm-bugs mailing list