On Tue, 6 Apr 2021, Jakub Jelinek wrote:

> On Thu, Apr 01, 2021 at 02:16:55PM +0100, Alex Coplan via Gcc-patches wrote:
> > FYI, I'm seeing the new test failing on aarch64:
> > 
> > PASS: gcc.dg/pr96573.c (test for excess errors)
> > FAIL: gcc.dg/pr96573.c scan-tree-dump optimized "__builtin_bswap"
> 
> The vectorizer in the aarch64 case manages to emit a VEC_PERM_EXPR instead
> (which is just as efficient).
> 
> So, do we want to go for the following (and/or perhaps also restrict the test 
> to
> a couple of targets where it works?  In my last distro build it failed only
> on aarch64-linux, while armv7hl-linux-gnueabi and
> {i686,x86_64,powerpc64le,s390x}-linux were fine)?

Works for me.

> 2021-04-06  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR tree-optimization/96573
>       * gcc.dg/pr96573.c: Instead of __builtin_bswap accept also
>       VEC_PERM_EXPR with bswapping permutation.
> 
> --- gcc/testsuite/gcc.dg/pr96573.c.jj 2021-04-01 10:50:56.238629197 +0200
> +++ gcc/testsuite/gcc.dg/pr96573.c    2021-04-06 12:20:16.314520746 +0200
> @@ -2,7 +2,7 @@
>  /* { dg-do compile { target { lp64 || ilp32 } } } */
>  /* { dg-require-effective-target bswap } */
>  /* { dg-options "-O3 -fdump-tree-optimized" } */
> -/* { dg-final { scan-tree-dump "__builtin_bswap" "optimized" } } */
> +/* { dg-final { scan-tree-dump "__builtin_bswap\|VEC_PERM_EXPR\[^\n\r]*7, 6, 
> 5, 4, 3, 2, 1, 0" "optimized" } } */
>  
>  typedef __SIZE_TYPE__ size_t;
>  
> 
> 
>       Jakub
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)

Reply via email to