Rather obvious fix for a mistake of mine. Due to copy'n'paste,
I managed to set sram-ecc to unsupported - instead of any
for gfx9-4-generic.

gfx9-4-generic was added in r16-1393-g37b454b7e171bd

(The specific devices gfx942 and gfx950 are fine.)

Result: When compiling with default option, it just compiles.
However, with '-g' there is a linker error ("incompatible sramecc"),
and, likewise, an assembly error when using explicitly -msram-ecc=on/off
as then the command line args and the .amdgcn_target have a mismatch.

OK for mainline? OK for backporting to GCC 16?

Tobias
gcn: Fix sram-ecc default for gfx9-4-generic

gcc/ChangeLog:

	* config/gcn/gcn-devices.def (gfx9-4-generic): Set sram-ecc
	default to HSACO_ATTR_ANY.

 gcc/config/gcn/gcn-devices.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/gcn/gcn-devices.def b/gcc/config/gcn/gcn-devices.def
index f8b36b51810..ece60377412 100644
--- a/gcc/config/gcn/gcn-devices.def
+++ b/gcc/config/gcn/gcn-devices.def
@@ -206,7 +206,7 @@ GCN_DEVICE(gfx9-generic, GFX9_GENERIC, 0x051, ISA_GCN5,
 
 GCN_DEVICE(gfx9-4-generic, GFX9_4_GENERIC, 0x05f, ISA_CDNA3,
 	   /* XNACK default */ HSACO_ATTR_ANY,
-	   /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
+	   /* SRAM_ECC default */ HSACO_ATTR_ANY,
 	   /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
 	   /* CU mode */ HSACO_ATTR_UNSUPPORTED,
 	   /* Max ISA VGPRs */ 256,

Reply via email to