Hi!

On Wed, 22 May 2019 15:39:52 +0200, Richard Biener <rguent...@suse.de> wrote:
> On Wed, 22 May 2019, Thomas Schwinge wrote:
> > On Tue, 21 May 2019 13:11:54 +0200 (CEST), Richard Biener 
> > <rguent...@suse.de> wrote:
> > > On Mon, 20 May 2019, Richard Biener wrote:
> > > > On Sun, 19 May 2019, Richard Sandiford wrote:
> > > > > Richard Biener <rguent...@suse.de> writes:
> > > > > > This adds, incrementally ontop of moving VEC_PERM_EXPR folding
> > > > > > to match.pd (but not incremental patch - sorry...), folding
> > > > > > of single-element insert permutations to BIT_INSERT_EXPR.
> > 
> > > And the following is what I applied after fixing all sign-compare
> > > issues.
> > > 
> > > Bootstraped and tested on x86_64-unknown-linux-gnu.
> > 
> > I'm seeing one regression, in 'gcc/testsuite/brig/brig.sum':
> > 
> >     @@ -126,7 +126,7 @@ PASS: packed.hsail.brig scan-tree-dump original 
> > "\\+ { 15, 14, 13, 12, 11, 10, 9
> >     PASS: packed.hsail.brig scan-tree-dump gimple "= { 15, 15, 15, 15, 15, 
> > 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 };[\n ]+[a-z0-9_]+ = [a-z0-9_]+ 
> > \\+ [a-z0-9_]+;"
> >     PASS: packed.hsail.brig scan-tree-dump gimple "VEC_PERM_EXPR 
> > <[a-z0-9_]+, [a-z0-9_]+, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 
> > }>;"
> >     PASS: packed.hsail.brig scan-tree-dump gimple "_[0-9]+ = q2 \\+ q3;"
> >     [-PASS:-]{+FAIL:+} packed.hsail.brig scan-tree-dump gimple "= 
> > VEC_PERM_EXPR <[a-z0-9_]+, new_output.[0-9]+_[0-9]+, { 16, 1, 2, 3, 4, 5, 
> > 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }>;"
> >     PASS: packed.hsail.brig scan-tree-dump gimple "q4 = 
> > (VIEW_CONVERT_EXPR<uint128_t>\\()?s_output.[0-9]+(_[0-9]+)*\\)?;"
> >     PASS: packed.hsail.brig scan-tree-dump-times gimple "= 
> > __builtin___hsail_sat_add_u8" 64
> >     PASS: packed.hsail.brig scan-tree-dump gimple "= 
> > VIEW_CONVERT_EXPR<vector\\(8\\) signed 
> > short>\\((s_output.[0-9]+_[0-9]+|q8)\\);[\n ]+q9 = -_[0-9]+;[\n ]+"
> > 
> > The before vs. after tree dump changed as follows:
> > 
> >     --- packed.hsail.brig.005t.gimple       2019-05-22 14:29:48.810860260 
> > +0200
> >     +++ packed.hsail.brig.005t.gimple       2019-05-22 14:31:32.936670016 
> > +0200
> >     @@ -112,7 +112,7 @@
> >        _26 = q2 + q3;
> >        new_output.11 = _26;
> >        new_output.21_27 = new_output.11;
> >     -  _28 = VEC_PERM_EXPR <q4, new_output.21_27, { 16, 1, 2, 3, 4, 5, 6, 
> > 7, 8, 9, 10, 11, 12, 13, 14, 15 }>;
> >     +  _28 = VEC_PERM_EXPR <new_output.21_27, q4, { 0, 17, 18, 19, 20, 21, 
> > 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }>;
> >        s_output.12 = _28;
> >        q4 = s_output.12;
> >        _29 = { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
> >     @@ -369,7 +369,7 @@
> >        vec_out.22_273 = vec_out.16;
> >        new_output.17 = vec_out.22_273;
> >        new_output.23_274 = new_output.17;
> >     -  _275 = VEC_PERM_EXPR <q8, new_output.23_274, { 16, 1, 2, 3, 4, 5, 6, 
> > 7, 8, 9, 10, 11, 12, 13, 14, 15 }>;
> >     +  _275 = VEC_PERM_EXPR <new_output.23_274, q8, { 0, 17, 18, 19, 20, 
> > 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }>;
> >        s_output.18 = _275;
> >        q8 = s_output.18;
> >        _276 = VIEW_CONVERT_EXPR<vector(8) signed short>(q8);
> > 
> > Will it be OK to just commit the obvious patch to adjust the tree dump
> > scanning, or is something actually wrong?  (As you can tell, so far I
> > didn't look up what that actually means -- hoping you can tell from the
> > little bit of context?)
> 
> Yeah, this is because of a new canonicalization suggested by Richard
> to have the first element in the permutation come from the first vector.

Committed to trunk in r271540 "[PR90510] Adjust
'brig.dg/test/gimple/packed.hsail'", see attached.


Grüße
 Thomas


>From 247b99d6d505b80d703bc76c93cb53555ac35ff9 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 23 May 2019 08:22:56 +0000
Subject: [PATCH] [PR90510] Adjust 'brig.dg/test/gimple/packed.hsail'

... for r271463 "Fix PR90510, VEC_PERM -> BIT_INSERT folding".

	gcc/testsuite/
	PR middle-end/90510
	* brig.dg/test/gimple/packed.hsail: Adjust.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271540 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog                        | 5 +++++
 gcc/testsuite/brig.dg/test/gimple/packed.hsail | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5717f1a7162d..f3a401fe8be0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-05-23  Thomas Schwinge  <tho...@codesourcery.com>
+
+	PR middle-end/90510
+	* brig.dg/test/gimple/packed.hsail: Adjust.
+
 2019-05-23  Jakub Jelinek  <ja...@redhat.com>
 
 	* g++.dg/cpp2a/is-constant-evaluated8.C: New test.
diff --git a/gcc/testsuite/brig.dg/test/gimple/packed.hsail b/gcc/testsuite/brig.dg/test/gimple/packed.hsail
index 4cba5fcbba0e..9137490b2ab0 100644
--- a/gcc/testsuite/brig.dg/test/gimple/packed.hsail
+++ b/gcc/testsuite/brig.dg/test/gimple/packed.hsail
@@ -64,7 +64,7 @@ prog kernel &Kernel(kernarg_u64 %input_ptr, kernarg_u64 %output_ptr)
 /* { dg-final { scan-tree-dump "_\[0-9\]+ = q2 \\\+ q3;" "gimple" } } */
 
 /* Insert the lowest element of the result to the lowest element of the result register. */
-/* { dg-final { scan-tree-dump "= VEC_PERM_EXPR <\[a-z0-9_\]+, new_output.\[0-9\]+_\[0-9\]+, { 16, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }>;" "gimple" } } */
+/* { dg-final { scan-tree-dump "= VEC_PERM_EXPR <new_output.\[0-9\]+_\[0-9\]+, \[a-z0-9_\]+, { 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }>;" "gimple" } } */
 
 /* FIXME */
 /* { dg-final { scan-tree-dump "q4 = \(VIEW_CONVERT_EXPR<uint128_t>\\\()?s_output.\[0-9\]+\(_\[0-9\]+\)*\\\)?;" "gimple" } } */
-- 
2.17.1

Reply via email to