From patchwork Sun Aug 30 09:21:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1353917 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=O1T3dDio; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BfSWd4T5Xz9sSJ for ; Sun, 30 Aug 2020 19:21:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4E6DA3844012; Sun, 30 Aug 2020 09:21:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E6DA3844012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598779288; bh=yyb3PfzcGWeJR8PhcVg4wgi8S30YbN9UEKg0f3PIw1I=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=O1T3dDioy2sZjJ7U1ndvnC5cKC+E/S4Iqbj9WdCVt09C9MQQ7n3XyV5X8NohTshhH L75Xq7u7RHjp0PDlHn1tomQyVFvMNn1qVaA0jHrydfSPRxMvw9CuiV8OTxLzHG4cQV BaCAY/DwSoRPh9HqNYeTxsLhXej3HSdo0hmKf95M= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 8E6793857038 for ; Sun, 30 Aug 2020 09:21:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8E6793857038 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-cBBhwwQkO7C6vkeIaZNvDQ-1; Sun, 30 Aug 2020 05:21:22 -0400 X-MC-Unique: cBBhwwQkO7C6vkeIaZNvDQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 32EA71074647; Sun, 30 Aug 2020 09:21:21 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-113-115.ams2.redhat.com [10.36.113.115]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C38477838E; Sun, 30 Aug 2020 09:21:20 +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 07U9LHof014336; Sun, 30 Aug 2020 11:21:17 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 07U9LGrG014335; Sun, 30 Aug 2020 11:21:16 +0200 Date: Sun, 30 Aug 2020 11:21:16 +0200 To: Uros Bizjak Subject: [PATCH] x86: Fix up ssse3_pshufbv8qi splitter Message-ID: <20200830092116.GE18149@tucnak> MIME-Version: 1.0 User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi! The constant pool size optimization I was testing resulted in various ICEs in gcc.target/i386/ testsuite, the problem is that the ssse3_pshufbv8qi splitter emits invalid RTL, in V4SImode 0xf7f7f7f7 CONST_INTs shouldn't appear, instead they should have been -0x8080809 (0xf7f7f7f7 sign extended into 64 bits). Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2020-08-30 Jakub Jelinek * config/i386/sse.md (ssse3_pshufbv8qi): Use gen_int_mode instead of GEN_INT, and ix86_build_const_vector instead of gen_rtvec and gen_rtx_CONT_VECTOR. Jakub --- gcc/config/i386/sse.md.jj 2020-08-25 13:46:35.669087203 +0200 +++ gcc/config/i386/sse.md 2020-08-29 10:23:57.747456523 +0200 @@ -16938,11 +16938,8 @@ (define_insn_and_split "ssse3_pshufbv8qi GET_MODE (operands[2])); operands[4] = lowpart_subreg (V16QImode, operands[3], GET_MODE (operands[3])); - rtvec par = gen_rtvec (4, GEN_INT (0xf7f7f7f7), - GEN_INT (0xf7f7f7f7), - GEN_INT (0xf7f7f7f7), - GEN_INT (0xf7f7f7f7)); - rtx vec_const = gen_rtx_CONST_VECTOR (V4SImode, par); + rtx vec_const = ix86_build_const_vector (V4SImode, true, + gen_int_mode (0xf7f7f7f7, SImode)); operands[5] = force_const_mem (V4SImode, vec_const); } [(set_attr "mmx_isa" "native,sse_noavx,avx")