From patchwork Tue Jul 22 04:43:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 372350 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 704AF14013B for ; Tue, 22 Jul 2014 14:46:44 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=N/S7A1Gonf0L heMrJOPLHf7nR3DAjkPZ3iztIzLkPKoOspnuAA3UuYUSOyx6OHW/bOk8Sq4vS95X 51zvmCPwSe8Q+URDU89won27/UKPRfP7+Mrxabf3v0hRUd8wNOlR8f+MTVcf9Ndy P2G9o9l6CgIax4h3+hOiIy0elQ1i1c0= 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:from :to:cc:subject:date:message-id; s=default; bh=uRHUiTP4DUtRFVV2dZ 7AnmnvRVk=; b=N8YXZ5TY6tipFOdK23wzezB0cVn7DUocrHkGHKiRkTkTjDQG+T rpvTqz/jjf1Xkh2l2hUvaVeTbXunBBLyTu+CAJQWDKJppwRYGdG6n+WaOJtCh3ZC Jwnkj37uDjuyHcHLTDaS/EflOn/Rys/a08/0sR4r47E7nn3GDUNRkrulE= Received: (qmail 31148 invoked by alias); 22 Jul 2014 04:46:36 -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 31125 invoked by uid 89); 22 Jul 2014 04:46:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 22 Jul 2014 04:46:31 +0000 Received: from gcc1-power7.osuosl.org (localhost [127.0.0.1]) by gcc1-power7.osuosl.org (8.14.6/8.14.6) with ESMTP id s6M4h9S5005584; Mon, 21 Jul 2014 21:43:09 -0700 Received: (from segher@localhost) by gcc1-power7.osuosl.org (8.14.6/8.14.6/Submit) id s6M4h79e002958; Mon, 21 Jul 2014 21:43:07 -0700 From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH] rs6000: fix for PR61396 (wide-int fallout) Date: Mon, 21 Jul 2014 21:43:02 -0700 Message-Id: <29ef2867e3061b76859caa5725c1de44ea85aa52.1406003150.git.segher@kernel.crashing.org> X-IsSubscribed: yes CONSTANT_P is true for more than just all kinds of constant number. This patch undoes that part of the wide-int patches. Bootstrapped and tested on powerpc64-linux, -m64,-m32,-m32/-mpowerpc64. No regressions (and the testcase mentioned in the PR is fixed, of course). Okay to apply? Segher 2014-07-21 Segher Boessenkool gcc/ PR target/61396 * config/rs6000/rs6000.c (paired_expand_vector_init): Only allow constant numbers, not general constants. (rs6000_expand_vector_init): Ditto. --- gcc/config/rs6000/rs6000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 4547ae5..682fe42 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5318,7 +5318,7 @@ paired_expand_vector_init (rtx target, rtx vals) for (i = 0; i < n_elts; ++i) { x = XVECEXP (vals, 0, i); - if (!CONSTANT_P (x)) + if (!(CONST_SCALAR_INT_P (x) || CONST_DOUBLE_P (x) || CONST_FIXED_P (x))) ++n_var; } if (n_var == 0) @@ -5470,7 +5470,7 @@ rs6000_expand_vector_init (rtx target, rtx vals) for (i = 0; i < n_elts; ++i) { x = XVECEXP (vals, 0, i); - if (!CONSTANT_P (x)) + if (!(CONST_SCALAR_INT_P (x) || CONST_DOUBLE_P (x) || CONST_FIXED_P (x))) ++n_var, one_var = i; else if (x != CONST0_RTX (inner_mode)) all_const_zero = false;