From patchwork Tue Oct 1 15:04:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 1170001 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-509986-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="wmo8R3W2"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46jMyD5dPdz9sP7 for ; Wed, 2 Oct 2019 01:05:07 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:content-type:mime-version; q= dns; s=default; b=uuOn71UYbOMfriI6AM0DMIX9Mc6xblqvTGdjyhKmcUUr5H g/ZFHmKYjLubVAT9GCaqOkmHnM8feVNqwHyKzYAWXncsE+9ldtmVCJzkbFlTlicR dINEiqtMLRR+Zh77HXgFmPLkrKQRfevz5dvGMzrtBXRUPwcpDiKxlMKVOXjFE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:content-type:mime-version; s= default; bh=xMJ0JekCGjSIoKrTCom3rnPAdEo=; b=wmo8R3W2Cd5RK2wuFWlR rJawGRPOjND0c9KoR8wDdpVUD3KVkTjJgDBGHZ23lJK1WUbr1UuPmhOSGwjHqBE+ fKCRNVqnK5pzz+EDKE9Pu2aVDxMZrSPX2L3zp7jQt9H1lJpuvo8UcO/4wPUCh+Ht Ck2CGv3Cxr462EmRcK/FZac= Received: (qmail 111089 invoked by alias); 1 Oct 2019 15:04:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 111043 invoked by uid 89); 1 Oct 2019 15:04:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_JMF_BL, SPOOFED_FREEMAIL autolearn=ham version=3.3.1 spammy=H*MI:online, H*M:online, HX-HELO:sk:mailout, H*F:D*t-online.de X-HELO: mailout06.t-online.de Received: from mailout06.t-online.de (HELO mailout06.t-online.de) (194.25.134.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 01 Oct 2019 15:04:55 +0000 Received: from fwd05.aul.t-online.de (fwd05.aul.t-online.de [172.20.27.149]) by mailout06.t-online.de (Postfix) with SMTP id D4EDB419ECB7 for ; Tue, 1 Oct 2019 17:04:52 +0200 (CEST) Received: from yam-desktop (ZYcDumZQ8hZYrYlsR71vryOZsoE3EmW9tbdYarq-yULY6wS5jVLQ1i6kuTX4R2VQQf@[163.58.16.102]) by fwd05.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1iFJhs-0MyPL60; Tue, 1 Oct 2019 17:04:52 +0200 Message-ID: Subject: [SH][committed] Fix PR 88562 From: Oleg Endo To: gcc-patches Date: Wed, 02 Oct 2019 00:04:48 +0900 Mime-Version: 1.0 X-IsSubscribed: yes Hi, The attached patch fixes PR 88562. Tested on trunk with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb}" Committed to trunk, GCC 9, GCC 8, GCC 7 as r276411, r276412, r276413, r276414. Cheers, Oleg gcc/ChangeLog: PR target/88562 * config/sh/sh.c (sh_extending_set_of_reg::use_as_extended_reg): Use sh_check_add_incdec_notes to preserve REG_INC notes when replacing a memory access insn. Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (revision 276264) +++ gcc/config/sh/sh.c (working copy) @@ -12068,9 +12068,11 @@ rtx r = gen_reg_rtx (SImode); rtx_insn* i0; if (from_mode == QImode) - i0 = emit_insn_after (gen_extendqisi2 (r, set_src), insn); + i0 = sh_check_add_incdec_notes ( + emit_insn_after (gen_extendqisi2 (r, set_src), insn)); else if (from_mode == HImode) - i0 = emit_insn_after (gen_extendhisi2 (r, set_src), insn); + i0 = sh_check_add_incdec_notes ( + emit_insn_after (gen_extendhisi2 (r, set_src), insn)); else gcc_unreachable ();