From patchwork Fri Aug 7 08:13:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaz Kojima X-Patchwork-Id: 505031 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 C899614029D for ; Fri, 7 Aug 2015 18:13:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=c332rEnz; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:to:subject:from:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=wytoEp1kuh03Kyt1 HBh2DtrzZA1FiTpaZosCV4K4X7ZTJdQZMrCQm1cIaD+JXzGKKqzfkXwjosnloaUv m2W0xsjHzFKwUlt3WoLHoBklOlOD4nAnBxYzwzfSZW7yv6woEsLZKai8gwvDdRjb H3UivgSl0hE9iIGuFw3hE64B+zg= 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:date :message-id:to:subject:from:mime-version:content-type :content-transfer-encoding; s=default; bh=ty41UtAN0oKxrrBTU2LFo0 qX7bo=; b=c332rEnz+JMW7dsM/QUnSeD77OpMa/qY6njW3iD1Z5E3cPY4iKs+pU C8IvvcS9ZMXEwBn/MoSWVR1bmqy/dUq7o7e1+HGL64KpJQ7ld+xR09bE/Jt5YIHt WBExOn4tc5eii2++XJfLZC+v9uUpAIhCxxf3RpN5aQXp94pYp0Wh4= Received: (qmail 13552 invoked by alias); 7 Aug 2015 08:13:27 -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 13371 invoked by uid 89); 7 Aug 2015 08:13:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mo-sw.iij4u.or.jp Received: from mo-sw1500.iij4u.or.jp (HELO mo-sw.iij4u.or.jp) (210.130.239.240) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 07 Aug 2015 08:13:25 +0000 Received: by mo-sw.iij4u.or.jp (4u-mo-sw1500) id t778DLa6006743; Fri, 7 Aug 2015 17:13:22 +0900 Received: from localhost (24.26.30.125.dy.iij4u.or.jp [125.30.26.24]) by mbox.iij4u.or.jp (4u-mbox1501) id t778DKM2012791; Fri, 7 Aug 2015 17:13:20 +0900 Date: Fri, 07 Aug 2015 17:13:19 +0900 (JST) Message-Id: <20150807.171319.109382976.kkojima@rr.iij4u.or.jp> To: gcc-patches@gcc.gnu.org Subject: [patch committed SH] Fix target/67002 From: Kaz Kojima Mime-Version: 1.0 X-IsSubscribed: yes I've committed the attached tiny patch to fix PR target/67002 which is a 5/6 regression. sh_recog_treg_set_expr are called unexpectedly during expand phase only when -g is specified and it might cause -fcompare-debug failure. The patch is tested on sh4-unknown-linux-gnu. I'll backport it to 5. Regards, kaz --- 2015-08-07 Kaz Kojima PR target/67002 * config/sh/sh.c (sh_recog_treg_set_expr): Return false when currently_expanding_to_rtl is set. diff --git a/config/sh/sh.c b/config/sh/sh.c index f429193..450d634 100644 --- a/config/sh/sh.c +++ b/config/sh/sh.c @@ -14165,6 +14165,12 @@ sh_recog_treg_set_expr (rtx op, machine_mode mode) if (!can_create_pseudo_p ()) return false; + /* expand_debug_locations may call this to compute rtx costs at + very early stage. In that case, don't make new insns here to + avoid codegen differences with -g. */ + if (currently_expanding_to_rtl) + return false; + /* We are going to invoke recog in a re-entrant way and thus have to capture its current state and restore it afterwards. */ recog_data_d prev_recog_data = recog_data;