From patchwork Tue Jun 4 13:37:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1943373 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Wv+5pToI; dkim-atps=neutral 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=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 [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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vts903ytMz20Tb for ; Tue, 4 Jun 2024 23:37:40 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D57E6390D9A5 for ; Tue, 4 Jun 2024 13:37:38 +0000 (GMT) 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 90E683894C1F for ; Tue, 4 Jun 2024 13:37:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 90E683894C1F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 90E683894C1F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717508241; cv=none; b=FljbypCUTpJWRwlOWDWB9tMVvHtlk5d1n1egbvdFeFFnwlEfSkwYhIT7d6KuG+Gl0gJFdxazTZScTXDAIGfbUX61HvU5y9+KI+gNjmBqfaBIdj/PdTjPp1fW8atMGO7k3ABoGnU7s3M36YxF+FKY+KI/WYQRr3g6szlywdWK1q0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717508241; c=relaxed/simple; bh=cUVYkGodf6gGyrQBZXyM1WOcNkKFgD1xlM0++ij4mi4=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=rLXqP2rkJmc8K8/Ter7dVFGCdkP2Yz2eGtnb7dHwjrh6fjDSzvYMUiQ3v9HGj/s3UQzN1BWuQEBuOvboDnu5yzKYuYq/xr4D59MA1rno6yDifHImgOH3LGMlChXr/ndXeZa+NAZFV2MUvL1b72ZqWIW2d2Fj3W64hrY3a+PG0hg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717508239; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=l8H3z4sq47tA+rcagspxwKSRecRHgkbpvMQ6vwgM+68=; b=Wv+5pToIJ87Dnp2XMkPGlfx2yRduBtbcmwqYc621XPyGgfEKV8gfl8GlFyjxUsJL/dJas5 UHxaf23Th9DHjDH1MtN/Tw3tRE+8YOo7Mfar5J0lxwIs89gHsywSAsbIAAVGMjbJRjU/hT DK83DlzdB4S7K++NrdcMZbki9uuX4xM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-604-gyeAZ-TbNL2T2tJqz8Tz9A-1; Tue, 04 Jun 2024 09:37:15 -0400 X-MC-Unique: gyeAZ-TbNL2T2tJqz8Tz9A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 34B668007A1; Tue, 4 Jun 2024 13:37:15 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED1DB3C23; Tue, 4 Jun 2024 13:37:14 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 454DbBX21623858 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 4 Jun 2024 15:37:11 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 454DbBwZ1623857; Tue, 4 Jun 2024 15:37:11 +0200 Date: Tue, 4 Jun 2024 15:37:11 +0200 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] fold-const, gimple-fold: Some formatting cleanups Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Hi! While looking into PR115337, I've spotted some badly formatted code, which the following patch fixes. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-06-04 Jakub Jelinek * fold-const.cc (tree_call_nonnegative_warnv_p): Formatting fixes. (tree_invalid_nonnegative_warnv_p): Likewise. * gimple-fold.cc (gimple_call_nonnegative_warnv_p): Likewise. Jakub --- gcc/fold-const.cc.jj 2024-04-04 10:47:46.363287718 +0200 +++ gcc/fold-const.cc 2024-06-04 10:56:57.575425348 +0200 @@ -15331,8 +15331,8 @@ tree_call_nonnegative_warnv_p (tree type non-negative if both operands are non-negative. In the presence of qNaNs, we're non-negative if either operand is non-negative and can't be a qNaN, or if both operands are non-negative. */ - if (tree_expr_maybe_signaling_nan_p (arg0) || - tree_expr_maybe_signaling_nan_p (arg1)) + if (tree_expr_maybe_signaling_nan_p (arg0) + || tree_expr_maybe_signaling_nan_p (arg1)) return RECURSE (arg0) && RECURSE (arg1); return RECURSE (arg0) ? (!tree_expr_maybe_nan_p (arg0) || RECURSE (arg1)) @@ -15431,8 +15431,8 @@ tree_invalid_nonnegative_warnv_p (tree t case CALL_EXPR: { - tree arg0 = call_expr_nargs (t) > 0 ? CALL_EXPR_ARG (t, 0) : NULL_TREE; - tree arg1 = call_expr_nargs (t) > 1 ? CALL_EXPR_ARG (t, 1) : NULL_TREE; + tree arg0 = call_expr_nargs (t) > 0 ? CALL_EXPR_ARG (t, 0) : NULL_TREE; + tree arg1 = call_expr_nargs (t) > 1 ? CALL_EXPR_ARG (t, 1) : NULL_TREE; return tree_call_nonnegative_warnv_p (TREE_TYPE (t), get_call_combined_fn (t), --- gcc/gimple-fold.cc.jj 2024-02-28 09:40:09.473563056 +0100 +++ gcc/gimple-fold.cc 2024-06-04 10:38:37.515145399 +0200 @@ -9334,10 +9334,10 @@ static bool gimple_call_nonnegative_warnv_p (gimple *stmt, bool *strict_overflow_p, int depth) { - tree arg0 = gimple_call_num_args (stmt) > 0 ? - gimple_call_arg (stmt, 0) : NULL_TREE; - tree arg1 = gimple_call_num_args (stmt) > 1 ? - gimple_call_arg (stmt, 1) : NULL_TREE; + tree arg0 + = gimple_call_num_args (stmt) > 0 ? gimple_call_arg (stmt, 0) : NULL_TREE; + tree arg1 + = gimple_call_num_args (stmt) > 1 ? gimple_call_arg (stmt, 1) : NULL_TREE; tree lhs = gimple_call_lhs (stmt); return (lhs && tree_call_nonnegative_warnv_p (TREE_TYPE (lhs),