aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2016-05-26 15:49:22 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2016-05-26 15:49:22 +0000
commitb3d2acb6dce9a25f433c2d5d5bae48e9d2b4149a (patch)
tree150da3f17c5686ef4e763fcfa4fc50e15617bf76 /gcc/tree-ssa-loop-ivopts.c
parenta2d5b8c99393978188790649571aeb2fc1fd6944 (diff)
downloadgcc-b3d2acb6dce9a25f433c2d5d5bae48e9d2b4149a.zip
gcc-b3d2acb6dce9a25f433c2d5d5bae48e9d2b4149a.tar.gz
gcc-b3d2acb6dce9a25f433c2d5d5bae48e9d2b4149a.tar.bz2
Fix ivopts estimates for internal functions
tree-ssa-loop-ivopts.c:loop_body_includes_call was treating internal calls such as IFN_SQRT as clobbering all caller-saved registers, which I don't think is appropriate for any current internal function. Tested on aarch64-linux-gnu and x86_64-linux-gnu. gcc/ * tree-ssa-loop-ivopts.c (loop_body_includes_call): Don't assume that internal functions will clobber all caller-saved registers. From-SVN: r236780
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 9ce6b64..23c9886 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -7643,6 +7643,7 @@ loop_body_includes_call (basic_block *body, unsigned num_nodes)
{
gimple *stmt = gsi_stmt (gsi);
if (is_gimple_call (stmt)
+ && !gimple_call_internal_p (stmt)
&& !is_inexpensive_builtin (gimple_call_fndecl (stmt)))
return true;
}