From patchwork Sat Feb 24 07:43:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 205785 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1033582dyb; Fri, 23 Feb 2024 23:44:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVEC3UFStl3YuXJXs8Yu/doFHtT52l6WGDlHkgzVgrB8OuPkjxcw7qKr9wKONmfrdC5EgfPgB1TDDQBNU6ZX3BdKLsEfw== X-Google-Smtp-Source: AGHT+IGAQtp5BZume6XKj7D2/E6wC6QTdyq/KFcNt+7QNWna0Gq5xgaQc1sXu7msgXNayhViXiUD X-Received: by 2002:a05:622a:1753:b0:42e:6a26:9107 with SMTP id l19-20020a05622a175300b0042e6a269107mr1281301qtk.63.1708760657952; Fri, 23 Feb 2024 23:44:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708760657; cv=pass; d=google.com; s=arc-20160816; b=Qw6m0D/AqxZ+MzgDFF4roC67FQY5sqydD8azBF2H+rE3wMb8OGyTZ4VOExX800ou2t NCY3EX+ZgRAiBDlsx3NY4U438R2JtTgaVil5Eys1eOL98wIFmN8H/ZG47Lfe22sRPL4w hPLgyJeUJfqoB2Kt6lvcr6ahXsF8QvTgD6OSo/DsDFYfKBSyO/N+Z3BuALxDKxMPo+gb KPJgmNKrp1wxFnOCuPPBYYvDnQKftIaWasNGXbbWHK/sh33w0GAzkzxWC1cMUjVjRtz/ vNCejueg9SszNPm5+9GBwQTy4yaHC4tbP3cyBOov4f+ye0EJWdtbqaqZP7HKlz5iqaBK /Shw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=zZvDZA1zxVMsqk98/NjWoXYQ51HXQa+CfHm44AjkGYc=; fh=FCjeRajqaQYHMkQtfIia8KT5yBac53mYOLLyJhYG/AY=; b=JefldyK2JmHx2I2CfEn6eECKZyzFb3f2nLBWPBrBBNkgYylcMTew3AyBttZYlt27kl g8gOagNJa6zHcq0QPRARVNSL0TC6zdD7LZdKKuLR9OcUjNW6ciKeW9lXIJ+RtSKqsC6z G0bx24FABsYw6VA95zoYFe5EcJ09o+avyxLE9S904loP+2TrtsRsr0GnqwBAwC29QaIq Fn765E8iSurLvop3G8zDHr7cEaEsnXogpzmid6GsJBd4u0Izl5qfCdvZLVJbVc38K9Xj 06uF6zaC1g2xyKWwL2jgIYyBlQWUzlr5mQ2GgBsC+S2wyqhxJWnH0VNToe1IrOmMz1N+ ZZ+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=glKIeC1l; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id b8-20020ac87548000000b0042e5aab6846si600114qtr.737.2024.02.23.23.44.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 23:44:17 -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=@redhat.com header.s=mimecast20190719 header.b=glKIeC1l; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A29A63858297 for ; Sat, 24 Feb 2024 07:44:17 +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.129.124]) by sourceware.org (Postfix) with ESMTPS id E9C023858424 for ; Sat, 24 Feb 2024 07:43:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E9C023858424 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 E9C023858424 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708760615; cv=none; b=WzqfoZWF5+c4Mz2kOxfng2luEUZhv7BSCbwxLtznP3q2ej1rnSRKpt9uq2mJ6CrZDDty7EYMyq2eqxK8SA+AfMgAqEvl/NO0NK7P7jyLO8LTgGWwP3zfdDFm7n05WQqHsEC31wU1+F0NKGQNYSxhTeQNRpZiSWWQJ3XE8vcg7Xk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708760615; c=relaxed/simple; bh=SL7GKxe9FjW7ZrpmDh0A9iRlY5u3u3UK/7avZU1y+SQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=ASoznI+7yZGFYh9fT1coCcfsDbqTHLSaA0ofSLx4CwXtarxJn3mC3ZHES8JyLhwJ87qvK98dAg32rW+QwPdnLi+Gw9pdN9xDxIIpCil4L7QsUN2r5r7PbOrnTBbb0hKW+kb8sTbqEiVlpguA1DQB9hzkeE7wXGLYcGqXRxzru0g= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708760612; 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=zZvDZA1zxVMsqk98/NjWoXYQ51HXQa+CfHm44AjkGYc=; b=glKIeC1lT9X9ZjctArS4KfonVdZ170u/IXAmZBPp1V6QPOR8DBLQPcnKfT3CDEssBSqlp/ 6aVf5/K8cLDHVRun7/UC3WHRBPwoLJL+xk87NNmMbJY8n75r44yp08rZIiXlPITHbV823U MMqce0M109cskZ31ZDooGQrF7Evalq0= 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-691-nOu_qJ3-Nu-RXsjKRf-1gA-1; Sat, 24 Feb 2024 02:43:29 -0500 X-MC-Unique: nOu_qJ3-Nu-RXsjKRf-1gA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 0CF1C82DFE0; Sat, 24 Feb 2024 07:43:29 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A89C510800; Sat, 24 Feb 2024 07:43:28 +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 41O7hQoJ3980084 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 24 Feb 2024 08:43:26 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 41O7hPka3980083; Sat, 24 Feb 2024 08:43:25 +0100 Date: Sat, 24 Feb 2024 08:43:25 +0100 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Use HOST_WIDE_INT_{C,UC,0,0U,1,1U} macros some more Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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_H2, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791765416074448931 X-GMAIL-MSGID: 1791765416074448931 Hi! I've searched for some uses of (HOST_WIDE_INT) constant or (unsigned HOST_WIDE_INT) constant and turned them into uses of the appropriate macros. THere are quite a few cases in non-i386 backends but I've left that out for now. The only behavior change is in build_replicated_int_cst where the left shift was done in HOST_WIDE_INT type but assigned to unsigned HOST_WIDE_INT, which I've changed into unsigned HOST_WIDE_INT shift. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024-02-24 Jakub Jelinek gcc/ * builtins.cc (fold_builtin_isascii): Use HOST_WIDE_INT_UC macro. * combine.cc (make_field_assignment): Use HOST_WIDE_INT_1U macro. * double-int.cc (double_int::mask): Use HOST_WIDE_INT_UC macros. * genattrtab.cc (attr_alt_complement): Use HOST_WIDE_INT_1 macro. (mk_attr_alt): Use HOST_WIDE_INT_0 macro. * genautomata.cc (bitmap_set_bit, CLEAR_BIT): Use HOST_WIDE_INT_1 macros. * ipa-strub.cc (can_strub_internally_p): Use HOST_WIDE_INT_1 macro. * loop-iv.cc (implies_p): Use HOST_WIDE_INT_1U macro. * pretty-print.cc (test_pp_format): Use HOST_WIDE_INT_C and HOST_WIDE_INT_UC macros. * rtlanal.cc (nonzero_bits1): Use HOST_WIDE_INT_UC macro. * tree.cc (build_replicated_int_cst): Use HOST_WIDE_INT_1U macro. * tree.h (DECL_OFFSET_ALIGN): Use HOST_WIDE_INT_1U macro. * tree-ssa-structalias.cc (dump_varinfo): Use ~HOST_WIDE_INT_0U macros. * wide-int.cc (divmod_internal_2): Use HOST_WIDE_INT_1U macro. * config/i386/constraints.md (define_constraint "L"): Use HOST_WIDE_INT_C macro. * config/i386/i386.md (movabsq split peephole2): Use HOST_WIDE_INT_C macro. (movl + movb peephole2): Likewise. * config/i386/predicates.md (x86_64_zext_immediate_operand): Likewise. (const_32bit_mask): Likewise. gcc/objc/ * objc-encoding.cc (encode_array): Use HOST_WIDE_INT_0 macros. Jakub --- gcc/builtins.cc.jj 2024-02-06 08:43:14.843888851 +0100 +++ gcc/builtins.cc 2024-02-23 22:02:48.245611359 +0100 @@ -9326,7 +9326,7 @@ fold_builtin_isascii (location_t loc, tr /* Transform isascii(c) -> ((c & ~0x7f) == 0). */ arg = fold_build2 (BIT_AND_EXPR, integer_type_node, arg, build_int_cst (integer_type_node, - ~ (unsigned HOST_WIDE_INT) 0x7f)); + ~ HOST_WIDE_INT_UC (0x7f))); return fold_build2_loc (loc, EQ_EXPR, integer_type_node, arg, integer_zero_node); } --- gcc/combine.cc.jj 2024-01-03 11:51:34.028696534 +0100 +++ gcc/combine.cc 2024-02-23 22:03:36.895923405 +0100 @@ -9745,7 +9745,7 @@ make_field_assignment (rtx x) if (width >= HOST_BITS_PER_WIDE_INT) ze_mask = -1; else - ze_mask = ((unsigned HOST_WIDE_INT)1 << width) - 1; + ze_mask = (HOST_WIDE_INT_1U << width) - 1; /* Complete overlap. We can remove the source AND. */ if ((and_mask & ze_mask) == ze_mask) --- gcc/double-int.cc.jj 2024-01-03 11:51:42.086584698 +0100 +++ gcc/double-int.cc 2024-02-23 22:04:30.586164187 +0100 @@ -671,14 +671,14 @@ double_int::mask (unsigned prec) if (prec > HOST_BITS_PER_WIDE_INT) { prec -= HOST_BITS_PER_WIDE_INT; - m = ((unsigned HOST_WIDE_INT) 2 << (prec - 1)) - 1; + m = (HOST_WIDE_INT_UC (2) << (prec - 1)) - 1; mask.high = (HOST_WIDE_INT) m; mask.low = ALL_ONES; } else { mask.high = 0; - mask.low = prec ? ((unsigned HOST_WIDE_INT) 2 << (prec - 1)) - 1 : 0; + mask.low = prec ? (HOST_WIDE_INT_UC (2) << (prec - 1)) - 1 : 0; } return mask; --- gcc/genattrtab.cc.jj 2024-01-03 11:51:38.125639672 +0100 +++ gcc/genattrtab.cc 2024-02-23 22:05:38.043210294 +0100 @@ -2392,7 +2392,7 @@ static rtx attr_alt_complement (rtx s) { return attr_rtx (EQ_ATTR_ALT, XWINT (s, 0), - ((HOST_WIDE_INT) 1) - XWINT (s, 1)); + HOST_WIDE_INT_1 - XWINT (s, 1)); } /* Return EQ_ATTR_ALT expression representing set containing elements set @@ -2401,7 +2401,7 @@ attr_alt_complement (rtx s) static rtx mk_attr_alt (alternative_mask e) { - return attr_rtx (EQ_ATTR_ALT, (HOST_WIDE_INT) e, (HOST_WIDE_INT) 0); + return attr_rtx (EQ_ATTR_ALT, (HOST_WIDE_INT) e, HOST_WIDE_INT_0); } /* Given an expression, see if it can be simplified for a particular insn --- gcc/genautomata.cc.jj 2024-01-03 11:51:32.524717408 +0100 +++ gcc/genautomata.cc 2024-02-23 22:07:04.667985357 +0100 @@ -3416,13 +3416,13 @@ finish_alt_states (void) /* Set bit number bitno in the bit string. The macro is not side effect proof. */ -#define bitmap_set_bit(bitstring, bitno) \ +#define bitmap_set_bit(bitstring, bitno) \ ((bitstring)[(bitno) / (sizeof (*(bitstring)) * CHAR_BIT)] |= \ - (HOST_WIDE_INT)1 << (bitno) % (sizeof (*(bitstring)) * CHAR_BIT)) + HOST_WIDE_INT_1 << (bitno) % (sizeof (*(bitstring)) * CHAR_BIT)) #define CLEAR_BIT(bitstring, bitno) \ ((bitstring)[(bitno) / (sizeof (*(bitstring)) * CHAR_BIT)] &= \ - ~((HOST_WIDE_INT)1 << (bitno) % (sizeof (*(bitstring)) * CHAR_BIT))) + ~(HOST_WIDE_INT_1 << (bitno) % (sizeof (*(bitstring)) * CHAR_BIT))) /* Test if bit number bitno in the bitstring is set. The macro is not side effect proof. */ --- gcc/ipa-strub.cc.jj 2024-02-22 10:10:19.053027064 +0100 +++ gcc/ipa-strub.cc 2024-02-23 22:07:23.584717862 +0100 @@ -940,7 +940,7 @@ can_strub_internally_p (cgraph_node *nod } if (list_length (TYPE_ARG_TYPES (TREE_TYPE (node->decl))) - >= (((HOST_WIDE_INT) 1 << IPA_PARAM_MAX_INDEX_BITS) + >= ((HOST_WIDE_INT_1 << IPA_PARAM_MAX_INDEX_BITS) - STRUB_INTERNAL_MAX_EXTRA_ARGS)) { result = false; --- gcc/loop-iv.cc.jj 2024-01-03 11:51:24.283831784 +0100 +++ gcc/loop-iv.cc 2024-02-23 22:07:53.047301241 +0100 @@ -1577,7 +1577,7 @@ implies_p (rtx a, rtx b) && CONST_INT_P (XEXP (opb0, 1)) /* Avoid overflows. */ && ((unsigned HOST_WIDE_INT) INTVAL (XEXP (opb0, 1)) - != ((unsigned HOST_WIDE_INT)1 + != (HOST_WIDE_INT_1U << (HOST_BITS_PER_WIDE_INT - 1)) - 1) && INTVAL (XEXP (opb0, 1)) + 1 == -INTVAL (op1)) return rtx_equal_p (op0, XEXP (opb0, 0)); --- gcc/pretty-print.cc.jj 2024-02-14 14:35:29.288989166 +0100 +++ gcc/pretty-print.cc 2024-02-23 22:09:59.570532912 +0100 @@ -2813,13 +2813,16 @@ test_pp_format () ASSERT_PP_FORMAT_2 ("17 12345678", "%llo %x", (long long)15, 0x12345678); ASSERT_PP_FORMAT_2 ("cafebabe 12345678", "%llx %x", (long long)0xcafebabe, 0x12345678); - ASSERT_PP_FORMAT_2 ("-27 12345678", "%wd %x", (HOST_WIDE_INT)-27, 0x12345678); - ASSERT_PP_FORMAT_2 ("-5 12345678", "%wi %x", (HOST_WIDE_INT)-5, 0x12345678); - ASSERT_PP_FORMAT_2 ("10 12345678", "%wu %x", (unsigned HOST_WIDE_INT)10, + ASSERT_PP_FORMAT_2 ("-27 12345678", "%wd %x", HOST_WIDE_INT_C (-27), 0x12345678); - ASSERT_PP_FORMAT_2 ("17 12345678", "%wo %x", (HOST_WIDE_INT)15, 0x12345678); - ASSERT_PP_FORMAT_2 ("0xcafebabe 12345678", "%wx %x", (HOST_WIDE_INT)0xcafebabe, + ASSERT_PP_FORMAT_2 ("-5 12345678", "%wi %x", HOST_WIDE_INT_C (-5), 0x12345678); + ASSERT_PP_FORMAT_2 ("10 12345678", "%wu %x", HOST_WIDE_INT_UC (10), + 0x12345678); + ASSERT_PP_FORMAT_2 ("17 12345678", "%wo %x", HOST_WIDE_INT_C (15), + 0x12345678); + ASSERT_PP_FORMAT_2 ("0xcafebabe 12345678", "%wx %x", + HOST_WIDE_INT_C (0xcafebabe), 0x12345678); ASSERT_PP_FORMAT_2 ("-27 12345678", "%zd %x", (ssize_t)-27, 0x12345678); ASSERT_PP_FORMAT_2 ("-5 12345678", "%zi %x", (ssize_t)-5, 0x12345678); ASSERT_PP_FORMAT_2 ("10 12345678", "%zu %x", (size_t)10, 0x12345678); --- gcc/rtlanal.cc.jj 2024-01-03 11:51:26.331803360 +0100 +++ gcc/rtlanal.cc 2024-02-23 22:10:24.102190967 +0100 @@ -5184,7 +5184,7 @@ nonzero_bits1 (const_rtx x, scalar_int_m case FFS: case POPCOUNT: /* This is at most the number of bits in the mode. */ - nonzero = ((unsigned HOST_WIDE_INT) 2 << (floor_log2 (mode_width))) - 1; + nonzero = (HOST_WIDE_INT_UC (2) << (floor_log2 (mode_width))) - 1; break; case CLZ: --- gcc/tree.cc.jj 2024-02-10 11:25:09.711478022 +0100 +++ gcc/tree.cc 2024-02-23 22:11:02.386657314 +0100 @@ -2691,7 +2691,7 @@ build_replicated_int_cst (tree type, uns low = value; else { - mask = ((HOST_WIDE_INT)1 << width) - 1; + mask = (HOST_WIDE_INT_1U << width) - 1; low = (unsigned HOST_WIDE_INT) ~0 / mask * (value & mask); } --- gcc/tree.h.jj 2024-01-03 11:51:37.836643683 +0100 +++ gcc/tree.h 2024-02-23 22:13:21.059724337 +0100 @@ -3020,7 +3020,7 @@ extern void decl_value_expr_insert (tree DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET has. */ #define DECL_OFFSET_ALIGN(NODE) \ - (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.off_align) + (HOST_WIDE_INT_1U << FIELD_DECL_CHECK (NODE)->decl_common.off_align) /* Specify that DECL_OFFSET_ALIGN(NODE) is X. */ #define SET_DECL_OFFSET_ALIGN(NODE, X) \ --- gcc/tree-ssa-structalias.cc.jj 2024-01-03 11:51:34.357691968 +0100 +++ gcc/tree-ssa-structalias.cc 2024-02-23 22:12:08.586734545 +0100 @@ -8179,10 +8179,9 @@ dump_varinfo (FILE *file, varinfo_t vi) fprintf (file, "%shead:%u", sep, vi->head); if (vi->offset) fprintf (file, "%soffset:" HOST_WIDE_INT_PRINT_DEC, sep, vi->offset); - if (vi->size != ~(unsigned HOST_WIDE_INT)0) + if (vi->size != ~HOST_WIDE_INT_0U) fprintf (file, "%ssize:" HOST_WIDE_INT_PRINT_DEC, sep, vi->size); - if (vi->fullsize != ~(unsigned HOST_WIDE_INT)0 - && vi->fullsize != vi->size) + if (vi->fullsize != ~HOST_WIDE_INT_0U && vi->fullsize != vi->size) fprintf (file, "%sfullsize:" HOST_WIDE_INT_PRINT_DEC, sep, vi->fullsize); fprintf (file, "\n"); --- gcc/wide-int.cc.jj 2024-02-07 09:44:24.549718682 +0100 +++ gcc/wide-int.cc 2024-02-23 22:12:31.757411566 +0100 @@ -1713,8 +1713,7 @@ divmod_internal_2 (unsigned HOST_HALF_WI HOST_WIDE_INT and stored in the lower bits of each word. This algorithm should work properly on both 32 and 64 bit machines. */ - unsigned HOST_WIDE_INT b - = (unsigned HOST_WIDE_INT)1 << HOST_BITS_PER_HALF_WIDE_INT; + unsigned HOST_WIDE_INT b = HOST_WIDE_INT_1U << HOST_BITS_PER_HALF_WIDE_INT; unsigned HOST_WIDE_INT qhat; /* Estimate of quotient digit. */ unsigned HOST_WIDE_INT rhat; /* A remainder. */ unsigned HOST_WIDE_INT p; /* Product of two digits. */ --- gcc/config/i386/constraints.md.jj 2024-02-09 11:02:15.103831962 +0100 +++ gcc/config/i386/constraints.md 2024-02-23 22:15:27.031968402 +0100 @@ -280,7 +280,7 @@ (define_constraint "L" (and (match_code "const_int") (ior (match_test "ival == 0xff") (match_test "ival == 0xffff") - (match_test "ival == (HOST_WIDE_INT) 0xffffffff")))) + (match_test "ival == HOST_WIDE_INT_C (0xffffffff)")))) (define_constraint "M" "0, 1, 2, or 3 (shifts for the @code{lea} instruction)." --- gcc/config/i386/i386.md.jj 2024-02-09 11:02:15.217830366 +0100 +++ gcc/config/i386/i386.md 2024-02-23 22:16:03.006466951 +0100 @@ -2689,7 +2689,7 @@ (define_peephole2 && !x86_64_immediate_operand (operands[1], DImode) && !x86_64_zext_immediate_operand (operands[1], DImode) && !((UINTVAL (operands[1]) >> ctz_hwi (UINTVAL (operands[1]))) - & ~(HOST_WIDE_INT) 0xffffffff) + & ~HOST_WIDE_INT_C (0xffffffff)) && peep2_regno_dead_p (0, FLAGS_REG)" [(set (match_dup 0) (match_dup 1)) (parallel [(set (match_dup 0) (ashift:DI (match_dup 0) (match_dup 2))) @@ -3542,7 +3542,7 @@ (define_peephole2 [(set (match_operand:SWI48 0 "general_reg_operand") (match_dup 4))] { - HOST_WIDE_INT tmp = INTVAL (operands[1]) & ~(HOST_WIDE_INT)0xff00; + HOST_WIDE_INT tmp = INTVAL (operands[1]) & ~HOST_WIDE_INT_C (0xff00); tmp |= (INTVAL (operands[3]) & 0xff) << 8; operands[4] = gen_int_mode (tmp, mode); }) --- gcc/config/i386/predicates.md.jj 2024-02-23 18:54:37.909974991 +0100 +++ gcc/config/i386/predicates.md 2024-02-23 22:16:32.047062151 +0100 @@ -309,7 +309,7 @@ (define_predicate "x86_64_zext_immediate switch (GET_CODE (op)) { case CONST_INT: - return !(INTVAL (op) & ~(HOST_WIDE_INT) 0xffffffff); + return !(INTVAL (op) & ~HOST_WIDE_INT_C (0xffffffff)); case SYMBOL_REF: /* TLS symbols are not constant. */ @@ -839,7 +839,7 @@ (define_predicate "const128_operand" (define_predicate "const_32bit_mask" (and (match_code "const_int") (match_test "trunc_int_for_mode (INTVAL (op), DImode) - == (HOST_WIDE_INT) 0xffffffff"))) + == HOST_WIDE_INT_C (0xffffffff)"))) ;; Match 2, 4, or 8. Used for leal multiplicands. (define_predicate "const248_operand" --- gcc/objc/objc-encoding.cc.jj 2024-01-03 12:07:01.699740753 +0100 +++ gcc/objc/objc-encoding.cc 2024-02-23 22:14:08.266066329 +0100 @@ -391,10 +391,10 @@ encode_array (tree type, int curtype, in /* Else, we are in a struct, and we encode it as a zero-length array. */ - sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)0); + sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_0); } else if (TREE_INT_CST_LOW (TYPE_SIZE (array_of)) == 0) - sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT)0); + sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_0); else sprintf (buffer, "[" HOST_WIDE_INT_PRINT_DEC, TREE_INT_CST_LOW (an_int_cst)