From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id 88BD4385840F for ; Mon, 14 Nov 2022 17:16:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 88BD4385840F 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-pj1-x102f.google.com with SMTP id q1-20020a17090a750100b002139ec1e999so11317455pjk.1 for ; Mon, 14 Nov 2022 09:16:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=H6rZTpuywCczmnmoCs9wenBpjTQOL1HnZQZ5eBteaFw=; b=PDSTEkM45Gl8KKlFU1tEcvpKgaO6w+5zuQcmZJI1Nl5rXn5Y0q1FTI2pAywwrCn4R2 Vq3W0Y1y63C39kRtGMnbkVIHRFuD/5+zyyT/r2JQYDMODp9o1aaztHOn9lHSEh0woF38 6WPVjYkuWexZL8NMPIUAxV7zNdzRFKD5et5g5tn6nOUqb0d0dXKiV71oHv76kC+kDwTN 0YlmUj/bP5rQ9oBSbwf7GfP0B7TKBFh+0+9mHXPycFjJonZvc8if4kQPH6WuZyN4KnnE BfYXVFLyzcDQEIlljxMD+kVLVBHMUjK8XLpY1Mwx9ALns4wKynbzQZU2ka+GCm1PyGel vhzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references: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=H6rZTpuywCczmnmoCs9wenBpjTQOL1HnZQZ5eBteaFw=; b=yMenU22L2OEEiepqLD+IcqqZ4n1O5yYR7/UUPsiYxw1K30+UHwWXx6LK8gOSd0qFCX dlLi0utXENs/xYR3LhWYVT2StQCWNfZIHPFK3/3j22M8Wu5Ug7HGvNOYai5mBBiGzpca RgDVd5ToJyIRcVClRobBFiVFqWfXejcCUfLIQti6nxWArn8Tj4HK8+CDuSV0i30sjBQT aAe+diqIPMDq5juORuJVApJKVoyOFb4Ji5odj1aeyHsb6d7YAniBCeFD9FwtSXOZpKOI 66Yyw3dSWkC69QGqh3Y5aSNhIEyRZOgZpf7gkUZaLvDkfgpr3c8P4TaiOAQPHVJfJ0qi iZ8Q== X-Gm-Message-State: ANoB5pnn9P/Gdj4yCt4SQc6IKYQ3KazM6B59TxX93SQnagUAWREa67k9 3Evo+QDZFZIYgRK7vUlZ8GA= X-Google-Smtp-Source: AA0mqf5Pa1y5mUuv4FRkF9/N7SPZemdW0v9SCLOJw832iioQVqP6RIEgLy2pZcMIe6Vxkl25iSMnZw== X-Received: by 2002:a17:902:bd4c:b0:188:5c0c:758e with SMTP id b12-20020a170902bd4c00b001885c0c758emr119251plx.168.1668446183362; Mon, 14 Nov 2022 09:16:23 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id p129-20020a622987000000b0055f209690c0sm6986239pfp.50.2022.11.14.09.16.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Nov 2022 09:16:22 -0800 (PST) Message-ID: <4975b815-11e5-28ae-2b7b-9d38886119ed@gmail.com> Date: Mon, 14 Nov 2022 10:16:20 -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: Christoph Muellner , 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> From: Jeff Law In-Reply-To: <20221113230521.712693-6-christoph.muellner@vrull.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_MANYTO,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: 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). jeff