diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-02-21 18:46:42 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-02-21 18:46:42 +0100 |
commit | 956d3e61a029d40846994b99b7b2b12986ccb047 (patch) | |
tree | 239874141f4de1215749f0f4177be528c11520d5 /gcc/tree-chkp-opt.c | |
parent | d4cbfca47f47194a267f387c473416a62befb93b (diff) | |
download | gcc-956d3e61a029d40846994b99b7b2b12986ccb047.zip gcc-956d3e61a029d40846994b99b7b2b12986ccb047.tar.gz gcc-956d3e61a029d40846994b99b7b2b12986ccb047.tar.bz2 |
re PR target/79633 (ICE in gimple_call_arg, at gimple.h:3163)
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.
* gcc.target/i386/mpx/pr79633.c: New test.
From-SVN: r245634
Diffstat (limited to 'gcc/tree-chkp-opt.c')
-rw-r--r-- | gcc/tree-chkp-opt.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/tree-chkp-opt.c b/gcc/tree-chkp-opt.c index 6c84cae..ebe0545 100644 --- a/gcc/tree-chkp-opt.c +++ b/gcc/tree-chkp-opt.c @@ -964,15 +964,12 @@ chkp_optimize_string_function_calls (void) 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 |