[llvm-bugs] [Bug 43575] New: Disabling code generation optimizations results in wrong inline assembly syntax selection

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 5 13:09:18 PDT 2019


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

            Bug ID: 43575
           Summary: Disabling code generation optimizations  results in
                    wrong inline assembly syntax selection
           Product: libraries
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: moritz.maxeiner at gmail.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

Created attachment 22632
  --> https://bugs.llvm.org/attachment.cgi?id=22632&action=edit
Minimal C example reproducing the error

On x86_64 Linux with LLVM 9 LLVM IR like

test.ll
=======
define void @exit(i32 %status)"
{
    call void asm sideeffect inteldialect "mov rax, 60; syscall", ""()
    ret void
}

$ llc test.ll -o test.o -filetype=obj -O=0

fails with 

<inline asm>:1:2: error: unknown use of instruction mnemonic without a size
suffix
        mov rax, 60; syscall
        ^

, whereas
$ llc test.ll -o test.o -filetype=obj -O=1

works fine. This seems wrong to me, as correct selection of the inline assembly
syntax shouldn't be influenced by the code optimization level. I've also
attached a minimal C example showcasing the error.

-- 
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/20191005/6a4ea172/attachment.html>


More information about the llvm-bugs mailing list