2017-02-21 Jakub Jelinek <jakub@redhat.com>
+ PR target/79633
+ * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
+ is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
+ Use gimple_call_builtin_p.
+
PR target/79570
* sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
on temporarily removed DEBUG_INSNs.
gimple *stmt = gsi_stmt (i);
tree fndecl;
- if (gimple_code (stmt) != GIMPLE_CALL
- || !gimple_call_with_bounds_p (stmt))
+ if (!is_gimple_call (stmt)
+ || !gimple_call_with_bounds_p (stmt)
+ || !gimple_call_builtin_p (stmt, BUILT_IN_NORMAL))
continue;
fndecl = gimple_call_fndecl (stmt);
-
- if (!fndecl || DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_NORMAL)
- continue;
-
if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMCPY_CHKP
|| DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMPCPY_CHKP
|| DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMMOVE_CHKP