[llvm-bugs] [Bug 31885] New: Integrated assembler complains moveq is deprecated

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 6 13:32:31 PST 2017


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

            Bug ID: 31885
           Summary: Integrated assembler complains moveq is deprecated
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: manojgupta at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

MOV and MVN are in the list of supported IT blocks instructions for ARM
(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802b/Cjabicci.html).
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

-- 
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/20170206/ea993979/attachment.html>


More information about the llvm-bugs mailing list