public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [hsa-branch 9/9] Fix another finalizer type complaint
@ 2016-10-10 16:09 Martin Jambor
  0 siblings, 0 replies; only message in thread
From: Martin Jambor @ 2016-10-10 16:09 UTC (permalink / raw)
  To: GCC Patches

Hi,

the subsequent patch deals with a finalizer error issued when we ave a
register-register move of an HSAIL vector type.  Apparently, such a move
must obey the same rules as vector loads and stores.

Committed to the branch, queued for merge to trunk soon.
Thanks,

Martin

2016-10-03  Martin Jambor  <mjambor@suse.cz>

	* hsa-gen.c (hsa_build_append_simple_mov): Use mem_type_for_type.
---
 gcc/hsa-gen.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c
index fd0dbcd..0b25f66 100644
--- a/gcc/hsa-gen.c
+++ b/gcc/hsa-gen.c
@@ -2227,8 +2227,10 @@ hsa_reg_or_immed_for_gimple_op (tree op, hsa_bb *hbb)
 void
 hsa_build_append_simple_mov (hsa_op_reg *dest, hsa_op_base *src, hsa_bb *hbb)
 {
-  hsa_insn_basic *insn = new hsa_insn_basic (2, BRIG_OPCODE_MOV, dest->m_type,
-					     dest, src);
+  /* Moves of packed data between registers need to adhere to the same type
+     rules like when dealing with memory.  */
+  BrigType16_t tp = mem_type_for_type (dest->m_type);
+  hsa_insn_basic *insn = new hsa_insn_basic (2, BRIG_OPCODE_MOV, tp, dest, src);
   if (hsa_op_reg *sreg = dyn_cast <hsa_op_reg *> (src))
     gcc_assert (hsa_type_bit_size (dest->m_type)
 		== hsa_type_bit_size (sreg->m_type));
-- 
2.10.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-10 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10 16:09 [hsa-branch 9/9] Fix another finalizer type complaint Martin Jambor

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).