From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126791 invoked by alias); 23 Nov 2016 19:45:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 126782 invoked by uid 89); 23 Nov 2016 19:45:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=cry, sum X-HELO: mail-vk0-f52.google.com Received: from mail-vk0-f52.google.com (HELO mail-vk0-f52.google.com) (209.85.213.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Nov 2016 19:45:32 +0000 Received: by mail-vk0-f52.google.com with SMTP id 137so14443587vkl.0 for ; Wed, 23 Nov 2016 11:45:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=w8uiUofTFcEeeYr464ygSoWkw9CLPro2d2Gbkw38Hkg=; b=jK7SAyIgfHpZ0e8v4URVk8+hOcpo8N/cHlGueGvlMwmC3aYWapEY0F9Ck/zCwL9vVX ETLSvL9tgy0NwhynYtc2MM92CxjLT/UsewufUy3bHsqBGSXnNTXnwBBiuruvQwAYiUwI jmEs36/XF6ML1JKcK7XorWZYcHeFyB9/HIgTnGh5DrnifQJzbuUB50AOAuf1ivZ3uz7S PuBRivfz6IdI15rKaaNIUgf7XMJfLrnAx09R/wUeT2upEu2HTYTm5RkZ1a2eyq5QamVo qiGUZIe2VmEFiefm+Pr1cJ5fuGN1L3qqPR/gyl8EptZ3PenUWGFkWgUZ/GXtaxjSb3KI BU5w== X-Gm-Message-State: AKaTC01soxPcTNCSXWcvNsd7+P3YMgA/GeA3VkXVweRJ6fquNWGL4zBpeTs1LwG6u3F6Wvp00dLX6KBPo95V3A== X-Received: by 10.31.48.77 with SMTP id w74mr1882729vkw.69.1479930330377; Wed, 23 Nov 2016 11:45:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.83.67 with HTTP; Wed, 23 Nov 2016 11:45:29 -0800 (PST) From: Uros Bizjak Date: Wed, 23 Nov 2016 19:45:00 -0000 Message-ID: Subject: Re: [3/3] Fix PR78120, in ifcvt/rtlanal/i386. To: "gcc-patches@gcc.gnu.org" Cc: Bernd Schmidt Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-11/txt/msg02437.txt.bz2 > 3. ifcvt computes the sum of costs for the involved blocks, but only > makes a before/after comparison when optimizing for size. When > optimizing for speed, it uses max_seq_cost, which is an estimate > computed from BRANCH_COST, which in turn can be zero for predictable > branches on x86. Can you please correct the addition below? It makes me cry thinking that buggy function will be immortalized in the gcc testsuite... > +static inline u128 add_u128 (u128 a, u128 b) > +{ a.hi += b.hi; > + a.lo += b.lo; > + if (a.lo < b.lo) > + a.hi++; > + > + return a; Uros.