From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40275 invoked by alias); 13 May 2016 13:07:21 -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 40259 invoked by uid 89); 13 May 2016 13:07:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=bschmidt@redhat.com, bschmidtredhatcom X-HELO: mail-wm0-f51.google.com Received: from mail-wm0-f51.google.com (HELO mail-wm0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 13 May 2016 13:07:19 +0000 Received: by mail-wm0-f51.google.com with SMTP id n129so22026659wmn.1 for ; Fri, 13 May 2016 06:07:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=UEKnsZSieu1y7mLkYexwp8fLreE3FwX23lhDflmOAuY=; b=auZuE2acQj4p4M8LgAKa8PiZ/OJSnLL6bbQDNW5x6CAmY4H3o61sL8ijEQE5Svhdf6 1IO58bFmUYC7PfmmX73fty2JV/FD0kevtCE7W8wa9s0YAZqbReSVd6BzATSsCtj6L6Go A5JCJST9X5KOPLWoDVPNWWzGHbf6j7Hbe4Pk6+r/z0N+UgNkUkknirLLu0VcgRSIoOOa 2jcJWlw9O2zusFUxW4sR4/3ypvaw1M7XAyLz4UOB11ma1fK3QhahGvmUAhGJSRARmx1R i4CYhjYRhQuvTuTZ2XRZTrP29gdydRzxEpFdoh0OCcLkcor0aeBf3H26zXuCRLplwxY6 5mPA== X-Gm-Message-State: AOPr4FUFkgOFvtHeOkPHUIRWBciUkJZlsgkXqhf7J6h3DbGBVcCgt6pvqVxoZ3abI+im/S1U+j+2Fg/D2qpKOA== MIME-Version: 1.0 X-Received: by 10.194.10.162 with SMTP id j2mr15647469wjb.72.1463144836462; Fri, 13 May 2016 06:07:16 -0700 (PDT) Received: by 10.194.33.196 with HTTP; Fri, 13 May 2016 06:07:16 -0700 (PDT) In-Reply-To: <5735D120.4070808@redhat.com> References: <56992541.3090402@redhat.com> <5722581B.5050402@redhat.com> <57274ECF.3060909@redhat.com> <5734B9DF.9000505@redhat.com> <5735D120.4070808@redhat.com> Date: Fri, 13 May 2016 13:07:00 -0000 Message-ID: Subject: Re: Thoughts on memcmp expansion (PR43052) From: Richard Biener To: Bernd Schmidt Cc: GCC Patches , Nick Clifton Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00982.txt.bz2 On Fri, May 13, 2016 at 3:05 PM, Bernd Schmidt wrote: > On 05/13/2016 12:20 PM, Richard Biener wrote: >> >> I'm not much of a fan of C++-ification (in this case it makes review >> harder) but well ... > > > I felt it was a pretty natural way to structure the code to avoid > duplicating the same logic across more functions, and we might as well use > the language for such purposes given that we've bothered to switch. > >> + if (tree_fits_uhwi_p (len) >> + && (leni = tree_to_uhwi (len)) <= GET_MODE_SIZE (word_mode) >> + && exact_log2 (leni) != -1 >> + && (align1 = get_pointer_alignment (arg1)) >= leni * BITS_PER_UNIT >> + && (align2 = get_pointer_alignment (arg2)) >= leni * BITS_PER_UNIT) >> >> I think * BITS_PER_UNIT has to be * 8 here as the C standard defines >> it that way. > > > Huh? Can you elaborate? When you have a builtin taking a size in bytes then a byte is 8 bits, not BITS_PER_UNIT bits. Richard. > [...] >> >> Ok with those changes. > > > Thanks. I won't be reading email for the next two weeks, so I'll be checking > it in afterwards. > > > Bernd