From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs,gmane.comp.lib.gnulib.bugs Subject: bug#36370: 27.0.50; XFIXNAT called on negative numbers Date: Thu, 27 Jun 2019 21:37:25 +0000 Message-ID: References: <7ef599ae-0a1d-e86f-2bed-a1503455833f@cs.ucla.edu> <5284eb58-3560-da42-d1d1-3bdb930eae49@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="156229"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36370@debbugs.gnu.org, Gnulib bugs To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 27 23:40:31 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgc85-000eVS-NH for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Jun 2019 23:40:29 +0200 Original-Received: from localhost ([::1]:54874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgc84-0004kv-LQ for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Jun 2019 17:40:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33802) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgc6l-0004CV-6J for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:39:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgc6i-0001WZ-1j for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:39:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54623) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hgc6g-0001UJ-Li for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hgc6g-0006FO-DG for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 17:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jun 2019 21:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36370 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36370-submit@debbugs.gnu.org id=B36370.156167148923945 (code B ref 36370); Thu, 27 Jun 2019 21:39:02 +0000 Original-Received: (at 36370) by debbugs.gnu.org; 27 Jun 2019 21:38:09 +0000 Original-Received: from localhost ([127.0.0.1]:39934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgc5p-0006E9-Bz for submit@debbugs.gnu.org; Thu, 27 Jun 2019 17:38:09 -0400 Original-Received: from mail-oi1-f196.google.com ([209.85.167.196]:42990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgc5n-0006Du-TD for 36370@debbugs.gnu.org; Thu, 27 Jun 2019 17:38:08 -0400 Original-Received: by mail-oi1-f196.google.com with SMTP id s184so2707088oie.9 for <36370@debbugs.gnu.org>; Thu, 27 Jun 2019 14:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kY6DPd/lhoodT/J3MajDxafNtBMf44+P/tSEDklcj1Y=; b=fKH/j8kgEvVpIu16tP1R+kPO6Ydn5vFn/GlfvbFBwa+dunlWmWq3SEUGA6xUClhp1O l1INaR/EuTuLSA8K1yum+e66KR7V2frd7KXUhd++W+85itu7gaqIhNEN7M03daWQfs7i Y+iZB6hMFgQ7AMMG87d/QN0I6JuIudFWEbWdu6p9+A3+VGwbhTcK+B6bHKUY6hHJLaFp c3V+votZ+I8zaLh7qggTIfm5zL64apqwu/22JRudGQDyR2QEy4S0rxmADshRKKk3bRFw gBn0XzcsnekeiPwEw2ypW1DWdMzb0ms6aeLZszWo4gjfKSE1/AQET3C3vOOiwIFk+4yZ DF4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kY6DPd/lhoodT/J3MajDxafNtBMf44+P/tSEDklcj1Y=; b=bUJGAcE01Mhqndx04j4QuTKLSlHszsPPzWOMmCUCf5b833XQaRfSzEb7UBDiIbaB28 Ytv0DJB461CXjlOBkeocnWl9gP6AR0fvD1e4UIGR9lZFn7JQD4gNo+kgipMPDYEnKeHb 87QD2XwUtuwsvOqiHBP3iuFEll09KzFfeAcmChPUm4pPWLwcJF4CSEAje5IZJXdtURsN u4GMZg+jcRhUbahedlclI8upKgmr8//5ESvJ5JTNUesOLBJ+nwstrPBjZNMhk2ZZ3gqy jRs8e/3v+ecPCkMcfU+t0p7Q12b/U7dOIhgO8kBqcFyZjRgImaSYJq9doh2Dt/p7Onag epdg== X-Gm-Message-State: APjAAAX3Kv3an8DIrRwJa1ZF/F4pgnKs7PdX4UEKn4huoybfgmIPUBjK kex3xNF9GctYhWetjh+BpHDx+DYHAOxWYiJlp28= X-Google-Smtp-Source: APXvYqy6ccgh+8r9lFLLbG5zoraEjFU/8r0gnXICncaFTqLRVFN2ERqavdAR902Ix4qLcjIcJroFUkzBLyvj8f/4TbE= X-Received: by 2002:aca:be88:: with SMTP id o130mr3515909oif.122.1561671482017; Thu, 27 Jun 2019 14:38:02 -0700 (PDT) In-Reply-To: <5284eb58-3560-da42-d1d1-3bdb930eae49@cs.ucla.edu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161663 gmane.comp.lib.gnulib.bugs:40572 Archived-At: On Thu, Jun 27, 2019 at 9:13 PM Paul Eggert wrote: > On 6/27/19 12:56 PM, Pip Cet wrote: > > The eassume tells GCC i is nonnegative, since (!(i >= 0) == !(i >= 0)) > > is indeed a constant. > > Ah! Thanks, I didn't catch that subtle point. Would the attached patch > to verify.h address that problem? This patch is for Gnulib, but would > propagate into Emacs. Eventually, I think that would be a good idea. But right now, I would like to figure out why GCC isn't generating code that's as good as it should be. > I tried this out with Emacs master and although it did change the > machine code subtly I didn't have the patience to see whether the > changes were likely to improve performance. The changes did grow the > Emacs text segment from 2556193 to 2557657 bytes (a 0.06% growth), which > is not a good sign. This was on Fedora 30 x86-64 with a default Emacs build. So far, what I've found is that eassume (0 <= i && i < bool_vector_size (a)); doesn't work with my patch. Tweaking that to eassume (0 <= i); eassume (i < bool_vector_size (a)); appears to help a little, but it's a good idea to avoid generating a call to a function that might be out-lined by the compiler, in any case. One thing I've neglected to look at in detail, because Emacs isn't affected by it, is how this works with pure functions. > I'll CC: this to bug-gnulib since it's a Gnulib issue. I have not > installed this patch into Gnulib on savannah. I'd be extremely interested in any comments people might have!