[LLVMbugs] [Bug 12793] New: Bad ARM codegen when large structs passed by value, llc -O1.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 10 13:59:41 PDT 2012


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

             Bug #: 12793
           Summary: Bad ARM codegen when large structs passed by value,
                    llc -O1.
           Product: libraries
           Version: 3.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: ARM
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: pjcoup at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8530
  --> http://llvm.org/bugs/attachment.cgi?id=8530
C test case.

On a simple test program, clang-3.0 produces .ll code which is miscompiled by
llc on ARM.

To reproduce:
clang -ccc-host-triple armv7a-none-linux-gnueabi -O0 -emit-llvm -c repro.c -o
repro.bc
llc -march=arm repro.bc -o repro.s
as repro.s -o repro.o
gcc repro.o -o repro
This program should output "f()->s=2". Instead, it outputs "f()->s=0"

In my messing around with llc options, I got different behavior on llvm-3.0 vs.
llvm-svn.

llvm-3.0:
llc -O0 compiles repro.bc correctly.
llc -O[12] miscompiles repro.bc.

llvm-svn:
llc -O0 hits an assert: "Cannot use SP to access the emergency spill slot"
llc -O[12] miscompiles.
llc -O[0-2] -disable-fp-elim compile repro.bc correctly.

The -disable-fp-elim switch didn't seem to have any effect on the behavior in
llvm-3.0.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list