From patchwork Wed Jun 21 18:27:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 779060 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 3wtCr902m9z9s5L for ; Thu, 22 Jun 2017 04:27:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="e3Sf/jfh"; 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:reply-to:mime-version :content-type; q=dns; s=default; b=XM93qwSGRjwFoSltCLmWkgm62kZU2 Eu42RbyFi4kp+0jZO1CFHCQm2ALdMUKcjHU9lxeDGHdCxLiy9pq0C/7Uki/vM6oF P1n6sB1i3n5TFyMtnGtAe9LrIlEcCxbzB2DLnDJpkEIYj+DQ5dJYEZX0dPhAUI7n LDVbPpLpZ6axgo= 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:reply-to:mime-version :content-type; s=default; bh=pijRcWX0Tsei2lRSpoQtuEiozTg=; b=e3S f/jfhuzv0+CjGLPGqEF4iK+D6PHcttKCYgtZDFcxiYVu1AyJjABPgr8vOn1ufF6o Qz6kLRG/WtkEqXlONg5ibMJ/5kJnVY6XtvOcpMz22NVqPx95cB7xGdwU0aQZtHqF tPvk3oUphGgOqmTH9y7h3MM0WQYzrwzVFzVA/NV0= Received: (qmail 105327 invoked by alias); 21 Jun 2017 18:27: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 104712 invoked by uid 89); 21 Jun 2017 18:27:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.7 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, MEDICAL_SUBJECT, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Jun 2017 18:27:33 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 559F985A05; Wed, 21 Jun 2017 18:27:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 559F985A05 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 559F985A05 Received: from tucnak.zalov.cz (ovpn-116-143.ams2.redhat.com [10.36.116.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD61C1841C; Wed, 21 Jun 2017 18:27:31 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v5LIRSHY012112; Wed, 21 Jun 2017 20:27:29 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v5LIRRge012111; Wed, 21 Jun 2017 20:27:27 +0200 Date: Wed, 21 Jun 2017 20:27:27 +0200 From: Jakub Jelinek To: Uros Bizjak Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix -Wmaybe-uninitialized warning on sse.md (PR target/81151) Message-ID: <20170621182727.GU2123@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes Hi! This expander has a gap in between the operands and match_dup indexes, which results in genemit generating: operand2 = operands[2]; (void) operand2; where operands[2] has not been initialized. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2017-06-21 Jakub Jelinek PR target/81151 * config/i386/sse.md (round2): Renumber match_dup and operands indexes to avoid gap between operands and match_dups. Jakub --- gcc/config/i386/sse.md.jj 2017-05-24 11:59:06.000000000 +0200 +++ gcc/config/i386/sse.md 2017-06-21 14:10:02.768078833 +0200 @@ -15638,13 +15638,13 @@ (define_insn "sse4_1_round")]) (define_expand "round2" - [(set (match_dup 4) + [(set (match_dup 3) (plus:VF (match_operand:VF 1 "register_operand") - (match_dup 3))) + (match_dup 2))) (set (match_operand:VF 0 "register_operand") (unspec:VF - [(match_dup 4) (match_dup 5)] + [(match_dup 3) (match_dup 4)] UNSPEC_ROUND))] "TARGET_ROUND && !flag_trapping_math" { @@ -15664,11 +15664,11 @@ (define_expand "round2" vec_half = ix86_build_const_vector (mode, true, half); vec_half = force_reg (mode, vec_half); - operands[3] = gen_reg_rtx (mode); - emit_insn (gen_copysign3 (operands[3], vec_half, operands[1])); + operands[2] = gen_reg_rtx (mode); + emit_insn (gen_copysign3 (operands[2], vec_half, operands[1])); - operands[4] = gen_reg_rtx (mode); - operands[5] = GEN_INT (ROUND_TRUNC); + operands[3] = gen_reg_rtx (mode); + operands[4] = GEN_INT (ROUND_TRUNC); }) (define_expand "round2_sfix"