From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 465B0384D16C for ; Thu, 6 Oct 2022 06:23:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 465B0384D16C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665037404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=48XC7k3tbfWgruN+j5eo2C5yu5z/IH5fZF3x37Fx2f8=; b=coF02LLWzwrHb+Wj6XznmAiSg9I/s/I5/0vcqGagYIzMc1ul9b+tPOkfn8MNSOc6mF2OQ2 TVgGx0SqlX8FNboVFVIDz0Q8e1w0S1eWmIuoWh/jMkv/wYgcfUy2CWcgQIZAZzmqPLCtUG RxhIFU1vjgWmWq0gwAzBtwNj6mhFvy8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-BeCir72WOJ-tbmd2Rt1VCQ-1; Thu, 06 Oct 2022 02:23:23 -0400 X-MC-Unique: BeCir72WOJ-tbmd2Rt1VCQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DAB4880206D for ; Thu, 6 Oct 2022 06:23:22 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.192.138]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71F902166B26; Thu, 6 Oct 2022 06:23:22 +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 2966NKk21710018 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 6 Oct 2022 08:23:20 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 2966NKl21710017; Thu, 6 Oct 2022 08:23:20 +0200 From: Aldy Hernandez To: GCC patches Cc: Andrew MacLeod , Aldy Hernandez Subject: [COMMITTED] Do not check finite_operands_p twice in range-ops-float. Date: Thu, 6 Oct 2022 08:23:17 +0200 Message-Id: <20221006062318.1709996-2-aldyh@redhat.com> In-Reply-To: <20221006062318.1709996-1-aldyh@redhat.com> References: <20221006062318.1709996-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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 List-Id: The uses of finite_operands_p removed are guarded by a call to finite_operands_p already. gcc/ChangeLog: * range-op-float.cc (foperator_lt::fold_range): Remove extra check to finite_operands_p. (foperator_le::fold_range): Same. (foperator_gt::fold_range): Same. (foperator_ge::fold_range): Same. --- gcc/range-op-float.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index 6e9d51d3b4b..68578aa6fe7 100644 --- a/gcc/range-op-float.cc +++ b/gcc/range-op-float.cc @@ -572,8 +572,7 @@ foperator_lt::fold_range (irange &r, tree type, { if (real_less (&op1.upper_bound (), &op2.lower_bound ())) r = range_true (type); - else if (finite_operands_p (op1, op2) - && !real_less (&op1.lower_bound (), &op2.upper_bound ())) + else if (!real_less (&op1.lower_bound (), &op2.upper_bound ())) r = range_false (type); else r = range_true_and_false (type); @@ -688,8 +687,7 @@ foperator_le::fold_range (irange &r, tree type, { if (real_compare (LE_EXPR, &op1.upper_bound (), &op2.lower_bound ())) r = range_true (type); - else if (finite_operands_p (op1, op2) - && !real_compare (LE_EXPR, &op1.lower_bound (), &op2.upper_bound ())) + else if (!real_compare (LE_EXPR, &op1.lower_bound (), &op2.upper_bound ())) r = range_false (type); else r = range_true_and_false (type); @@ -796,8 +794,7 @@ foperator_gt::fold_range (irange &r, tree type, { if (real_compare (GT_EXPR, &op1.lower_bound (), &op2.upper_bound ())) r = range_true (type); - else if (finite_operands_p (op1, op2) - && !real_compare (GT_EXPR, &op1.upper_bound (), &op2.lower_bound ())) + else if (!real_compare (GT_EXPR, &op1.upper_bound (), &op2.lower_bound ())) r = range_false (type); else r = range_true_and_false (type); @@ -912,8 +909,7 @@ foperator_ge::fold_range (irange &r, tree type, { if (real_compare (GE_EXPR, &op1.lower_bound (), &op2.upper_bound ())) r = range_true (type); - else if (finite_operands_p (op1, op2) - && !real_compare (GE_EXPR, &op1.upper_bound (), &op2.lower_bound ())) + else if (!real_compare (GE_EXPR, &op1.upper_bound (), &op2.lower_bound ())) r = range_false (type); else r = range_true_and_false (type); -- 2.37.1