[LLVMbugs] [Bug 17317] New: llc crashes with "LLVM ERROR: Invalid instruction" when -march=cpp is set

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Sep 21 12:21:18 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17317

            Bug ID: 17317
           Summary: llc crashes with "LLVM ERROR: Invalid instruction"
                    when -march=cpp is set
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: unassignedbugs at nondot.org
          Reporter: ajost at synopsys.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11258
  --> http://llvm.org/bugs/attachment.cgi?id=11258&action=edit
Source code.

Using LLVM 3.3 built from the release repo.

I have a small toy project (250 LOC) with apparently several instances of this
bug.  I've introduced a macro at the top to highlight the variations.  

If BUGLEVEL is defined as 1, fewer than 50 LOC are active.  Clang can compile
the code to LLVM-IR, but llc fails if I specify -march=cpp.  llc succeeds
without that option (and the generated assembly appears to be correct).  lli
will accept the IR code and run the program correctly.

I found a workaround for the first bug, so at BUGLEVEL 2, some code is disabled
and more is activated.  There is apparently another instance of the same bug
somewhere else.

Finally, BUGLEVEL 3 activates the whole 250 LOC, which I hope would work if
this is fixed.

I compile with this command:

    clang -O1 -emit-llvm -c test.cpp -o test.bc -Wno-c++11-extensions
-std=c++11 -Wall

Playing with the optimization level appears to change things slightly, but I
can never eliminate the problem completely.

-- 
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/20130921/52895292/attachment.html>


More information about the llvm-bugs mailing list