This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should PHI result and arg types match?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>, Andrew MacLeod <amacleod at redhat dot com>
- Date: Fri, 19 Oct 2018 19:00:18 +0200
- Subject: Re: Should PHI result and arg types match?
- References: <d41f5d47-aa1a-9bcb-b6aa-4f83b1410cb8@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Oct 19, 2018 at 12:47:00PM -0400, Aldy Hernandez wrote:
> Howdy!
>
> Are the types for PHI arguments and the corresponding result supposed to
> match?
Like with most other gimple stmts, they need to satisfy
useless_type_conversion_p (TREE_TYPE (phiresult), TREE_TYPE (phiarg))
for all args. And, most pointer conversions are considered useless,
exceptions are if different address spaces are involved or conversions
from function/method pointers to other pointers or vice versa, or if the
pointers have different modes.
Jakub