public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* GCN: Enable effective-target 'vect_early_break', 'vect_early_break_hw'
@ 2024-01-12 14:02 Thomas Schwinge
  2024-03-21 10:41 ` Thomas Schwinge
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schwinge @ 2024-01-12 14:02 UTC (permalink / raw)
  To: Tamar Christina, gcc-patches, Andrew Stubbs, Julian Brown

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

Hi!

OK to push the attached
"GCN: Enable effective-target 'vect_early_break', 'vect_early_break_hw'"?
("The relevant test cases are all-PASS with just [two] exceptions, to be
looked into individually, later on."  I'm not currently planning to look
into that.)


Grüße
 Thomas


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-GCN-Enable-effective-target-vect_early_break-vect_ea.patch --]
[-- Type: text/x-diff, Size: 2700 bytes --]

From 3193614c4f9a8032e85a4da87bde8055aeee7d7b Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue, 9 Jan 2024 10:25:48 +0100
Subject: [PATCH] GCN: Enable effective-target 'vect_early_break',
 'vect_early_break_hw'

Via XPASSing test cases after commit a657c7e3518fcfc796f223d47385cad5e97dc9a5
"testsuite: un-xfail TSVC loops that check for exit control flow vectorization":

    PASS: gcc.dg/vect/tsvc/vect-tsvc-s332.c (test for excess errors)
    PASS: gcc.dg/vect/tsvc/vect-tsvc-s332.c execution test
    [-XFAIL:-]{+XPASS:+} gcc.dg/vect/tsvc/vect-tsvc-s332.c scan-tree-dump vect "vectorized 1 loops"

    PASS: gcc.dg/vect/tsvc/vect-tsvc-s481.c (test for excess errors)
    PASS: gcc.dg/vect/tsvc/vect-tsvc-s481.c execution test
    [-XFAIL:-]{+XPASS:+} gcc.dg/vect/tsvc/vect-tsvc-s481.c scan-tree-dump vect "vectorized 1 loops"

    PASS: gcc.dg/vect/tsvc/vect-tsvc-s482.c (test for excess errors)
    PASS: gcc.dg/vect/tsvc/vect-tsvc-s482.c execution test
    [-XFAIL:-]{+XPASS:+} gcc.dg/vect/tsvc/vect-tsvc-s482.c scan-tree-dump vect "vectorized 1 loops"

..., it became apparent that GCN, too, does support vectorization of loops with
early breaks.  The relevant test cases are all-PASS with just the following
exceptions, to be looked into individually, later on:

    PASS: gcc.dg/vect/vect-early-break_25.c (test for excess errors)
    PASS: gcc.dg/vect/vect-early-break_25.c scan-tree-dump-times vect "vectorized 1 loops" 1
    FAIL: gcc.dg/vect/vect-early-break_25.c scan-tree-dump-times vect "Alignment of access forced using peeling" 1

    PASS: gcc.dg/vect/vect-early-break_56.c (test for excess errors)
    PASS: gcc.dg/vect/vect-early-break_56.c execution test
    XPASS: gcc.dg/vect/vect-early-break_56.c scan-tree-dump-times vect "vectorized 2 loops" 2

	gcc/testsuite/
	* lib/target-supports.exp
	(check_effective_target_vect_early_break)
	(check_effective_target_vect_early_break_hw): Enable for GCN.
---
 gcc/testsuite/lib/target-supports.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 75d1add894f..497c46de4cb 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4071,6 +4071,7 @@ proc check_effective_target_vect_early_break { } {
 	[istarget aarch64*-*-*]
 	|| [check_effective_target_arm_v8_neon_ok]
 	|| [check_effective_target_sse4]
+	|| [istarget amdgcn-*-*]
 	}}]
 }
 
@@ -4085,6 +4086,7 @@ proc check_effective_target_vect_early_break_hw { } {
 	[istarget aarch64*-*-*]
 	|| [check_effective_target_arm_v8_neon_hw]
 	|| [check_sse4_hw_available]
+	|| [istarget amdgcn-*-*]
 	}}]
 }
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* GCN: Enable effective-target 'vect_early_break', 'vect_early_break_hw'
  2024-01-12 14:02 GCN: Enable effective-target 'vect_early_break', 'vect_early_break_hw' Thomas Schwinge
@ 2024-03-21 10:41 ` Thomas Schwinge
  2024-03-21 11:18   ` Andrew Stubbs
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schwinge @ 2024-03-21 10:41 UTC (permalink / raw)
  To: Tamar Christina, gcc-patches, Andrew Stubbs

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

Hi!

On 2024-01-12T15:02:35+0100, I wrote:
> OK to push the attached
> "GCN: Enable effective-target 'vect_early_break', 'vect_early_break_hw'"?

Ping.  (Or is that not what you'd expect to see for GCN?  I haven't
checked the actual back end code...)


> ("The relevant test cases are all-PASS with just [two] exceptions, to be
> looked into individually, later on."  I'm not currently planning to look
> into that.)

(One of those actually going to be fixed by a different patch to be
posted in a moment.)


Grüße
 Thomas



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-GCN-Enable-effective-target-vect_early_break-vect_ea.patch --]
[-- Type: text/x-diff, Size: 2700 bytes --]

From 3193614c4f9a8032e85a4da87bde8055aeee7d7b Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue, 9 Jan 2024 10:25:48 +0100
Subject: [PATCH] GCN: Enable effective-target 'vect_early_break',
 'vect_early_break_hw'

Via XPASSing test cases after commit a657c7e3518fcfc796f223d47385cad5e97dc9a5
"testsuite: un-xfail TSVC loops that check for exit control flow vectorization":

    PASS: gcc.dg/vect/tsvc/vect-tsvc-s332.c (test for excess errors)
    PASS: gcc.dg/vect/tsvc/vect-tsvc-s332.c execution test
    [-XFAIL:-]{+XPASS:+} gcc.dg/vect/tsvc/vect-tsvc-s332.c scan-tree-dump vect "vectorized 1 loops"

    PASS: gcc.dg/vect/tsvc/vect-tsvc-s481.c (test for excess errors)
    PASS: gcc.dg/vect/tsvc/vect-tsvc-s481.c execution test
    [-XFAIL:-]{+XPASS:+} gcc.dg/vect/tsvc/vect-tsvc-s481.c scan-tree-dump vect "vectorized 1 loops"

    PASS: gcc.dg/vect/tsvc/vect-tsvc-s482.c (test for excess errors)
    PASS: gcc.dg/vect/tsvc/vect-tsvc-s482.c execution test
    [-XFAIL:-]{+XPASS:+} gcc.dg/vect/tsvc/vect-tsvc-s482.c scan-tree-dump vect "vectorized 1 loops"

..., it became apparent that GCN, too, does support vectorization of loops with
early breaks.  The relevant test cases are all-PASS with just the following
exceptions, to be looked into individually, later on:

    PASS: gcc.dg/vect/vect-early-break_25.c (test for excess errors)
    PASS: gcc.dg/vect/vect-early-break_25.c scan-tree-dump-times vect "vectorized 1 loops" 1
    FAIL: gcc.dg/vect/vect-early-break_25.c scan-tree-dump-times vect "Alignment of access forced using peeling" 1

    PASS: gcc.dg/vect/vect-early-break_56.c (test for excess errors)
    PASS: gcc.dg/vect/vect-early-break_56.c execution test
    XPASS: gcc.dg/vect/vect-early-break_56.c scan-tree-dump-times vect "vectorized 2 loops" 2

	gcc/testsuite/
	* lib/target-supports.exp
	(check_effective_target_vect_early_break)
	(check_effective_target_vect_early_break_hw): Enable for GCN.
---
 gcc/testsuite/lib/target-supports.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 75d1add894f..497c46de4cb 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4071,6 +4071,7 @@ proc check_effective_target_vect_early_break { } {
 	[istarget aarch64*-*-*]
 	|| [check_effective_target_arm_v8_neon_ok]
 	|| [check_effective_target_sse4]
+	|| [istarget amdgcn-*-*]
 	}}]
 }
 
@@ -4085,6 +4086,7 @@ proc check_effective_target_vect_early_break_hw { } {
 	[istarget aarch64*-*-*]
 	|| [check_effective_target_arm_v8_neon_hw]
 	|| [check_sse4_hw_available]
+	|| [istarget amdgcn-*-*]
 	}}]
 }
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GCN: Enable effective-target 'vect_early_break', 'vect_early_break_hw'
  2024-03-21 10:41 ` Thomas Schwinge
@ 2024-03-21 11:18   ` Andrew Stubbs
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Stubbs @ 2024-03-21 11:18 UTC (permalink / raw)
  To: Thomas Schwinge, Tamar Christina, gcc-patches

On 21/03/2024 10:41, Thomas Schwinge wrote:
> Hi!
> 
> On 2024-01-12T15:02:35+0100, I wrote:
>> OK to push the attached
>> "GCN: Enable effective-target 'vect_early_break', 'vect_early_break_hw'"?
> 
> Ping.  (Or is that not what you'd expect to see for GCN?  I haven't
> checked the actual back end code...)

Sorry, I missed this during the transition.

I think early break just means conditional/masked vectors, so it should 
work.

OK to commit.

>> ("The relevant test cases are all-PASS with just [two] exceptions, to be
>> looked into individually, later on."  I'm not currently planning to look
>> into that.)
> 
> (One of those actually going to be fixed by a different patch to be
> posted in a moment.)

Nice. :)

Andrew


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-21 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-12 14:02 GCN: Enable effective-target 'vect_early_break', 'vect_early_break_hw' Thomas Schwinge
2024-03-21 10:41 ` Thomas Schwinge
2024-03-21 11:18   ` Andrew Stubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).