diff mbox

[testsuite] Change xfail conditions for bb-slp-34.c

Message ID 1456998378-22605-1-git-send-email-james.greenhalgh@arm.com
State New
Headers show

Commit Message

James Greenhalgh March 3, 2016, 9:46 a.m. UTC
Hi,

ARM and AArch64 will still vectorize bb-slp-34.c - we're not operating
with a cost model so we vectorize to a 64-bit vector of two ints, and the
permutes are just element swaps.

So, don't mark this test xfail for arm/aarch64.

Checked on x86_64-none-linux-gnu, arm-none-eabi and aarch64-none-elf with
no issues.

OK?

Thanks,
James

---
2016-03-03  James Greenhalgh  <james.greenhalgh@arm.com>

	* gcc.dg/vect/bb-slp-34.c: Don't XFAIL for ARM/AArch64.

Comments

James Greenhalgh March 9, 2016, 12:12 p.m. UTC | #1
On Wed, Mar 09, 2016 at 12:53:02PM +0100, Rainer Orth wrote:
> Richard Biener <rguenther@suse.de> writes:

> 

> > On Thu, 3 Mar 2016, James Greenhalgh wrote:

> >

> >> 

> >> Hi,

> >> 

> >> ARM and AArch64 will still vectorize bb-slp-34.c - we're not operating

> >> with a cost model so we vectorize to a 64-bit vector of two ints, and the

> >> permutes are just element swaps.

> >> 

> >> So, don't mark this test xfail for arm/aarch64.

> >> 

> >> Checked on x86_64-none-linux-gnu, arm-none-eabi and aarch64-none-elf with

> >> no issues.

> >> 

> >> OK?

> >

> > Ok.  Indeed with using V2SI vectors the vectorization is valid. 

> 

> Unfortunately, the patch broke the test on sparc:

> 

> FAIL: gcc.dg/vect/bb-slp-34.c -flto -ffat-lto-objects  scan-tree-dump slp2 "basic block vectorized"

> FAIL: gcc.dg/vect/bb-slp-34.c scan-tree-dump slp2 "basic block vectorized"

> 

> While before the scan-tree-dump wasn't run due to missing vect_perm

> support, it now fails.

> 

> I believe you meant to just not xfail the test on aarch64* and arm*,


Indeed.

> which is what the following patch does.  James, could you please test

> it?


Yes, that still does the right thing for me on aarch64-none-elf, and I think
I now understand why.

Before I touched it that said:

  /* { dg-final { scan-tree-dump "basic block vectorized" "slp2" { target vect_perm xfail *-*-* } } } */

Which means "only run this statement for vect_perm targets, but expect it
to fail on all targets".

Then I changed it to say :

  /* { dg-final { scan-tree-dump "basic block vectorized" "slp2" { xfail { { vect_perm } && { ! { aarch64*-*-* arm*-*-* } } } } } } */

Which means "always run this, but expect it to fail on vect_perm targets that
are not arm/aarch64".

Now you've changed it to say:

  /* { dg-final { scan-tree-dump "basic block vectorized" "slp2" { target vect_perm xfail { ! { aarch64*-*-* arm*-*-* } } } } } */

Which means "only run this for vect perm targets, and expect it to fail
if the target is not arm/aarch64.

Thanks for the patch, it looks right to me and is what I was originally
trying to write. Sorry for the sparc (and presumably other
vect_int && !vect_perm targets) break.

Thanks,
James
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-34.c b/gcc/testsuite/gcc.dg/vect/bb-slp-34.c
index 418f2b5..7b9511a 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-34.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-34.c
@@ -33,4 +33,4 @@  int main()
 }
 
 /* ??? XFAILed because we access "excess" elements with the permutation.  */
-/* { dg-final { scan-tree-dump "basic block vectorized" "slp2" { target vect_perm xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump "basic block vectorized" "slp2" { xfail { { vect_perm } && { ! { aarch64*-*-* arm*-*-* } } } } } } */