aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-call-cdce.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-12-01 14:53:53 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-12-01 14:53:53 +0000
commit6c59645f5de1af1dff9715a5bd30f21f29cf2607 (patch)
tree6121ab77960eee153560c2f4bde6de4dece328a6 /gcc/tree-call-cdce.c
parent5797378aabcc51ef4de094f0160e451b45d6cfb7 (diff)
downloadgcc-6c59645f5de1af1dff9715a5bd30f21f29cf2607.zip
gcc-6c59645f5de1af1dff9715a5bd30f21f29cf2607.tar.gz
gcc-6c59645f5de1af1dff9715a5bd30f21f29cf2607.tar.bz2
PR68474: Fix tree-call-cdce.c:use_internal_fn
We'd call gen_shrink_wrap_conditions for functions that it can't handle but edom_only_function can. Tested on x86_64-linux-gnu. gcc/ PR tree-optimization/68474 * tree-call-cdce.c (use_internal_fn): Protect call to gen_shrink_wrap_conditions. gcc/testsuite/ PR tree-optimization/68474 * gcc.dg/pr68474.c: New test. From-SVN: r231115
Diffstat (limited to 'gcc/tree-call-cdce.c')
-rw-r--r--gcc/tree-call-cdce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c
index 75ef180..4123130 100644
--- a/gcc/tree-call-cdce.c
+++ b/gcc/tree-call-cdce.c
@@ -959,7 +959,8 @@ use_internal_fn (gcall *call)
{
unsigned nconds = 0;
auto_vec<gimple *, 12> conds;
- gen_shrink_wrap_conditions (call, conds, &nconds);
+ if (can_test_argument_range (call))
+ gen_shrink_wrap_conditions (call, conds, &nconds);
if (nconds == 0 && !edom_only_function (call))
return false;