You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CheckFunctionExists.cpp.txt
CheckFunctionExists.c is used by cmake to find whether the libarary function is supported or not during configuration. When CheckFunctionExists.c is compiled with llvm clang and with -fveclib=SVML flag. Assertion is occurring in InjectTLIMappings pass.
Preprocessed CheckFunctionExists.c:
// code start
char log2(void);
int main(int ac, char* av)
{
log2();
if (ac > 1000) {
return *av[0];
}
return 0;
}
// code end
The issue here is that InjectTLIMappings.cpp is trying to insert vectorized versions of the library function log2 into LLVM IR but vector version of char log2(void) is not present. Is it valid to redeclare a library function like this?
Clang command to reproduce the issue:-
clang -fveclib=SVML -DCHECK_FUNCTION_EXISTS=log2 -c CheckFunctionExists.c