ipa-prop: Fix another case of missing BUILT_IN_UNREACHABLE_TRAP handling [PR106258]

Message ID Y/cOFKwwDsz+DgAO@tucnak
State Unresolved
Headers
Series ipa-prop: Fix another case of missing BUILT_IN_UNREACHABLE_TRAP handling [PR106258] |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jakub Jelinek Feb. 23, 2023, 6:56 a.m. UTC
  On Wed, Feb 22, 2023 at 07:46:46PM +0100, Richard Biener wrote:
> Ok for stage1

Thanks.  In that case, can we get at least following into GCC 13,
another spot that handles in IPA just BUILT_IN_UNREACHABLE and
not BUILT_IN_UNREACHABLE_TRAP?

Bootstrapped/regtested on x86_64-linux and i686-linux.

2023-02-23  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/106258
	* ipa-prop.cc (try_make_edge_direct_virtual_call): Handle
	BUILT_IN_UNREACHABLE_TRAP like BUILT_IN_UNREACHABLE.



	Jakub
  

Comments

Richard Biener Feb. 23, 2023, 10:33 a.m. UTC | #1
On Thu, Feb 23, 2023 at 7:56 AM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Wed, Feb 22, 2023 at 07:46:46PM +0100, Richard Biener wrote:
> > Ok for stage1
>
> Thanks.  In that case, can we get at least following into GCC 13,
> another spot that handles in IPA just BUILT_IN_UNREACHABLE and
> not BUILT_IN_UNREACHABLE_TRAP?

Sure.

> Bootstrapped/regtested on x86_64-linux and i686-linux.
>
> 2023-02-23  Jakub Jelinek  <jakub@redhat.com>
>
>         PR middle-end/106258
>         * ipa-prop.cc (try_make_edge_direct_virtual_call): Handle
>         BUILT_IN_UNREACHABLE_TRAP like BUILT_IN_UNREACHABLE.
>
> --- gcc/ipa-prop.cc.jj  2023-02-22 20:50:27.422519757 +0100
> +++ gcc/ipa-prop.cc     2023-02-22 20:52:04.904112685 +0100
> @@ -3850,6 +3850,7 @@ try_make_edge_direct_virtual_call (struc
>             {
>               if (!t
>                   || fndecl_built_in_p (t, BUILT_IN_UNREACHABLE)
> +                 || fndecl_built_in_p (t, BUILT_IN_UNREACHABLE_TRAP)
>                   || !possible_polymorphic_call_target_p
>                        (ie, cgraph_node::get (t)))
>                 {
>
>
>         Jakub
>
  

Patch

--- gcc/ipa-prop.cc.jj	2023-02-22 20:50:27.422519757 +0100
+++ gcc/ipa-prop.cc	2023-02-22 20:52:04.904112685 +0100
@@ -3850,6 +3850,7 @@  try_make_edge_direct_virtual_call (struc
 	    {
 	      if (!t
 		  || fndecl_built_in_p (t, BUILT_IN_UNREACHABLE)
+		  || fndecl_built_in_p (t, BUILT_IN_UNREACHABLE_TRAP)
 		  || !possible_polymorphic_call_target_p
 		       (ie, cgraph_node::get (t)))
 		{