[LLVMbugs] [Bug 17971] New: llc fails with 'Bad machine code: Using an undefined physical register' when targeting thumb

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Nov 17 14:28:10 PST 2013


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

            Bug ID: 17971
           Summary: llc fails with 'Bad machine code: Using an undefined
                    physical register' when targeting thumb
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: vargaz at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11562
  --> http://llvm.org/bugs/attachment.cgi?id=11562&action=edit
testcase

The attached testcase causes llc to fail with:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
*** Bad machine code: Using an undefined physical register ***
- function:    FOO
- basic block: BB#0 BB0 (0x7ff91a0023a0)
- instruction: %R0<def,tied1> = t2MOVCCi %R0<kill,tied0>, 1, pred:0,
pred:%CPSR<kill>
- operand 4:   %CPSR<kill>
LLVM ERROR: Found 1 machine code errors.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

llc command line:
llc -mtriple=thumbv7-ios -o foo.s bug.bc
llvm version: r194943

The problem seem to be that ARMBaseInstrInfo::optimizeCompareInstr () removes
the instruction defining CPSR, and moves the definition to a previous
instruction, but that instruction is also removed later.

-- 
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/20131117/5aa00141/attachment.html>


More information about the llvm-bugs mailing list