Hi Bill,

On Mon, May 09, 2016 at 10:00:31PM -0500, Bill Schmidt wrote:
> PR70963 reports a problem with vec_cts when used to convert vector double to 
> vector long long.
> This is due to a register with an undefined value that is generated only when 
> the scale factor is
> zero.  This patch adds logic to provide the correct value when the scale 
> factor is zero.
> 
> The problem from the PR is in the define_expand for vsx_xvcvdpsxds_scale.  
> The define_expand
> for vsx_xvcvdpuxds_scale clearly has the same problem, although it is not 
> possible to reach this
> via a call to vec_cts.  The raw builtin __builtin_vsx_xvcvdpuxds_scale can be 
> used, however, and
> I’ve shown this in the test case.
> 
> Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. 
>  Is this ok for
> trunk, and eventual backport to 6 and 5?

Okay.  A few thingies...

> 2016-05-09  Bill Schmidt  <wschm...@linux.vnet.ibm.com>

You should mention the PR here, like

        PR target/70963
>         * config/rs6000/vsx.md (vsx_xvcvdpsxds_scale): Generate correct
>         code for a zero scale factor.
>         (vsx_xvcvdpuxds_scale): Likewise.

This way an automatic comment is made in bugzilla, too. It's magic!

> +++ gcc/config/rs6000/vsx.md    (working copy)                                
>   
> @@ -1717,10 +1717,15 @@
>  {                                                                            
>   
>    rtx op0 = operands[0];                                                     
>   

Huge amount of trailing space everywhere here (but not in the tree);
seems like you need to fix your mail client (or its settings).

>    rtx op1 = operands[1];                                                     
>   
> -  rtx tmp = gen_reg_rtx (V2DFmode);                                          
>   
> +  rtx tmp;                                                                   
>   
>    int scale = INTVAL(operands[2]);                                           
>   

This is the only line you didn't change, and it has a missing space (before
the paren open); you might want to fix that while you're at it :-)


Segher

Reply via email to