[LLVMbugs] [Bug 727] NEW: [ppc] Bad codegen for overaligned locals

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Apr 3 15:07:31 PDT 2006


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=727

           Summary: [ppc] Bad codegen for overaligned locals
           Product: libraries
           Version: 1.6
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: PowerPC
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org


Consider this code:

void %main() {
        %X = alloca int, align 256
        store int 0, int* %X
        ret void
}

We currently emit this:

_main:
        stwu r1, -512(r1)
        rlwinm r0, r1, 0, 24, 31
        subfic r0, r0, 256
        stwux r1, r1, r0
        stw r31, 4(r1)
        mr r31, r1
        li r2, 0
        stw r2, 256(r31)
***   lwz r31, 4(r31)
***   addi r1, r1, 512
        blr

The epilog is wrong.

-Chris



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list