<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [AMDGPU][MC] Invalid parsing of "no*" modifiers"
   href="https://bugs.llvm.org/show_bug.cgi?id=41282">41282</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AMDGPU][MC] Invalid parsing of  "no*" modifiers
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: AMDGPU
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dpreobrazhensky@luxoft.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Many modifiers which set one bit of instruction (gds, lds, tfe, r128, etc) may
be specified with "no" prefix (nogds, nolds, etc). In this case the bit is
cleared.

However when parsing modifiers assembler checks only the prefix and the suffix
of the token being parsed. The token may include any sequence of alphanumeric
characters between these. I do not think this was intended.

Also "r128" is not supported for GFX9, but "nor128" is. 
There is a similar issue with "a16".

Examples of code which trigger no errors:

  image_load v5, v[1:2], s[8:15] noXXXunorm
  // should trigger an error for GFX9
  image_load v5, v[1:2], s[8:15] unorm nor128
  // should trigger an error for GFX7/8
  image_load v5, v[1:2], s[8:15] unorm noa16</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>