[LLVMbugs] [Bug 1623] New: The testsuite should test llvm-gcc codegen directly

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Aug 27 08:20:22 PDT 2007


           Summary: The testsuite should test llvm-gcc codegen directly
           Product: new-bugs
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu

For many people llvm-gcc is the primary interface to llvm,
yet surprisingly the regression testsuite does not test
the building of programs with it.  Instead, it uses llvm-gcc
to produce bitcode, which is then optimized with opt,
internalized with llvm-ld, codegen'd with llc and finally
linked using mainline gcc.  The end result is an executable
that can be quite different to what llvm-gcc would produce
(a) the target can differ.  On x86, llvm-gcc will codegen
for an i386 while llc will codegen for the host cpu, which
is almost always more modern.  In particular, the i386
floating point stack may be used when compiling with llvm-gcc
but not when compiling with llc.  I hit this several times
with the Ada testsuite.
(b) codegen options can differ.  For example, llvm-gcc might
be using -enable-unsafe-fp-math, -disable-fp-elim,
-nozero-initialized-in-bss or -enable-eh while llc may not be.
This struck me when I noticed that -enable-eh (ok, -enable-correct-support)
was only being used for tests considered to require eh support,
while llvm-gcc always turns on -enable-eh.
(c) There is a risk of linking against the wrong runtime, i.e. from mainline
gcc rather than llvm-gcc, though the testsuite does try to avoid this.
(d) The extra optimization can hide codegen bugs.  I hit this several times
when debugging Ada testsuite problems: numerous codegen bugs disappeared if
I did LTO or otherwise optimized too heavily.

In short I think it would be wise to add a new test, that builds each
program using llvm-gcc/llvm-g++ in exactly the same way as they are built
using mainline gcc/g++.

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