https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105150

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:5df29fe79df659617793f955a1ea6c23a0617fe2

commit r12-8022-g5df29fe79df659617793f955a1ea6c23a0617fe2
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Apr 6 16:47:47 2022 +0200

    gimple.cc: Follow-up to adjust gimple_call_builtin_p and
gimple_call_combined_fn [PR105150]

    On Wed, Apr 06, 2022 at 09:41:44AM +0100, Richard Sandiford wrote:
    > But it seems like the magic incantation to detect ârealâ built-in
    > function calls is getting longer and longer.  Can we not abstract this
    > in a single place rather than have to repeat the same long sequence in
    > multiple places?

    I've already committed it, so it can be only dealt with an incremental
    patch.
    Here is a patch that adjusts instead
gimple_builtin_call_types_compatible_p,
    after the assert:
      if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL)
        if (tree decl = builtin_decl_explicit (DECL_FUNCTION_CODE (fndecl)))
          fndecl = decl;
    but we then lose the theoretical possibility of comparing against the
    actual user declaration.  Though I guess in the
    gimple-fold.cc
    gimple-low.cc
    gimple-match-head.cc
    calls to that function we also want this rather than what they do
currently.

    2022-04-06  Jakub Jelinek  <ja...@redhat.com>

            PR tree-optimization/105150
            * gimple.cc (gimple_builtin_call_types_compatible_p): Use
            builtin_decl_explicit here...
            (gimple_call_builtin_p, gimple_call_combined_fn): ... rather than
            here.

Reply via email to