Hi!

On Fri, Dec 08, 2017 at 11:08:26AM -0600, Will Schmidt wrote:
> Add support for gimple folding of splat_u{8,16,32}.
> Testcase coverage is primarily handled by existing tests
> testsuite/gcc.target/powerpc/fold-vec-splat_*.c
>     
> One new test added to verify we continue to receive
> an 'invalid argument, must be a 5-bit immediate' error
> when we try to splat a non-constant value.
>     
> V2 updates include..
>   Use the gimple_convert() helper.
>   Use the build_vector_from_val() helper.
>   whitespace fix-ups.
> Those changes actually simplify the code here significantly, which is good. 
> :-)

:-)

> 2017-12-08  Will Schmidt  <will_schm...@vnet.ibm.com>
>     
>       * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
>       early folding of splat_u{8,16,32}.
>     
> [testsuite]
> 
> 2017-12-08  Will Schmidt  <will_schm...@vnet.ibm.com>
> 
>       * gcc.target/powerpc/fold-vec-splat-misc-invalid.c: New.


> +    /* flavors of vec_splat_[us]{8,16,32}.  */
> +    case ALTIVEC_BUILTIN_VSPLTISB:
> +    case ALTIVEC_BUILTIN_VSPLTISH:
> +    case ALTIVEC_BUILTIN_VSPLTISW:
> +      {
> +      arg0 = gimple_call_arg (stmt, 0);

The indent here is wrong (should be two spaces, is three).

Looks fine otherwise.  Okay for trunk with that fixed.  Thanks!


Segher

Reply via email to