From patchwork Fri Jan 29 18:05:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 575784 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 5F38D140BED for ; Sat, 30 Jan 2016 05:05:52 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=bGH7sbix; 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:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=WvSYQAUKRekp0AcBxqA6hv8+2Q/ZA/5zuk9/5NH06joZCbPge1 9p0oipKU5evB/eR1m3O6SqLOD8lIjuhWjR0rqdwhxJTIP3VedbXoVjboTIA+1Apd LkZkjf+VVBXPGOQF8ZBZrJXCU5nEfEqK/1hqzkBLAanAk0J0h+b3vQ+v4= 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:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=/FCju86nfKY2j6J8CHma4nhnh70=; b=bGH7sbixOAB6zELoPkbe LuiB7XJOy9ZBxKO58rs/0mqoPNN6ewlQq6MP3eQITmuQHS+oAwPTI9dObOf7HZYp YUqBY7s7E1ZTXTr+3N+VwKSmjrXOFPoLN8fNuZXQLW7uQn3TspZgBESOiT6IPNK5 SjdUa6y7Utj8cvC7XUS+Hg8= Received: (qmail 120355 invoked by alias); 29 Jan 2016 18:05:45 -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 120334 invoked by uid 89); 29 Jan 2016 18:05:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Hx-languages-length:3004 X-HELO: mga01.intel.com Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 29 Jan 2016 18:05:43 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 29 Jan 2016 10:05:42 -0800 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([172.25.70.52]) by fmsmga001.fm.intel.com with ESMTP; 29 Jan 2016 10:05:42 -0800 Received: by gnu-6.sc.intel.com (Postfix, from userid 1000) id 43E1620010B; Fri, 29 Jan 2016 10:05:42 -0800 (PST) Date: Fri, 29 Jan 2016 10:05:42 -0800 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Cc: Vladimir Makarov Subject: [commited, PATCH] PR target/69530: [6 Regression] ICE: SIGSEGV Message-ID: <20160129180542.GA11440@intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) in ix86_split_long_move (i386.c:24353) with -fno-split-wide-types -mavx Reply-To: "H.J. Lu" r229087, which caused PR 69530, was supposed to fix PR 67609. r229458 has made r229087 unnecessary. Approved by Vladimir in PR 69530. Checked into trunk. H.J. --- gcc/ PR target/69530 * lra-splill.c (lra_final_code_change): Revert r229087 by removing all sub-registers. gcc/testsuite/ PR target/69530 * gcc.target/i386/pr69530.c: New test. --- gcc/lra-spills.c | 46 ++++++--------------------------- gcc/testsuite/gcc.target/i386/pr69530.c | 11 ++++++++ 2 files changed, 19 insertions(+), 38 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr69530.c diff --git a/gcc/lra-spills.c b/gcc/lra-spills.c index fa0a579..5709ef1 100644 --- a/gcc/lra-spills.c +++ b/gcc/lra-spills.c @@ -760,44 +760,14 @@ lra_final_code_change (void) struct lra_static_insn_data *static_id = id->insn_static_data; bool insn_change_p = false; - - for (i = id->insn_static_data->n_operands - 1; i >= 0; i--) - { - if (! DEBUG_INSN_P (insn) && static_id->operand[i].is_operator) - continue; - - rtx op = *id->operand_loc[i]; - - if (static_id->operand[i].type == OP_OUT - && GET_CODE (op) == SUBREG && REG_P (SUBREG_REG (op)) - && ! LRA_SUBREG_P (op)) - { - hard_regno = REGNO (SUBREG_REG (op)); - /* We can not always remove sub-registers of - hard-registers as we may lose information that - only a part of registers is changed and - subsequent optimizations may do wrong - transformations (e.g. dead code eliminations). - We can not also keep all sub-registers as the - subsequent optimizations can not handle all such - cases. Here is a compromise which works. */ - if ((GET_MODE_SIZE (GET_MODE (op)) - < GET_MODE_SIZE (GET_MODE (SUBREG_REG (op)))) - && (hard_regno_nregs[hard_regno][GET_MODE (SUBREG_REG (op))] - == hard_regno_nregs[hard_regno][GET_MODE (op)]) -#ifdef STACK_REGS - && (hard_regno < FIRST_STACK_REG - || hard_regno > LAST_STACK_REG) -#endif - ) - continue; - } - if (alter_subregs (id->operand_loc[i], ! DEBUG_INSN_P (insn))) - { - lra_update_dup (id, i); - insn_change_p = true; - } - } + + for (i = id->insn_static_data->n_operands - 1; i >= 0; i--) + if ((DEBUG_INSN_P (insn) || ! static_id->operand[i].is_operator) + && alter_subregs (id->operand_loc[i], ! DEBUG_INSN_P (insn))) + { + lra_update_dup (id, i); + insn_change_p = true; + } if (insn_change_p) lra_update_operator_dups (id); } diff --git a/gcc/testsuite/gcc.target/i386/pr69530.c b/gcc/testsuite/gcc.target/i386/pr69530.c new file mode 100644 index 0000000..9146d1d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69530.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O -fno-forward-propagate -fno-split-wide-types -mavx " } */ + +typedef unsigned __int128 v32u128 __attribute__ ((vector_size (32))); + +v32u128 +foo (v32u128 v32u128_0) +{ + v32u128_0[0] *= v32u128_0[1]; + return v32u128_0; +}