This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Do not use TYPE_CANONICAL in useless_type_conversion
- From: Richard Biener <rguenther at suse dot de>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 2 Oct 2015 09:39:27 +0200 (CEST)
- Subject: Re: Do not use TYPE_CANONICAL in useless_type_conversion
- Authentication-results: sourceware.org; auth=none
- References: <20150930211235 dot GB30640 at kam dot mff dot cuni dot cz> <3212548 dot nTy76256t9 at polaris> <alpine dot LSU dot 2 dot 11 dot 1510011628070 dot 6516 at zhemvz dot fhfr dot qr> <57801859 dot QRu7TrYMFC at polaris>
On Thu, 1 Oct 2015, Eric Botcazou wrote:
> > Do we require that to match? I don't remember that we do.
>
> For scalar types (and arrays of scalars), the alignment is essentially encoded
> in the size/mode pair but that's not the case for non-array aggregate types,
> so declaring a conversion that changes the alignment as useless seems weird.
Yeah, though we don't have conversions of aggregates. We use the
predicate to tell whether an aggregate assignment is valid GIMPLE.
LHS and RHS alignment do not have to match AFAIK.
Richard.