[PATCH] D39204: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 17:37:50 PDT 2017


efriedma added a comment.

> I was going to include the builtins too, but that exposes another bug (marked here with FIXME) - the builtins are all defined 'const'.

Probably just need to change c->e in Builtins.def?

> This does make me curious about the use-case of libm-equivalent builtins. If they are exactly identical to libm (including errno behavior), then why are they needed in the first place?

It gets treated differently under -fno-builtin/-std=c89.


https://reviews.llvm.org/D39204





More information about the cfe-commits mailing list