From patchwork Mon Sep 9 06:48:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1982347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=IMbU+yNC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X2HVj65Cwz1y1D for ; Mon, 9 Sep 2024 16:49:00 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BB240385E459 for ; Mon, 9 Sep 2024 06:48:58 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 1AEE6385840C for ; Mon, 9 Sep 2024 06:48:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1AEE6385840C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1AEE6385840C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725864518; cv=none; b=YNdk3Ie5fZrd3wuN/InYbyVSKlV+y7xaJgWJ+vo1rWLv3vnWx6LXePhKm6cR+Qr4TbN0MfJoyHmI59w+RVU6h5mZuALJGw+QGMWWCZRRbmVWteXGBsnWu7Rz1GBJqn/DKIdfx/+RbehDrPxowLav0KVzaKUQ6taAqhhbAnW9Rec= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725864518; c=relaxed/simple; bh=OdlD7CqHZqajfELNClemaeQt2WULEFJ7EHOA/YKGGlc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Qk2DHzbWiVM8BDzhLeWhg5kBw9CNWwXRyUMWzPD3C1m5BdlBJuZ3jCchvQhMAFjxx8g2ZzB6LvmTsfR5OMAICbtV2PbvekV3qfWUy74p5sr9udor6VRhfJ8cO8HCPLJ/dRkOMbhwErAMcYmSL5spsDexlUTaQ3sP+iTeJsUmIcU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3787f30d892so2432876f8f.0 for ; Sun, 08 Sep 2024 23:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1725864514; x=1726469314; darn=gcc.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=UAYp0PGGU6gUcp7PV2iFMZ+hFzgnCCwQKKdkVRQvI8c=; b=IMbU+yNCZeKqbC4X50a+i3oxnw+r7pPSDSis9zfKnMze5RpyscQKX9fIR2Mlcrilo0 CH7qwhvORWOGGQhju4yrR6KGyGLUkpYcEMo+2vN0u60ZpZAAMaJYoUkZNB7HVgWFcvP7 XPi0s0f3c7LM2GUYLaP9l7AfXOHZAOxRtSyWHd8MTjFjrASpsxlF9UIBx5OGspe5Rwt9 QjBOVZmDVBgRf9lS6EyXS3zzL25I0flRRSkKcNUG0PtTW9QE86ylnCg0dkotaphcJBXC gmqIbOakboKAt3Z1oW3gBfeFGB2sOCjHReol8mi1dcDhwMBk3Bm8ay1FHRBqz02VoFXO I3Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725864514; x=1726469314; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UAYp0PGGU6gUcp7PV2iFMZ+hFzgnCCwQKKdkVRQvI8c=; b=jh3dmENQD4DL8QO8ivrzhiVG1C6G78/Iqw1z9eipzXG2GaqsmyVxtArx8BmKN7nSib kD5tqitWl+fti5dlIk+K2VufHaGMa3F8mdC1QcFBd/KKKUhEKs2uB0lVWv7ci9GjDyGc k3A2iC18YSmS7seb8fKPBVAOQmY2D/50blN+6pC0kppWrl3SDYLZ5j6s6bDwAseQhUAN aAt3/eAnXDRPwF1kOnZANarxwMyr+QDdFecF/b/dF4BY+mamTLRnLEFrzQZTPuZxto04 mgz/7yD4zKF4AtgH/huTHpP8cbRSlPtQ2e7K98F6t3/59IKWly7FibnjpXkgUWVwRRdO 5iUQ== X-Forwarded-Encrypted: i=1; AJvYcCXDE+AdvRwkSq3SNpvsHD32BUc2uPN7EqGgzuHq9RcvzcAodkKs+TZZpt6x+/0r8QwXLfH7y7mHhQvE4w==@gcc.gnu.org X-Gm-Message-State: AOJu0Yzp2j5ogCg4yXiS+s0Q3tbQDrF++XYrSKgFZPLb/GVe+AOuhSxl oegZwIsKHUahTm4hsKN2hk9buJvtvV1QLLqkVcrq2xw+EbRasJ7h7XJuv9udPFI= X-Google-Smtp-Source: AGHT+IFnxiDpvdTh7pCMi2XzqFkUOHta47KFZSN/1b50lQOC7hHB3/QqcEvjaBScq3+sNTBG1DDEMA== X-Received: by 2002:a5d:590f:0:b0:371:7e73:eb43 with SMTP id ffacd0b85a97d-378896a403bmr5757752f8f.42.1725864513964; Sun, 08 Sep 2024 23:48:33 -0700 (PDT) Received: from euler.schwinge.ddns.net (p200300c8b733b9005e8fc6f38b6af531.dip0.t-ipconnect.de. [2003:c8:b733:b900:5e8f:c6f3:8b6a:f531]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42caf436998sm65023035e9.29.2024.09.08.23.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Sep 2024 23:48:33 -0700 (PDT) From: Thomas Schwinge To: Richard Biener , lin1.hu@intel.com, gcc-patches@gcc.gnu.org Cc: ubizjak@gmail.com, rguenther@suse.de, jakub@redhat.com, pinskia@gmail.com, hongtao.liu@intel.com Subject: Match: Fix ordered and nonequal: Fix 'gcc.dg/opt-ordered-and-nonequal-1.c' re 'LOGICAL_OP_NON_SHORT_CIRCUIT' [PR116635] (was: [PATCH] Match: Fix ordered and nonequal) In-Reply-To: <20240904054345.1827642-1-lin1.hu@intel.com> References: <20240904054345.1827642-1-lin1.hu@intel.com> User-Agent: Notmuch/0.30+8~g47a4bad (https://notmuchmail.org) Emacs/29.4 (x86_64-pc-linux-gnu) Date: Mon, 09 Sep 2024 08:48:32 +0200 Message-ID: <87h6apqq4f.fsf@euler.schwinge.ddns.net> MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi! On 2024-09-04T13:43:45+0800, "Hu, Lin1" wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/opt-ordered-and-nonequal-1.c > @@ -0,0 +1,49 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -fdump-tree-forwprop1-details" } */ > + > +int is_ordered_and_nonequal_sh_1 (float a, float b) > +{ > + return !__builtin_isunordered (a, b) && (a != b); > +} > + > +[...] > + > +/* { dg-final { scan-tree-dump-times "gimple_simplified to\[^\n\r]*<>" 9 "forwprop1" } } */ OK to push "Match: Fix ordered and nonequal: Fix 'gcc.dg/opt-ordered-and-nonequal-1.c' re 'LOGICAL_OP_NON_SHORT_CIRCUIT' [PR116635]", see attached? Grüße Thomas From 3e85cb373fb86db5fad86a452a69e713c7050f16 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 9 Sep 2024 08:39:10 +0200 Subject: [PATCH] Match: Fix ordered and nonequal: Fix 'gcc.dg/opt-ordered-and-nonequal-1.c' re 'LOGICAL_OP_NON_SHORT_CIRCUIT' [PR116635] Fix up to make 'gcc.dg/opt-ordered-and-nonequal-1.c' of commit 91421e21e8f0f05f440174b8de7a43a311700e08 "Match: Fix ordered and nonequal" work for default 'LOGICAL_OP_NON_SHORT_CIRCUIT == false' configurations. PR testsuite/116635 gcc/testsuite/ * gcc.dg/opt-ordered-and-nonequal-1.c: Fix re 'LOGICAL_OP_NON_SHORT_CIRCUIT'. --- gcc/testsuite/gcc.dg/opt-ordered-and-nonequal-1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/testsuite/gcc.dg/opt-ordered-and-nonequal-1.c b/gcc/testsuite/gcc.dg/opt-ordered-and-nonequal-1.c index 6d102c2bd0c..d61c3322214 100644 --- a/gcc/testsuite/gcc.dg/opt-ordered-and-nonequal-1.c +++ b/gcc/testsuite/gcc.dg/opt-ordered-and-nonequal-1.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-forwprop1-details" } */ +/* Make this work for default 'LOGICAL_OP_NON_SHORT_CIRCUIT == false' configurations: + { dg-additional-options "--param logical-op-non-short-circuit=1" } */ int is_ordered_and_nonequal_sh_1 (float a, float b) { -- 2.34.1