Message ID | alpine.DEB.2.20.2311182143010.5892@tpp.orcam.me.uk |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1506271vqn; Sat, 18 Nov 2023 21:42:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IGIJEBfB3wYgW/bI1O1jCjbITrwWE8lonjELAelO/W8YbIqy60+I3p3WWi4d0CjLyk+jrgK X-Received: by 2002:ad4:5bcc:0:b0:676:3b5a:4d81 with SMTP id t12-20020ad45bcc000000b006763b5a4d81mr4226514qvt.23.1700372563723; Sat, 18 Nov 2023 21:42:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700372563; cv=pass; d=google.com; s=arc-20160816; b=d3kD41u7minqoQkvqlVwXDqlmxvv/1mi17T5BJ0FsvLFxOG54tJX5bXDMLt29r1SrG pturje+uHw9tLccaiMEQ7akGNIKvXPyvJupMNAF17fGvvvZKhKR3+7tlKGXl0PSJpCnx dlx/zKswj8pt1YIKT6C23vb5oqNtYQzkSCu58PMb/RPv9ElGgnyhaWW+T8zScprXt5rv yHy0F41gaj8RRyw2+wwJjt3Jof5FgyziBv6tkLar2j+nfOxaTUmJ9/d5KMCtwS6CgosV KvQwKS5zSGtlffa4ZvQNtE74CnIAz+5HRKwSIzI4SLZWKNM6SR1hc/jAGWoh2samVg03 qkSQ== 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:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=C3UwKJkUEpp5yGdGyQXasV6+qCwwP6V4FEWcQO9m2bA=; fh=dp1z4I3tVhinwswv7IAFxpunWK+Ws/fGQfmox9vHv3I=; b=JM7bHknemI0BgYQIkykIWOEXoCDNxX3nKeW/Su2OEPuSYBqZUmYcp73afBd0ZolfUX l1G+tCrwbcMckpbFIyaH5X2WZXwskVFaQ3SU29owVJyS2nJvRgIMUONvxTZnl2+ZRCbs zFov6PumGrY1wI7JkVUUd1N2ZlprQr3akTgVV+zhBPiwCWJFHZ0uyxaKGdS2Bg5JJNyb RL1f5orq/tRo3k72gpreEBzVVLrogCdyqN5OADIcznPyPsSBpieRTUZOXCEQrTlmBvPE 2qJGNLinOpzO0OOHmtXTx++T3ho9+B0qfg16zlpNaixR/F0se7JWsZduJH0LPQrlkWJg UggA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b="Ror//xOd"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id l14-20020ad4444e000000b0066d0a15a2ffsi4888423qvt.322.2023.11.18.21.42.43 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 21:42:43 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b="Ror//xOd"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 D63CD3857833 for <ouuuleilei@gmail.com>; Sun, 19 Nov 2023 05:42:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 99A7838582AC for <gcc-patches@gcc.gnu.org>; Sun, 19 Nov 2023 05:42:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99A7838582AC Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 99A7838582AC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::631 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700372538; cv=none; b=I02z3Y4RxVyW2/+xO2kpzrhp4honGxnjq0SRLOAQUR0lTuRKsNMY5WR+H+8qRn19kutYi4bqEQ9KCWW1e0uzqRcKTr/qhkaQlcOHhlN7e4Ad2CG/tYz/6KmWBiZtESA/oiNqWR3RyvssH/E2YXZmG7NFipFj7MKLejWt51MHzOQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700372538; c=relaxed/simple; bh=0oeAcOqmZ1DV2kcVPHOg0SvA13KaFlu7BpqcuMkGiYA=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=NUcx9Rifjsx5cSbTkGRdbKiuR0QSBWPb8c+oI/5N56FgcGImLZekPLcJYMy+jJ1x0ftIhIWVc4YD/uRgtuVLaEWbCMyLPCZSfsNLwhtIP2zVSHlJpIb98D9r2eQKybnvZpbh0qG2QXMpSgE8x1Nvpxfq0s6/ckFFwh/l6kpY5mo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9db6cf8309cso435863966b.0 for <gcc-patches@gcc.gnu.org>; Sat, 18 Nov 2023 21:42:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1700372535; x=1700977335; darn=gcc.gnu.org; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=C3UwKJkUEpp5yGdGyQXasV6+qCwwP6V4FEWcQO9m2bA=; b=Ror//xOdnWABmtUqTF3uH4WWl/5CezpAgw8+JHTWqqt5WZiJ4MN+iJm/fl28zWaMyp Yz+R+LtjiS4CSOqRUhziSxrRJI/Q59VrAR8vVbZ2azyyV01iRdogmvEjZuj7iGfXZn2F LNn90xOE5KW5sFO12lfGUDjTM7sYFaf/P77I/9EK1mDQmlnVM62mgacw6nTBhUsU6CUF mQhzj70d4hTu+ZPWqLZyGVBtblrNxZM0I/VF+5w1nfrlGaaSsVH6xf41iBcKrPi6ZqB4 IU/xW5rhyKwdKIM7velSTnmQdMBzVd5eq9L/2v6ep2DSDoLCrdR78PtwhAllWmWFGErw fQgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700372535; x=1700977335; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=C3UwKJkUEpp5yGdGyQXasV6+qCwwP6V4FEWcQO9m2bA=; b=cDJwKvJWL7EB4JogG9aWXc1sT4mDf5NjVL0GHpkhMZ1YzGk8Ag3uZzDcmmc62kAAnr ZT+00rzn6RF4oIXjujJt+VnqWmq+ehLe+3tPt7V03S+ccfwLb9MiUhxIvo1cs7oPRZ/B Y06csMVG091Cxahl5ZEMS1dz6Ao1iulkq1A9Xd36XZN/ozkZrcEIZSKIoLGAJDdhrPva KKOYx+ZGJS1fhKHCI/XewG3KLNarEmb9ZmpDLaztWMtfgn5knwS5atAZkaAwVY9cPren nae1fqrdNK4tPUNZL4P6SduG4xnkJqPxrTPynLpH3T1JRAK865LdfkJZynHybQV6YS+S 6bRw== X-Gm-Message-State: AOJu0Yx0c3VhgKNbs9VxsNg7Azt79399RcVGYf70DGkbHD88ix4SdKkC mdY45zwoyDccrEW4nEo4T7zpqgXTDYLIJJ5Q/sBOLg== X-Received: by 2002:a17:906:170c:b0:9a5:9f3c:9615 with SMTP id c12-20020a170906170c00b009a59f3c9615mr2926873eje.63.1700372535456; Sat, 18 Nov 2023 21:42:15 -0800 (PST) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id g15-20020a170906538f00b0099ce025f8ccsm2528674ejo.186.2023.11.18.21.42.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Nov 2023 21:42:15 -0800 (PST) Date: Sun, 19 Nov 2023 05:42:13 +0000 (GMT) From: "Maciej W. Rozycki" <macro@embecosm.com> To: gcc-patches@gcc.gnu.org cc: Andrew Waterman <andrew@sifive.com>, Jim Wilson <jim.wilson.gcc@gmail.com>, Kito Cheng <kito.cheng@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com> Subject: [PATCH 33/44] RISC-V: Also allow FP conditions in `riscv_expand_conditional_move' In-Reply-To: <alpine.DEB.2.20.2311171315580.5892@tpp.orcam.me.uk> Message-ID: <alpine.DEB.2.20.2311182143010.5892@tpp.orcam.me.uk> References: <alpine.DEB.2.20.2311171315580.5892@tpp.orcam.me.uk> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, URIBL_BLACK autolearn=no 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782969861589643256 X-GMAIL-MSGID: 1782969861589643256 |
Series |
RISC-V: Various if-conversion fixes and improvements
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Maciej W. Rozycki
Nov. 19, 2023, 5:42 a.m. UTC
In `riscv_expand_conditional_move' we only let integer conditions through at the moment, even though code has already been prepared to handle floating-point conditions as well. Lift this restriction and only bail out if a non-word-mode integer condition has been requested, as we cannot handle this specific case owing to machine instruction set restriction. We already take care of the non-integer, non-floating-point case later on. gcc/ * config/riscv/riscv.cc (riscv_expand_conditional_move): Don't bail out in floating-point conditions. --- gcc/config/riscv/riscv.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) gcc-riscv-expand-conditional-move-fp.diff
Index: gcc/gcc/config/riscv/riscv.cc =================================================================== --- gcc.orig/gcc/config/riscv/riscv.cc +++ gcc/gcc/config/riscv/riscv.cc @@ -4109,12 +4109,12 @@ riscv_expand_conditional_move (rtx dest, machine_mode mode0 = GET_MODE (op0); machine_mode mode1 = GET_MODE (op1); - /* The comparison must be comparing WORD_MODE objects. We must - enforce that so that we don't strip away a sign_extension + /* An integer comparison must be comparing WORD_MODE objects. We + must enforce that so that we don't strip away a sign_extension thinking it is unnecessary. We might consider using riscv_extend_operands if they are not already properly extended. */ - if ((mode0 != word_mode && mode0 != VOIDmode) - || (mode1 != word_mode && mode1 != VOIDmode)) + if ((INTEGRAL_MODE_P (mode0) && mode0 != word_mode) + || (INTEGRAL_MODE_P (mode1) && mode1 != word_mode)) return false; /* In the fallback generic case use MODE rather than WORD_MODE for