great, thank you!
Still, I have tried fast option:
clang -S -O3 -mllvm -ffast-math -emit-llvm sqrt.c -o sqrt.s
and also with specifying this option in opt (not in clang) - it stays the
same sqrt.
#include <stdlib.h>
#include <stdio.h>
int main() {
int a;
scanf("%d", &a);
double b = sqrt(a);
int c = (b > 10) ? 1 : 0;
return c;
}
2017-07-11 20:33 GMT+02:00 Friedman, Eli <efriedma at codeaurora.org>:
> On 7/11/2017 11:19 AM, Anastasiya Ruzhanskaya wrote:
>
> And are such intrinsics, as memset, memcpy, memmove replaced by standard
> library calls? This is said in sources, that it looks for such functions in
> global symbol table.
>
>
> The backend will sometimes generate a call to the C library memset,
> memcpy, or memmove to lower a call to the LLVM intrinsics with the same
> name. Depending on the target/optimization flags/length of the operation,
> in some cases it will generate inline code, or generate a call to a
> function with a different name.
>
> -Eli
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
Foundation Collaborative Project
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20170711/a62644fb/attachment.html>
On 7/11/2017 11:38 AM, Anastasiya Ruzhanskaya wrote:> great, thank you! > > Still, I have tried fast option: > clang -S -O3 -mllvm -ffast-math -emit-llvm sqrt.c -o sqrt.s"-mllvm -ffast-math" is not a thing; the flag is just "-ffast-math". (We should probably rename the Hexagon backend option to avoid confusion.) -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170711/7d690d78/attachment.html>
Thank you for our answers! The last thing I would like to know : is I don't want any llvm intrinsics at all, -fno-builtin option is the right one? 2017-07-11 20:49 GMT+02:00 Friedman, Eli <efriedma at codeaurora.org>:> On 7/11/2017 11:38 AM, Anastasiya Ruzhanskaya wrote: > > great, thank you! > > Still, I have tried fast option: > clang -S -O3 -mllvm -ffast-math -emit-llvm sqrt.c -o sqrt.s > > > "-mllvm -ffast-math" is not a thing; the flag is just "-ffast-math". (We > should probably rename the Hexagon backend option to avoid confusion.) > > -Eli > > -- > Employee of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170712/4a28550a/attachment.html>