<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Integrated assembler complains moveq is deprecated"
   href="https://llvm.org/bugs/show_bug.cgi?id=31885">31885</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Integrated assembler complains moveq is deprecated
          </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>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>manojgupta@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>MOV and MVN are in the list of supported IT blocks instructions for ARM
(<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802b/Cjabicci.html">http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802b/Cjabicci.html</a>).
However, integrated assembler complains about it.

Minimal repro case:
"""
void test() {
  int __res;
  __asm__(
      "it    eq\n"
      "moveq %0,%1\n"
      : "=r" (__res)
      : "i"(-22));
}
"""

clang --target=arm-linux-gnueabihf -march=armv8-a -mthumb -c inline_test.c 
inline_test.c:5:8: warning: deprecated instruction in IT block [-Winline-asm]
      "moveq %0,%1\n"
       ^
<inline asm>:2:1: note: instantiated into assembly here
moveq r0,#-22


Interestingly, the actual generated code does not use MOV but rather uses MVN
instead. So it could be the case of MVN instruction incorrectly classified as
unsupported in IT blocks.

- Generated code
        .code   16                      @ @test
        .thumb_func
test:
        .fnstart
@ BB#0:
        .pad    #4
        sub     sp, #4
        @APP
        it      eq
        mvneq   r0, #21</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>