[llvm-bugs] [Bug 25275] New: Bad Thumb2 code generated, SUB.W SP,

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 21 11:59:25 PDT 2015


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

            Bug ID: 25275
           Summary: Bad Thumb2 code generated, SUB.W SP,
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: bagel99 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

This is a regression since 3.6.0.

LLVM version 3.7.0 and trunk generate:
    mov        r0, sp
    sub.w    sp, r0, #8    <-- BAD!! rd of sp is undefined

gnu as gives following error message:
Error: r13 not allowed here -- `sub.w sp,r0,#8'

LLVM version 3.6.0 generated:
    mov            r0, sp
    sub.w    r1, r0, #8
    mov        sp, r1

The source code that generates this is somewhat complex.  If necessary, I'll
try to find a small .ll test case.

-- 
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/20151021/098f0bea/attachment.html>


More information about the llvm-bugs mailing list