Should PHI result and arg types match?

Aldy Hernandez aldyh@redhat.com
Fri Oct 19 17:15:00 GMT 2018



On 10/19/18 1:00 PM, Jakub Jelinek wrote:
> 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.

Ah, that makes sense.

Thanks!
Aldy



More information about the Gcc mailing list