From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 68A02384F037 for ; Mon, 14 Nov 2022 19:05:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 68A02384F037 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-x236.google.com with SMTP id n205so12423395oib.1 for ; Mon, 14 Nov 2022 11:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=nzFoYNKR8mQcutb6h30DkKjxBykjr5nPZrDjtnlj81s=; b=EXGHwU4acP7gPCPOtfYE50S36hIrLYWOK8qGpDewuFJcBJ7qyvf9sQRkOWpH3fn8c4 YKNYu6oY3cMnLX69c7ggDMDtKjs6wp4Lz5iLyKmAq7jbZ9uPD2URXe/N8ZxZO4i2SEfx lb/aaM0mkoNQ20v+26E3b+IO4Vz+7ubruUFPjvwtm8olwlYsW0+e5Tfptjr8wya9ZDJx Y83cbNXE6/ZZwX3uuujHLKTyf9inyn+Ujtszxyobpe51HHphpm/e3WuQOCIGN9edia0X vfvMSzWMo8v0MqKQoHwnCXwpm6fkU2Za/s1MrvRHejHJZKnWZrHhPDApvaz/ydotC4V9 Qyzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=nzFoYNKR8mQcutb6h30DkKjxBykjr5nPZrDjtnlj81s=; b=uCfi0EYE8MwR1G1/2yK1MlvQ1QhO1NFKp5xLJPehWYxc/clfn07kBeTMkw1KAKZE9Z opFNlNYpqS4xGUFfAdCZu78KCgAkQkA3rJZYEsP6ap/ISv9kvfq1W1V8UiNMSBpqQN3c Ut+IGH6ydEKhJLenyzqJGZV0n6kRFVON+wugGTI4e0nWuAaDBdJFkpETWNqWtyrBS3Am FDmjnUkUpc76Y1NLo2bjzb4QDqA6FbxpqNJEAMrDjedqLrcRaNf2RNsn/amA/K0+P+xP Ffjj3317VHiEtn8Z6Y1j6NOImfyRq7ugsK7S4K6GJDHDoK5pWM1xCnWijf9IHfwAjJyk LIkA== X-Gm-Message-State: ANoB5pmuFy1YoUP3fCHxaAX3c18o+AXM15EBQZ4EH5Oe8rHqcRp5I9F/ LqjAubCh7JIRJcpm2NduLpg= X-Google-Smtp-Source: AA0mqf4RdUr08zXWMN3mwEXpAC46uH2aroxisbJnYA8+xgzMt+t0YhDKE2beyCnLBMALU9HFt7ccGg== X-Received: by 2002:aca:110d:0:b0:35a:d20d:52be with SMTP id 13-20020aca110d000000b0035ad20d52bemr6365903oir.270.1668452703471; Mon, 14 Nov 2022 11:05:03 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id bm49-20020a0568081ab100b00353fe4fb4casm3916512oib.48.2022.11.14.11.05.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Nov 2022 11:05:02 -0800 (PST) Content-Type: multipart/alternative; boundary="------------raRedLTz1XDniaZ4DrWncn6q" Message-ID: <3a3bf5d2-249a-cad5-5d67-4a6b81d53d6f@gmail.com> Date: Mon, 14 Nov 2022 12:05:01 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH 5/7] riscv: Use by-pieces to do overlapping accesses in block_move_straight Content-Language: en-US To: =?UTF-8?Q?Christoph_M=c3=bcllner?= Cc: gcc-patches@gcc.gnu.org, Kito Cheng , Jim Wilson , Palmer Dabbelt , Andrew Waterman , Philipp Tomsich , Vineet Gupta References: <20221113230521.712693-1-christoph.muellner@vrull.eu> <20221113230521.712693-6-christoph.muellner@vrull.eu> <4975b815-11e5-28ae-2b7b-9d38886119ed@gmail.com> From: Jeff Law In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: This is a multi-part message in MIME format. --------------raRedLTz1XDniaZ4DrWncn6q Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/14/22 12:01, Christoph Müllner wrote: > > > On Mon, Nov 14, 2022 at 6:16 PM Jeff Law wrote: > > > On 11/13/22 16:05, Christoph Muellner wrote: > > From: Christoph Müllner > > > > The current implementation of riscv_block_move_straight() emits > a couple > > of load-store pairs with maximum width (e.g. 8-byte for RV64). > > The remainder is handed over to move_by_pieces(), which emits > code based > > target settings like slow_unaligned_access and overlap_op_by_pieces. > > > > move_by_pieces() will emit overlapping memory accesses with maximum > > width only if the given length exceeds the size of one access > > (e.g. 15-bytes for 8-byte accesses). > > > > This patch changes the implementation of riscv_block_move_straight() > > such, that it preserves a remainder within the interval > > [delta..2*delta) instead of [0..delta), so that overlapping memory > > access may be emitted (if the requirements for them are given). > > > > gcc/ChangeLog: > > > >       * config/riscv/riscv-string.c (riscv_block_move_straight): > >         Adjust range for emitted load/store pairs. > > The change to riscv_expand_block_move isn't noted in the > ChangeLog.  OK > with that fixed (I'm assuming you want to attempt to use overlapping > word ops for that case). > > > The change in riscv_expand_block_move is a code cleanup. > At the beginning of riscv_expand_block_move we do the following: >   unsigned HOST_WIDE_INT length = UINTVAL (length); AH, missed that. Thanks, Jeff --------------raRedLTz1XDniaZ4DrWncn6q--