From patchwork Mon Oct 10 15:23:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 680482 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3st4rg7125z9ryk for ; Tue, 11 Oct 2016 03:12:03 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=FcV2AEE+; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-date:resent-message-id:resent-to:from:date :subject:to:message-id; q=dns; s=default; b=pzl2k1hn1odO3MwSQgL1 ceiaan1xLWB175lWelyG7AvOmWjiVdgshN1N/W6sruSOg18rreVRApFrgsxasiPh +7FZG/7fDYCTqsXzlI67wtkP/j7MfxwIYZQr5sCt7WBcdk2mVC2QqG0rh1hsAn96 VwOZQOH9Ok7g7wIbgj2ESyk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-date:resent-message-id:resent-to:from:date :subject:to:message-id; s=default; bh=E9wy2NwPaBKE2ZKEJTfaz3gHYX g=; b=FcV2AEE+JSgRNd1CnxWem5gKJUmICK5upFxCRqzhPGn29l3AAa4A/S1nzs UnR+R0AC5HSLWwT1Jlj7zmBy0H1FFHLszVpCJgzJGc8anXkCL+IyIw/Mf2b/0Km7 Ws7l6+Hh9uiAy1d39nYsUvLF0XiVwMJhK0s4ESczsaU2OxN30= Received: (qmail 89605 invoked by alias); 10 Oct 2016 16:09:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 89557 invoked by uid 89); 10 Oct 2016 16:09:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=BAYES_00, SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*MI:eggs, H*M:eggs, complaint, HX-detected-operating-system:timestamps X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Oct 2016 16:09:38 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btd8i-0002L2-Iv for gcc-patches@gcc.gnu.org; Mon, 10 Oct 2016 12:09:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:45035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btd8i-0002KX-Bj for gcc-patches@gcc.gnu.org; Mon, 10 Oct 2016 12:09:20 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 635B8ADCA for ; Mon, 10 Oct 2016 16:09:17 +0000 (UTC) Resent-From: Martin Jambor Resent-Date: Mon, 10 Oct 2016 18:09:17 +0200 Resent-Message-ID: <20161010160917.6enaxf5u6zvnwy4z@virgil.suse.cz> Resent-To: GCC Patches From: Martin Jambor Date: Mon, 10 Oct 2016 17:23:30 +0200 Subject: [hsa-branch 9/9] Fix another finalizer type complaint To: GCC Patches X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] Message-ID: X-Received-From: 195.135.220.15 X-IsSubscribed: yes 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 * 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 (src)) gcc_assert (hsa_type_bit_size (dest->m_type) == hsa_type_bit_size (sreg->m_type));