From patchwork Sun Jan 21 13:03:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 864063 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-471757-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Qe+Gny1D"; 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 3zPZW140bMz9t1t for ; Mon, 22 Jan 2018 00:03:23 +1100 (AEDT) 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=R/G0zgaJlItBScCDqIFltBXx8vFBVLcjyQmPDD82D+mISZ nu4c5O1pxV7zj1iP97mPKSAq2wblA/ANEzWn8bU/5gsYeVIQoNKioNTcZMBYB9sy gMS2U07s+E0N26v/zrkcRpg+52059UGJ98Qk1UzWqETROfsrILlD3Y47LJk2k= 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=qKfwZ8syZ20mZBNPrxYYabRD5qg=; b=Qe+Gny1DfFqSZlN+VbQn VwpERxUIfnqqEu+v4uy8UhgG3GTg8gvFaz2YgFOxu8ojK9rmih4tuvHHan+H4L7d wA8Nuf95dGWa1LWJsobZ9geMV5cXW/6fZ9W+kbUHgXKc8ClCveHxdgYPx6er9LKh hsq213FupB6YqtzvC5aUzDw= Received: (qmail 107992 invoked by alias); 21 Jan 2018 13:03:16 -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 107296 invoked by uid 89); 21 Jan 2018 13:03:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=256929, pr, Hx-languages-length:974 X-HELO: mailout02.t-online.de Received: from mailout02.t-online.de (HELO mailout02.t-online.de) (194.25.134.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 21 Jan 2018 13:03:14 +0000 Received: from fwd10.aul.t-online.de (fwd10.aul.t-online.de [172.20.26.152]) by mailout02.t-online.de (Postfix) with SMTP id A3F2E41BD808 for ; Sun, 21 Jan 2018 14:03:11 +0100 (CET) Received: from [192.168.0.55] (rXaDWmZJwhTe6gbBUsNgVDL3ES+za6eWWpd4uZIoU3q1BJrkZSUxoRJInaKqB3-Q2u@[163.58.16.102]) by fwd10.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1edFHC-2KKkam0; Sun, 21 Jan 2018 14:03:10 +0100 Message-ID: <1516539782.13888.14.camel@t-online.de> Subject: [SH][committed] Fix PR 81485 From: Oleg Endo To: gcc-patches Date: Sun, 21 Jan 2018 22:03:02 +0900 Mime-Version: 1.0 X-IsSubscribed: yes Hi, The following fixes PRĀ 81485. Tested with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/- ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" Committed as r256930. Cheers, Oleg gcc/ChangeLog: PR target/81485 * config/sh/sh-protos.h (sh_find_set_of_reg): Remove assert. Index: gcc/config/sh/sh-protos.h =================================================================== --- gcc/config/sh/sh-protos.h (revision 256929) +++ gcc/config/sh/sh-protos.h (working copy) @@ -228,9 +228,13 @@ } } - if (result.set_src != NULL) - gcc_assert (result.insn != NULL && result.set_rtx != NULL); - + /* If the searched reg is found inside a (mem (post_inc:SI (reg))), set_of + will return NULL and set_rtx will be NULL. + In this case report a 'not found'. result.insn will always be non-null + at this point, so no need to check it. */ + if (result.set_src != NULL && result.set_rtx == NULL) + result.set_src = NULL; + return result; }