if (is_gimple_call (stmt)
&& (fndecl = gimple_call_fndecl (stmt)) != NULL_TREE
&& DECL_BUILT_IN_CLASS (fndecl) != NOT_BUILT_IN)
- return gimple_builtin_call_types_compatible_p (stmt, fndecl);
+ {
+ if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL)
+ if (tree decl = builtin_decl_explicit (DECL_FUNCTION_CODE (fndecl)))
+ fndecl = decl;
+ return gimple_builtin_call_types_compatible_p (stmt, fndecl);
+ }
return false;
}
if (is_gimple_call (stmt)
&& (fndecl = gimple_call_fndecl (stmt)) != NULL_TREE
&& DECL_BUILT_IN_CLASS (fndecl) == klass)
- return gimple_builtin_call_types_compatible_p (stmt, fndecl);
+ {
+ if (klass == BUILT_IN_NORMAL)
+ if (tree decl = builtin_decl_explicit (DECL_FUNCTION_CODE (fndecl)))
+ fndecl = decl;
+ return gimple_builtin_call_types_compatible_p (stmt, fndecl);
+ }
return false;
}
if (is_gimple_call (stmt)
&& (fndecl = gimple_call_fndecl (stmt)) != NULL_TREE
&& fndecl_built_in_p (fndecl, code))
- return gimple_builtin_call_types_compatible_p (stmt, fndecl);
+ {
+ if (tree decl = builtin_decl_explicit (DECL_FUNCTION_CODE (fndecl)))
+ fndecl = decl;
+ return gimple_builtin_call_types_compatible_p (stmt, fndecl);
+ }
return false;
}
return as_combined_fn (gimple_call_internal_fn (call));
tree fndecl = gimple_call_fndecl (stmt);
- if (fndecl
- && fndecl_built_in_p (fndecl, BUILT_IN_NORMAL)
- && gimple_builtin_call_types_compatible_p (stmt, fndecl))
- return as_combined_fn (DECL_FUNCTION_CODE (fndecl));
+ if (fndecl && fndecl_built_in_p (fndecl, BUILT_IN_NORMAL))
+ {
+ tree decl = builtin_decl_explicit (DECL_FUNCTION_CODE (fndecl));
+ if (!decl)
+ decl = fndecl;
+ if (gimple_builtin_call_types_compatible_p (stmt, decl))
+ return as_combined_fn (DECL_FUNCTION_CODE (fndecl));
+ }
}
return CFN_LAST;
}