diff options
Diffstat (limited to 'gcc/tree-ssa-strlen.c')
-rw-r--r-- | gcc/tree-ssa-strlen.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index aa8b3d69164..a574a83fe43 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -807,12 +807,10 @@ adjust_last_stmt (strinfo si, gimple stmt, bool is_strcat) return; } - if (!is_gimple_call (last.stmt)) - return; - callee = gimple_call_fndecl (last.stmt); - if (callee == NULL_TREE || DECL_BUILT_IN_CLASS (callee) != BUILT_IN_NORMAL) + if (!gimple_call_builtin_p (last.stmt, BUILT_IN_NORMAL)) return; + callee = gimple_call_fndecl (last.stmt); switch (DECL_FUNCTION_CODE (callee)) { case BUILT_IN_MEMCPY: @@ -1750,7 +1748,7 @@ strlen_optimize_stmt (gimple_stmt_iterator *gsi) if (is_gimple_call (stmt)) { tree callee = gimple_call_fndecl (stmt); - if (callee && DECL_BUILT_IN_CLASS (callee) == BUILT_IN_NORMAL) + if (gimple_call_builtin_p (stmt, BUILT_IN_NORMAL)) switch (DECL_FUNCTION_CODE (callee)) { case BUILT_IN_STRLEN: |