Message ID | 20221004175221.1493497-1-aldyh@redhat.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp241633wrs; Tue, 4 Oct 2022 10:53:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4hp9HyjYviXjHtB9xA6ED3sT33/I1+0gBndO5jJbyILC4+CiDzt+rkS2DoiM/i1OqZv/MN X-Received: by 2002:a17:907:2c75:b0:77c:2b6a:6b63 with SMTP id ib21-20020a1709072c7500b0077c2b6a6b63mr20984029ejc.702.1664906001924; Tue, 04 Oct 2022 10:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664906001; cv=none; d=google.com; s=arc-20160816; b=0EuJGneRFGTIFW6vVbvamkj5WPd36pF/3SAcbFoF/KG5+FJpZ9TW5Wh26bMStKM1Lw wm6U5tzyspPz+oAZAQcGtdzbXHYJo7/bcErn8FRiYPF7HCYpx0vpAhIznjZJnhWDLRRe aROUelT53BmXzrs11Yq5+Bjqc6J1WgfBvHbY5NL4xm9YU1ET744w1g9+8mNb+1QzNANR 1hw9ZKBddHo3Oe3tYgR7BM2DxPIezABGRnI9bOo6Pz4DKyE1LorgYTWyvZvqIJ8HjGCK EYbXTohnAVUziFS9qV7M6d4d18FXpLdQCLGoXptJ8kh24THc3F1nQYW6dvc6MhTdNmEW cHrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=fgHJZJQOCLZSQ1ctt6e/SIf+V78/+eUygIfLLtEW7xg=; b=o624jNJTS/w+9aytNtYwnWCL0rkXKR8Qlqkdvg2+r63seu/NGmNTffYUdLW9x6EtuQ o1MMs9CV/lrFoPF/Kii78LxaeuBPqUJgD7QmuZ73D7JNAgLZjkKGXpXu9jzwbonuSQsI wTMXg2xXB5Ajh/7oe3usu90/7HKVZBVZ1fduFalL/3odOaBkQJ9Ygl9p22mdGItuGUJe dcnOjqBKo0CQNG3OdjclgNghPsyeSxToTSTmf6UOpfkX65LyTr/Ld8TprL2BC/SMWCQM bTKZyZcqyp7TP0AAdTBYBWwUWPJfDLR9h6NmNUfAeLQNCzjXPhzfPD/37kbeK9cw2ac9 JRPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=pOn0S1g+; 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=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id qa36-20020a17090786a400b007413ed9efb1si11295755ejc.543.2022.10.04.10.53.21 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 10:53:21 -0700 (PDT) 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=@gcc.gnu.org header.s=default header.b=pOn0S1g+; 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=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B1B543858418 for <ouuuleilei@gmail.com>; Tue, 4 Oct 2022 17:53:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1B543858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664906000; bh=fgHJZJQOCLZSQ1ctt6e/SIf+V78/+eUygIfLLtEW7xg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=pOn0S1g+cbvjMeDgrFD7xqNP3Tg9eO6pabsinJe2mVLZNcgzyM42tjGCPvz/szcgH JN/vGLRuDfplOtfY21Ai1PHHSlPJhoDp4swL/WWSr9MwRtSXn6jx2D7r6VhWLJbEvK ttCKhHx+UlkhCEdG8uSIoDZirA8KzeIoEnVmC9LQ= 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 8E7F03858D37 for <gcc-patches@gcc.gnu.org>; Tue, 4 Oct 2022 17:52:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8E7F03858D37 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-640-A9-0ZSDXPziF2UBU-kbkZQ-1; Tue, 04 Oct 2022 13:52:33 -0400 X-MC-Unique: A9-0ZSDXPziF2UBU-kbkZQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BB369185A7A9; Tue, 4 Oct 2022 17:52:32 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A32A17583; Tue, 4 Oct 2022 17:52:32 +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 294HqTrC1493520 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 4 Oct 2022 19:52:29 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 294HqSbC1493519; Tue, 4 Oct 2022 19:52:28 +0200 To: GCC patches <gcc-patches@gcc.gnu.org> Subject: [COMMITTED] Remove assert from set_nonzero_bits. Date: Tue, 4 Oct 2022 19:52:21 +0200 Message-Id: <20221004175221.1493497-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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, RCVD_IN_DNSWL_NONE, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Aldy Hernandez via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Aldy Hernandez <aldyh@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1745780475677249881?= X-GMAIL-MSGID: =?utf-8?q?1745780475677249881?= |
Series |
[COMMITTED] Remove assert from set_nonzero_bits.
|
|
Commit Message
Aldy Hernandez
Oct. 4, 2022, 5:52 p.m. UTC
The assert removed by this patch was there to keep users from passing masks of incompatible types. The self tests are passing host wide ints down (set_nonzero_bits (-1)), which seem to be 32 bits, whereas some embedded targets have integer_type_node's of 16-bits. This is causing problems in m32c-elf, among others. I suppose there's no harm in passing a 32-bit mask, because set_nonzero_bits calls wide_int::from() to convert the mask to the appropriate type. So we can remove the assert. Sorry for the pain Jeff. gcc/ChangeLog: * value-range.cc (irange::set_nonzero_bits): Remove assert. --- gcc/value-range.cc | 1 - 1 file changed, 1 deletion(-)
Comments
On 10/4/22 11:52, Aldy Hernandez wrote: > The assert removed by this patch was there to keep users from passing > masks of incompatible types. The self tests are passing host wide > ints down (set_nonzero_bits (-1)), which seem to be 32 bits, whereas > some embedded targets have integer_type_node's of 16-bits. This is > causing problems in m32c-elf, among others. > > I suppose there's no harm in passing a 32-bit mask, because > set_nonzero_bits calls wide_int::from() to convert the mask to the > appropriate type. So we can remove the assert. > > Sorry for the pain Jeff. > > gcc/ChangeLog: > > * value-range.cc (irange::set_nonzero_bits): Remove assert. Thanks. I'll respin everything that failed this AM and see where we are. jeff
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index afb26a40083..a307559b654 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -2913,7 +2913,6 @@ irange::set_nonzero_bits (const wide_int_ref &bits) { gcc_checking_assert (!undefined_p ()); unsigned prec = TYPE_PRECISION (type ()); - gcc_checking_assert (prec == bits.get_precision ()); // Drop VARYINGs with a nonzero mask to a plain range. if (m_kind == VR_VARYING && bits != -1)