]> granicus.if.org Git - clang/commit
CGBuiltin: Use @llvm.fabs rather than fabs libcall when emitting builtins
authorTom Stellard <thomas.stellard@amd.com>
Wed, 3 Sep 2014 15:24:29 +0000 (15:24 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 3 Sep 2014 15:24:29 +0000 (15:24 +0000)
commitd91dc0875630e6d2c81363b2801ed47257daa026
tree052a2bfcd1a7b993e64d8cfe002a478d6b9fcbc4
parentb6d48443fdfce3572650b525991de8fb17b8dd5f
CGBuiltin: Use @llvm.fabs rather than fabs libcall when emitting builtins

Using the intrinsic allows the SelectionDAGBuilder to turn this call
into the FABS Node and also the intrinsic is something the vectorizer knows
how to vectorize.

This patch also sets the readnone attribute on this call, which should
enable additional optmizations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217042 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBuiltin.cpp
test/CodeGen/builtins.c