[LLVMdev] strlen in fast-isel
reed kotler
rkotler at mips.com
Tue Jan 20 14:35:28 PST 2015
It seems that fast-isel for intel does not handle strlen. It's a general
problem in fast-isel .
~/llvmw/build/Deb~/llvmw/build/Debug+Asserts/bin/clang -O0 -mllvm
-fast-isel-verbose -mllvm -fast-isel strlen1.c
strlen1.c:12:3: warning: implicitly declaring library function 'printf' with
type 'int (const char *, ...)'
printf("%i\n", len);
^
strlen1.c:12:3: note: include the header <stdio.h> or explicitly provide a
declaration for 'printf'
FastISel missed call: %call = call i64 @strlen(i8* %0) #3
1 warning generated.
#include <string.h>
char *hello = "hello";
int len;
void foo() {
len = strlen(hello);
}
int main() {
foo();
printf("%i\n", len);
}
More information about the llvm-dev
mailing list