On 11/28/18 10:57 AM, Tamar Christina wrote:
> Hi Joseph,
> 
> This is an updated version of my first patch which moves part of the type 
> conversion code
> from convert.c to match.pd because match.pd is able to apply this 
> transformation in the
> presence of intermediate temporary variables.
> 
> I couldn't move the error parts as match.pd doesn't seem to have access to 
> the diagnostics
> bits and also I feel like this may be a bit against the philosophy of 
> match.pd. 
> 
> Regtested and bootstrapped on aarch64-none-linux-gnu and no issues.
> 
> Ok for trunk?
> 
> Thanks,
> Tamar
> 
> Concretely it makes both these cases behave the same
> 
>   float e = (float)a * (float)b;
>   *c = (_Float16)e;
> 
> and 
> 
>   *c = (_Float16)((float)a * (float)b);
> 
> Thanks,
> Tamar
> 
> gcc/ChangeLog:
> 
> 2018-11-28  Tamar Christina  <tamar.christ...@arm.com>
> 
>       * convert.c (convert_to_real_1): Move part of conversion code...
>       * match.pd: ...To here.
> 
> gcc/testsuite/ChangeLog:
> 
> 2018-11-28  Tamar Christina  <tamar.christ...@arm.com>
> 
>       * gcc.dg/type-convert-var.c: New test.
OK.

Reply via email to