[LLVMbugs] [Bug 4482] New: Wrong codegen for calls on darwin ppc32

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jun 29 14:47:20 PDT 2009


           Summary: Wrong codegen for calls on darwin ppc32
           Product: new-bugs
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: dalej at apple.com
                CC: llvmbugs at cs.uiuc.edu

Try the following in llvm-gcc on darwin-ppc32 with -O0 -S:

extern int exact_log2 (unsigned long long);
extern __inline__ int
exact_log2 (unsigned long long x)
  return x == (x & -x) && x ? (int) __builtin_ctzll (x) : -1;
int foo(unsigned long long x) {
  return exact_log2(x);

The call looks like:

bl exact_log2$non_lazy_ptr

which is wrong.  If you want to generate a $stub, you can, but there is no
reason to do either on Leopard (this should be controlled by

This causes ppc32 bootstrap to fail, and is a recent regression.

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