[LLVMbugs] [Bug 16393] New: lencod miscompiled on Cortex-A15 (byval issue)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 20 14:25:22 PDT 2013


            Bug ID: 16393
           Summary: lencod miscompiled on Cortex-A15 (byval issue)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: benny.kra at gmail.com
                CC: llvmbugs at cs.uiuc.edu, mren at apple.com,
                    renato.golin at linaro.org, stpworld at narod.ru
    Classification: Unclassified

Created attachment 10717
  --> http://llvm.org/bugs/attachment.cgi?id=10717&action=edit
the miscompiled function

MultiSource/Applications/JM/lencod has been failing on the arm-lnt buildbot
since r184105. After some investigation it looks like this is caused by broken
byval handling, r184105 only changed spilling decisions and uncovered the

Attached is IR for the miscompiled function (compile with llc
-mcpu=cortex-a15). It passes a very large object byval. Of particular interest
is the part:

    mov    r0, #1
    mov    r1, #2
    bl    RestoreMVBlock8x8
    add    sp, sp, #24
    add    sp, sp, #8192
    sub    sp, sp, #24
    sub    sp, sp, #8192
    ldm    r10, {r2, r3}
    mov    r1, sp
    str    r6, [sp, r8]
    ldr    r0, .LCPI0_0
.LBB0_57:                               @ %if.then248
                                        @ =>This Inner Loop Header: Depth=1
    ldr    r7, [r5], #4
    subs    r0, r0, #4
    str    r7, [r1], #4
    bne    .LBB0_57
@ BB#58:                                @ %if.then248
    mov    r0, #1
    mov    r1, #3
    bl    RestoreMVBlock8x8
    add    sp, sp, #24
    add    sp, sp, #8192
    sub    lr, sp, #4096
    sub    r0, sp, #4096
    ldr    r3, [lr, #-4084]        @ 4-byte Reload
    movw    r5, :lower16:img
    ldr    r12, [r0, #-4068]       @ 4-byte Reload

The upper part just looks inefficient, after the second part we end up with a
corrupted stack.

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/20130620/6dc56ba5/attachment.html>

More information about the llvm-bugs mailing list