aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-im.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r--gcc/tree-ssa-loop-im.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 01a954e..9c62f208 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -471,9 +471,7 @@ stmt_cost (gimple *stmt)
/* Unless the call is a builtin_constant_p; this always folds to a
constant, so moving it is useless. */
fndecl = gimple_call_fndecl (stmt);
- if (fndecl
- && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
- && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CONSTANT_P)
+ if (fndecl && fndecl_built_in_p (fndecl, BUILT_IN_CONSTANT_P))
return 0;
return LIM_EXPENSIVE;