[committed,nvptx,libgomp] Update pr85381-{2,4}.c test-cases

Message ID de112548-506a-fe58-9e1d-88309b5c5c6c@suse.de
State New
Headers show
Series
  • [committed,nvptx,libgomp] Update pr85381-{2,4}.c test-cases
Related show

Commit Message

Tom de Vries June 15, 2019, 12:05 p.m.
[ was: Re: [PATCH V8] Remove empty loop with assumed finiteness (PR
tree-optimization/89713) ]

On 12-06-19 11:42, Richard Biener wrote:
> On Tue, Jun 11, 2019 at 4:40 AM Feng Xue OS <fxue@os.amperecomputing.com> wrote:

>>

>> Reformat to comply with gcc coding style.

> 

> OK for trunk.

> 


Committed patch to update nvptx test-cases.

Thanks,
- Tom

Patch

[nvptx, libgomp] Update pr85381-{2,4}.c test-cases

After the fix for "PR tree-optimization/89713 - Assume loop with an exit is
finite" ( r272234 ) empty oacc loops are removed before expand.

Update pr85381-{2,4}.c accordingly.

2019-06-15  Tom de Vries  <tdevries@suse.de>

	PR tree-optimization/89713
	* testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Expect no bar.sync.
	* testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Same.

---
 .../testsuite/libgomp.oacc-c-c++-common/pr85381-2.c  | 20 +-------------------
 .../testsuite/libgomp.oacc-c-c++-common/pr85381-4.c  |  5 +----
 2 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c
index 6570c64afff..2cb5b95949d 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-2.c
@@ -15,22 +15,4 @@  main (void)
   return 0;
 }
 
-/* Todo: Boths bar.syncs can be removed.
-   Atm we generate this dead code inbetween forked and joining:
-
-                     mov.u32 %r28, %ntid.y;
-                     mov.u32 %r29, %tid.y;
-                     add.u32 %r30, %r29, %r29;
-                     setp.gt.s32     %r31, %r30, 19;
-             @%r31   bra     $L2;
-                     add.u32 %r25, %r28, %r28;
-                     mov.u32 %r24, %r30;
-     $L3:
-                     add.u32 %r24, %r24, %r25;
-                     setp.le.s32     %r33, %r24, 19;
-             @%r33   bra     $L3;
-     $L2:
-
-   so the loop is not recognized as empty loop (which we detect by seeing if
-   joining immediately follows forked).  */
-/* { dg-final { scan-assembler-times "bar.sync" 2 } } */
+/* { dg-final { scan-assembler-times "bar.sync" 0 } } */
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c
index d955d79718d..e8a433ffc0a 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr85381-4.c
@@ -21,7 +21,4 @@  main (void)
   return 0;
 }
 
-/* Atm, %ntid.y is broadcast from one loop to the next, so there are 2 bar.syncs
-   for that (the other two are there for the same reason as in pr85381-2.c).
-   Todo: Recompute %ntid.y instead of broadcasting it. */
-/* { dg-final { scan-assembler-times "bar.sync" 4 } } */
+/* { dg-final { scan-assembler-times "bar.sync" 0 } } */