[LLVMbugs] [Bug 2673] New: ExpandLibCall function does not try to resolve libcalls to currently lowered module .

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Aug 13 07:24:36 PDT 2008


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

           Summary: ExpandLibCall function does not try to resolve libcalls
                    to currently lowered module.
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: mikael.lepisto at tut.fi
                CC: llvmbugs at cs.uiuc.edu


When operation which is not supported by target are generated by ISEL lowering
(such as div and rem) and there is no native linker available for target, the
emulation code for libcall functions needs to be linked to program statically.

However even if libcall functions are found from currently lowered module,
ExpandLibCall function does not try to use those functions for emulating e.g.
div functionality. It just automatically supposes that libcall is external and
will be linked to code later on.

Maybe ExpandLibCall function should first check if needed libcall is already
found from module and use that implementation and if it's not found then rely
on externally linked libcall code?

In my case I link in libcall code just before ISEL and after ISEL there is
still external references to __divsi3 symbol in those places where div was
expanded, even though the function by that name is found from the same program.


-- 
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