From patchwork Mon Oct 17 13:28:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 1690949 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.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=MjzVnVoM; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MrdBS2hBrz23kQ for ; Tue, 18 Oct 2022 00:29:19 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 77A883857415 for ; Mon, 17 Oct 2022 13:29:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77A883857415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666013357; bh=v6Y60ZXBSMCHJpqL5XQFt/wktsfxab/uvne2qNZQdPA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=MjzVnVoMjQkqT5077GnEcCsBJKUkukrbwEQGL9ncv2uWK+s+ThbK/Thd2mKc81dG9 +okKVVR0OfruhNcGGzIDqLBWTVvgQGd/5a6eewF8OZ6hp5XGVUlzfrAXnABpFYg8Uv A9ok5aGU9l6mEr0kzCyWu/3IEN+XWfPqUpCUu+QE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 79C56385357A for ; Mon, 17 Oct 2022 13:28:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 79C56385357A Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-29-hGbityYWMx6jNygVip9GtA-1; Mon, 17 Oct 2022 09:28:55 -0400 X-MC-Unique: hGbityYWMx6jNygVip9GtA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 34D753C30520 for ; Mon, 17 Oct 2022 13:28:55 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.192.166]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C7F940369DF; Mon, 17 Oct 2022 13:28:44 +0000 (UTC) Received: from abulafia.quesejoda.com (localhost [127.0.0.1]) by abulafia.quesejoda.com (8.17.1/8.17.1) with ESMTPS id 29HDSfhi024717 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 17 Oct 2022 15:28:41 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 29HDSfOV024716; Mon, 17 Oct 2022 15:28:41 +0200 To: GCC patches Subject: [COMMITTED] Do not test for -Inf when flag_finite_math_only. Date: Mon, 17 Oct 2022 15:28:38 +0200 Message-Id: <20221017132838.24693-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Aldy Hernandez via Gcc-patches From: Aldy Hernandez Reply-To: Aldy Hernandez Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" PR tree-optimizatin/107286 gcc/ChangeLog: * value-range.cc (range_tests_floats): Do not test for -Inf when flag_finite_math_only. --- gcc/value-range.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 4794d2386a8..90d5e660684 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -4022,10 +4022,13 @@ range_tests_floats () r0.intersect (r1); ASSERT_TRUE (r0.undefined_p ()); - // Make sure [-Inf, -Inf] doesn't get normalized. - r0 = frange_float ("-Inf", "-Inf"); - ASSERT_TRUE (real_isinf (&r0.lower_bound (), true)); - ASSERT_TRUE (real_isinf (&r0.upper_bound (), true)); + if (!flag_finite_math_only) + { + // Make sure [-Inf, -Inf] doesn't get normalized. + r0 = frange_float ("-Inf", "-Inf"); + ASSERT_TRUE (real_isinf (&r0.lower_bound (), true)); + ASSERT_TRUE (real_isinf (&r0.upper_bound (), true)); + } } void