From patchwork Tue May 10 07:49:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1628955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=RQDwhO2k; dkim-atps=neutral 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+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.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 (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ky9Df6xBRz9sG3 for ; Tue, 10 May 2022 17:49:53 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D0131383600C for ; Tue, 10 May 2022 07:49:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0131383600C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1652168989; bh=pIvtsuhiwOqtciDqyWju6hcdBta3e+vvj5C3TdhyPok=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RQDwhO2kzBdrL4HrIwjVdBgJYcIuhFug2COXbUKXMYtnj0v8wcLB7KNm0R3WsuvgN eYBt5V/SqMWAwpxTdALPkCL+Q9bn87WUi4mCe5rVCR7tAgd30ccRam8GiUYD1HVMOD i7yPSidDcn/oyUSmzLUPS4IwO86DO7ELBgGqRLNY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id D9BD8385DC21 for ; Tue, 10 May 2022 07:49:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D9BD8385DC21 Received: by mail-wr1-x431.google.com with SMTP id c11so22521340wrn.8 for ; Tue, 10 May 2022 00:49:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=pIvtsuhiwOqtciDqyWju6hcdBta3e+vvj5C3TdhyPok=; b=tySZUyvMWeJ/FKPNkeemDSMZp3ELYat8poQog5KyrGfXE4sH+fZKBMeuVdm7bVm9Sl 1cnKhyYt8iVlf5+bDknfCsISnhVnEZUdyWXAKCph8xBPx6FN/UIIA5wX+wB5RaRbOJdD r89V0dI4xxq3N/GdQCzLtGq6tl3khsgCOkf/jUSJeNPlixXjTzeOmnJC2zSiKDPpzEUy botbSqDIGZpdisywBoyqax/5Qz+ZcHNsd+3vwlhD+W/qkFVyyPIGw6uXbBHYW/n76A2W PTXIS3OmeYeCNEqgXyQP6k+p6KWHhe/BUbpMmxJAjdi4H1aHesdBlEPrVMe7fnYuxQB+ TOuw== X-Gm-Message-State: AOAM533ShGc+cYPh0iPRB6S75dGnjYok5a14s7H9y7tpkqa6ybh+ukQG qKtjy/tIQfiAd7wUZeUZL1VHSbAYtCASFyqm X-Google-Smtp-Source: ABdhPJyqdNtG4qOxBNCB6vvGomNjDZHNybEkT+5ovKQbg5snn+KWv01shHERxFpsyIFgs5RdbZkDMQ== X-Received: by 2002:adf:f845:0:b0:20a:d120:4af1 with SMTP id d5-20020adff845000000b0020ad1204af1mr16954251wrq.644.1652168967510; Tue, 10 May 2022 00:49:27 -0700 (PDT) Received: from fomalhaut.localnet ([2a01:e0a:8d5:d990:bf38:f508:6f40:de1d]) by smtp.gmail.com with ESMTPSA id z16-20020a7bc7d0000000b0039454a85a9asm1655972wmk.30.2022.05.10.00.49.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 00:49:26 -0700 (PDT) X-Google-Original-From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [SPARC] Fix PR target/105292 Date: Tue, 10 May 2022 09:49:25 +0200 Message-ID: <4710281.GXAFRqVoOG@fomalhaut> MIME-Version: 1.0 X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Eric Botcazou via Gcc-patches From: Eric Botcazou Reply-To: Eric Botcazou Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This is a regression present since the 10.x series, but the underlying issue has been there since the TARGET_VEC_PERM_CONST hook was implemented, in the form of an ICE when expanding a constant VEC_PERM_EXPR in V4QI, while the back-end only supports V8QI constant VEC_PERM_EXPRs. Tested on SPARC/Solaris, applied to all active branches. 2022-05-10 Eric Botcazou PR target/105292 * config/sparc/sparc.cc (sparc_vectorize_vec_perm_const): Return true only for 8-byte vector modes. 2022-05-10 Eric Botcazou * gcc.target/sparc/20220510-1.c: New test. diff --git a/gcc/config/sparc/sparc.cc b/gcc/config/sparc/sparc.cc index 467a9f171d2..aca925befe1 100644 --- a/gcc/config/sparc/sparc.cc +++ b/gcc/config/sparc/sparc.cc @@ -13041,9 +13041,9 @@ sparc_vectorize_vec_perm_const (machine_mode vmode, rtx target, rtx op0, if (!TARGET_VIS2) return false; - /* All permutes are supported. */ + /* All 8-byte permutes are supported. */ if (!target) - return true; + return GET_MODE_SIZE (vmode) == 8; /* Force target-independent code to convert constant permutations on other modes down to V8QI. Rely on this to avoid the complexity of the byte