From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by sourceware.org (Postfix) with ESMTPS id 15D0B3858400 for ; Sat, 11 Sep 2021 15:17:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 15D0B3858400 Received: by mail-qv1-xf2f.google.com with SMTP id w9so3235547qvs.12 for ; Sat, 11 Sep 2021 08:17:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=i5N8l60X5opcr1fOXeXwZm5Oz1dbrZoobwOFpFA42G8=; b=7ivPXb3DUFXvc66ZXzFNAO+DNrlCOWucWEEEjX8W8u+nAYCpb+gCwnhmpTIMiNZQ93 MNmB0FUWetwLkZg7EdFf6iIEaf8eebYVzIJeUbtzptPAhVjUMw4BAZMRju1mojxVpksc TXO0DBgft8/mn4lx9Xrfk/3NHFXkIN0EfV2jNxUsXIYl6Gmq+pnlYRR0PgxipIg2/6AV XzAQG6R/M33xt3sdl8p0DMxUdqkGhRr/OUQFsjXktZb9++23HYDxoXabX1N2MPL8HMzL nE/aemsAGyI/ZYF9Qr03Zp8xCLhDezEfLtsFZUg5CK6VyE0EPB+Y6uUevpyUp4sqBKTw b01Q== X-Gm-Message-State: AOAM530vnwrN9uT3+v4p5V1E2+1HP4YLi2sxW4vwZmNWIjht5CNxOJya mClkk7vhR4iv8wURYt7XWWa0eR9M0IU= X-Google-Smtp-Source: ABdhPJwtf9pt0MxUP1J47Fo5JiB7FLSWCJS4b+HsY1QUh9Y80iWC7ILcsT9D8Bbbg4Ximcszt+H+Vg== X-Received: by 2002:a0c:b293:: with SMTP id r19mr2517172qve.19.1631373453182; Sat, 11 Sep 2021 08:17:33 -0700 (PDT) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id g5sm1366130qkl.48.2021.09.11.08.17.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Sep 2021 08:17:32 -0700 (PDT) Subject: Re: [PATCH] Also preserve SUBREG_PROMOTED_VAR_P in expr.c's convert_move. To: Roger Sayle , 'GCC Patches' References: <00a901d7a6ef$6b352ac0$419f8040$@nextmovesoftware.com> From: Jeff Law Message-ID: <190b78e0-32a5-d19a-ad31-00b0c1717d89@gmail.com> Date: Sat, 11 Sep 2021 09:17:30 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <00a901d7a6ef$6b352ac0$419f8040$@nextmovesoftware.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2021 15:17:35 -0000 On 9/11/2021 3:28 AM, Roger Sayle wrote: > This patch catches another place in the middle-end where it's possible > to preserve the SUBREG_PROMOTED_VAR_P annotation on a subreg to the > benefit of later RTL optimizations. This adds the same logic to > expr.c's convert_move as recently added to convert_modes. > > On nvptx-none, the simple test program: > > short foo (char c) { return c; } > > currently generates three instructions: > > mov.u32 %r23, %ar0; > cvt.u16.u32 %r24, %r23; > cvt.s32.s16 %value, %r24; > > with this patch, we now generate just one: > > mov.u32 %value, %ar0; > > > This patch should look familiar, it's almost identical to the recent patch > https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578331.html but with > the fix https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578519.html > [Apologies again for this breakage on affected (non-x86_64) targets; I hope > having that fixed within a few hours (before many folks even noticed a > problem) minimized the inconvenience]. > > This patch has been tested on x86_64-pc-linux-gnu with "make bootstrap" > and "make -k check" with no new failures, and on a cross-compiler to > nvptx-none, with no new failures in its testsuite. OK for mainline? > > > 2021-09-11 Roger Sayle > > gcc/ChangeLog > * expr.c (convert_move): Preserve SUBREG_PROMOTED_VAR_P when > creating a (wider) partial subreg from a SUBREG_PROMOTED_VAR_P > subreg. OK Jeff