[LLVMbugs] [Bug 7357] New: simplify-libcalls produces declarations without a calling convention

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 11 09:14:11 PDT 2010


           Summary: simplify-libcalls produces declarations without a
                    calling convention
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu

; ModuleID = 'test.ll'
target datalayout =
target triple = "armv5-none-linux-gnueabi"

@.str1 = private constant [11 x i8] c"(){};[]&|:\00", align 4

define arm_aapcscc i32 @foo(i32 %argc) nounwind {
  call arm_aapcscc  i8* @strchr(i8* getelementptr ([11 x i8]* @.str1, i32 0,
i32 0), i32 %argc) nounwind readonly
  ret i32 0

declare arm_aapcscc i8* @strchr(i8*, i32) nounwind readonly

opt -simplify-libcalls  -S test.ll -o test2.ll

will produce

declare i8* @memchr(i8*, i32, i32) nounwind readonly

I think there are two ways we could fix this. First is get simplify-libcalls to
ask the target for the calling convention. The second one is to have it
preserve the calling convention of the function it is replacing.

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