diff mbox series

[committed,amdgcn] Fix unrecognised instruction

Message ID 2c48cb10-41db-91f2-a0d2-09f8ae95adaf@codesourcery.com
State New
Headers show
Series [committed,amdgcn] Fix unrecognised instruction | expand

Commit Message

Andrew Stubbs Dec. 6, 2019, 5:57 p.m. UTC
Hi all,

I've committed the attached to fix a failure-to-assemble bug that can 
occur in some vectorized code.  This has been hidden for a long time 
because sub-word vectors were disabled on GCN, but this is no longer the 
case.

The gather load instructions had the suffixes for store, which didn't 
assemble well.  E.g. it had 'flat_load_short', instead of 
'flat_load_ustore'.

This fixes about 39 tests in vect.exp.

Comments

Andrew Stubbs Dec. 9, 2019, 2:51 p.m. UTC | #1
On 06/12/2019 17:57, Andrew Stubbs wrote:
> Hi all,
> 
> I've committed the attached to fix a failure-to-assemble bug that can 
> occur in some vectorized code.  This has been hidden for a long time 
> because sub-word vectors were disabled on GCN, but this is no longer the 
> case.
> 
> The gather load instructions had the suffixes for store, which didn't 
> assemble well.  E.g. it had 'flat_load_short', instead of 
> 'flat_load_ustore'.

That should have been "ushort".

> 
> This fixes about 39 tests in vect.exp.

And this patch does the same for 'global_load_ushort', which fixes the 
same tests in the GCN5 multilibs.

Andrew
diff mbox series

Patch

Fix unrecognised GCN instruction.

2019-12-06  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/gcn/gcn-valu.md (gather<mode>_insn_1offset<exec>): Use %o
	in the asm output.

diff --git a/gcc/config/gcn/gcn-valu.md b/gcc/config/gcn/gcn-valu.md
index 90f0dcf3106..95e0731a374 100644
--- a/gcc/config/gcn/gcn-valu.md
+++ b/gcc/config/gcn/gcn-valu.md
@@ -716,10 +716,10 @@ 
     if (AS_FLAT_P (as))
       {
 	if (TARGET_GCN5_PLUS)
-	  sprintf (buf, "flat_load%%s0\t%%0, %%1 offset:%%2%s\;s_waitcnt\t0",
+	  sprintf (buf, "flat_load%%o0\t%%0, %%1 offset:%%2%s\;s_waitcnt\t0",
 		   glc);
 	else
-	  sprintf (buf, "flat_load%%s0\t%%0, %%1%s\;s_waitcnt\t0", glc);
+	  sprintf (buf, "flat_load%%o0\t%%0, %%1%s\;s_waitcnt\t0", glc);
       }
     else if (AS_GLOBAL_P (as))
       sprintf (buf, "global_load%%s0\t%%0, %%1, off offset:%%2%s\;"