From patchwork Mon Nov 27 13:38:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 170138 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3117336vqx; Mon, 27 Nov 2023 05:39:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IExmwpFZsTrQ3HRt4YjKzn7WrId84OiBPxJZ/+LBP2uRbLID3h1XeWLKfJj5MsnQ0iS4Txu X-Received: by 2002:a05:6214:420a:b0:67a:2237:c319 with SMTP id nd10-20020a056214420a00b0067a2237c319mr8992293qvb.65.1701092358725; Mon, 27 Nov 2023 05:39:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701092358; cv=pass; d=google.com; s=arc-20160816; b=kWKV9EEVYiyDLY3/e1zFZNxD/1CrY71OMUJXg4xtHE1spQCfLKiCWcAkl6d7KKG/5R EQMUtR3EUwnBIW0hZjGQIpA95nFtnSBvCkDLhpKAW9Ndl0u7qRnBCs0M2z9UBao6sxTi F39Jto2JDYzV0NACIQV5deDCU6TGoKXYwoQ+nNucz3gRZ7Bxr72cC4cRPbz98w1eWaRF xHM9UPxLcC+gc9Nwp39zAvCuOzzpV7wCekn8YAGQg8pjznEvZZvbMP/f/Y5Z02ZPh+Ir dUpZ5xIyzopJmkuF8XH+C4H1j0cZ7GcbNrVRg+VBiZbXFlgG471N2qPL1A/97k8vDomB KSkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:from:to :content-language:user-agent:mime-version:date:message-id :ironport-sdr:arc-filter:dmarc-filter:delivered-to; bh=7+tx7gBvyzohsrjKRxLxnt0YdSR8JZCFR45Tu85HZpY=; fh=XNn3asQvIblazGK92GBt13dVv+YmGV3pBS0JC29ZQco=; b=c14HTwwF3EEAvDldeHk9XUb4b6tpmZwpHhImOox3Paw542WmRj4C49E9mPEooLCOmw kX9sFAM2eCk/ndAjE7A6xUEPO0LVoA5QxpWuTycGin9osLxYaiivRMq+9YTU4T03hzpS JCwqOueqBJkd4eS9SrmwwQzTCPnzis6BZz+8kFh5v3B/I+QHrr1ROu5lG11H2WO0CTN1 Nzm8TtltaHwxkM9XGh1dGNDWLQhYvfzYKP4Z6oi9LP2Ooa1GXVpJGd84AVwhj+rXWIKQ cVYDhTs74HLDoxJPOEkLQzIrsBQpEa9+oDtzSt75LG1CdzS6HgFJOGfAtUToTDJS6LhE qJGQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p12-20020ad451cc000000b0067a3593850asi4071346qvq.153.2023.11.27.05.39.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 05:39:18 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7C3303858006 for ; Mon, 27 Nov 2023 13:39:18 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id ACA503858430 for ; Mon, 27 Nov 2023 13:38:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ACA503858430 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ACA503858430 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.129.153 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701092335; cv=none; b=pKPDnsEptQPP3RQq/W28xbs2SIebP3IgTDraG8u7mZE/Sskcc2gh7MbduQRGosWIP/38kGbaBgpctI3qvJzUbiEEJcszvK3gt6ncbIQWL9lLyW5Tr0ismEYc5bh/XrwWmsAynhJ7BZa+Y+ok6na2MrBAku0p4AeZE6pFhtfGsbM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701092335; c=relaxed/simple; bh=YRcI+r0SHySftsMlYaqY9LL1h1/pI7QGvi6MUjkNg1Y=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=EO2shlMgoURe/eFIYnty8ng1bVwf0xyJQpBkZ2o/HJcXsUn+5dN1n4ed79Jxf6UIjhm62boHJhCD5+LmtLVtUynHNY/DPMXweTBdkfp9mgWvNeDxbBfoPjzsC2roditTioFLkgw7wfaoHQ78l6Y8qvb9jY4kviqywT2AW+1mnic= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: +Ya3G8F9T6SW96LqoCn6fA== X-CSE-MsgGUID: Nlu2YENRTE+jVQvKwuQMIA== X-IronPort-AV: E=Sophos;i="6.04,231,1695715200"; d="scan'208";a="26879326" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 27 Nov 2023 05:38:52 -0800 IronPort-SDR: UHemlP3hBQCEU/bAjCIO8dyJExNUEOEHmLArqlN5RrCzR/GogNG1f37q/AyJFryZ3DO79VnTwd HzrJVMiuHAHW+jOlGYMYNxKYV6TkjrbzV7V6RqfvX3K79Ms3P9mOdJxznG5WYTMLTOSA/9TdHS griCwgQHQCLiWLfYxhmk+uva7aoGszNnUnKreNfbl8RnLqwaPrL+ufG+5RHALaeQBw3rZM2BYD zVvA0+rptbmZ5rwTMFV99Qhb/fmiI3FBLU8c3qeHDNdmpwafW+oqYrTH6XIaMfLjDAvn5G629y F6U= Message-ID: <4f16e1fb-e42b-4aca-b675-a37e8fcec48b@codesourcery.com> Date: Mon, 27 Nov 2023 13:38:48 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-GB To: "gcc-patches@gcc.gnu.org" From: Andrew Stubbs Subject: [committed] amdgcn: Disallow TImode vector permute X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783724621571101819 X-GMAIL-MSGID: 1783724621571101819 This fixes an ICE that affects some testsuite compiles that use vector extensions, but probably not much real code (certainly not for offloading). Andrew amdgcn: Disallow TImode vector permute We don't support it and it doesn't happen without vector extensions, so just remove the unhandled case. Fixes gcc.dg/pr78575.c failure. gcc/ChangeLog: * config/gcn/gcn.cc (gcn_vectorize_vec_perm_const): Disallow TImode. diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc index 52c8a0e409c..22d2b6ebf6d 100644 --- a/gcc/config/gcn/gcn.cc +++ b/gcc/config/gcn/gcn.cc @@ -5050,7 +5050,9 @@ gcn_vectorize_vec_perm_const (machine_mode vmode, machine_mode op_mode, rtx dst, rtx src0, rtx src1, const vec_perm_indices & sel) { - if (vmode != op_mode) + if (vmode != op_mode + || !VECTOR_MODE_P (vmode) + || GET_MODE_INNER (vmode) == TImode) return false; unsigned int nelt = GET_MODE_NUNITS (vmode);