From patchwork Fri Feb 9 05:42:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 871216 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-472917-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="ecBJX89B"; 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 3zd3r92QNQz9sPk for ; Fri, 9 Feb 2018 16:43:03 +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:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=VBhPUS+a0K3EvbEqF/8esOXlezKwC0hGQBFCiqO5rATCoGYg+n Qa3ZCMd2nWiw5EauP/6Kcak3W1h6f/ogLTWrz2uJvqLaFfMe6FdXeFGJ4P+AZWbi kBjXyKWcbi4Hky+gPf4ZhKyly5IMB1IBYwpEKktuyJSHeX4l6XXsDVRzQ= 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 :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=qr2scQXt9Yn/E6aVRirGO6Gmf/4=; b=ecBJX89BfsjbUKCDKMFx XoaJd7j03n+RIDnb5+xfVzZDBTJFnNvDZsYt4/EV5yKtCPFMQxtb/f1+LSjvEkHL Ztft+erUfWYOGRvpTBTZGimG4iRFeD5CT2Y3Zdn93o011K3/Afm9Fbrj5bhgfUmN s7ZyxAyn8I9BNnUmZ3/BcFA= Received: (qmail 56693 invoked by alias); 9 Feb 2018 05:42:56 -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 56677 invoked by uid 89); 9 Feb 2018 05:42:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=lr, HX-Received:10.99.120.66 X-HELO: mail-pg0-f67.google.com Received: from mail-pg0-f67.google.com (HELO mail-pg0-f67.google.com) (74.125.83.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Feb 2018 05:42:54 +0000 Received: by mail-pg0-f67.google.com with SMTP id s73so2939702pgc.1 for ; Thu, 08 Feb 2018 21:42:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=B31MKlDRv7jkWc3clNDB5aL47SMQal7oLJZJUysEA/M=; b=ItkkuYiBBQIJi2ovyB2qJnFpQV1LZtiE8A94s3hPPKM6R7uPXcZvL/22npbcwWRoPb Zg8W+/i6JnhRvEh+t0Nha2LyodtE+QisLzQs/8tGhUgV6QB69fdgx7yCDYZ/Np9n1Quy WC1P/Ex7xkEDAhwCrLHhLWaY7XxX48r1aOPxHPlscUi8P4RCDOX+aBmg0vDYuXK3ztZb yGzg3Is31kVa3hGtD3/zYW9w8umsOoqtCM/vyY0HVG2ddocMl94y1TOuXE6TOhDjyW+n ZfalGXgSvB2MBsqgk6XimT1wVayeqXJQjWWMmNcAKzNQ4fzzCz9WvCATMkgRvfbSoSY1 V1fw== X-Gm-Message-State: APf1xPCC0X68fkfQxWc8n9zpLIiryTSxxAqQ1oo2CRKeDvKG0DFnhdYz fStcuTcyxrkNN1sR94xJ5mtSDg== X-Google-Smtp-Source: AH8x2249THXpJl4KT3BCrUortNvJrj/DQu/2/mMoI0Ej+ydU0sxUXaMWe69mkFaATF4qcfyL9Iz0sQ== X-Received: by 10.99.120.66 with SMTP id t63mr1423267pgc.111.1518154972788; Thu, 08 Feb 2018 21:42:52 -0800 (PST) Received: from bubble.grove.modra.org (CPE-58-175-244-173.hdcz1.win.bigpond.net.au. [58.175.244.173]) by smtp.gmail.com with ESMTPSA id z128sm3726395pfb.36.2018.02.08.21.42.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 21:42:51 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 9B050C0781; Fri, 9 Feb 2018 16:12:47 +1030 (ACDT) Date: Fri, 9 Feb 2018 16:12:47 +1030 From: Alan Modra To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool Subject: PR84300, ICE in dwarf2cfi on ppc64le Message-ID: <20180209054247.GG3846@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes This PR is one of those with a really obvious cause, and fix. There's nothing in the unspec rtl to say the insn needs lr! Bootstrapped and regression tested powerpc64le-linux. OK? PR target/84300 gcc/ * config/rs6000/rs6000.md (split_stack_return): Use LR. gcc/testsuite/ * gcc.dg/pr84300.c: New. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 33f0d95..287461f 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -13359,7 +13359,8 @@ (define_insn "load_split_stack_limit_si" ;; Use r0 to stop regrename twiddling with lr restore insns emitted ;; after the call to __morestack. (define_insn "split_stack_return" - [(unspec_volatile [(use (reg:SI 0))] UNSPECV_SPLIT_STACK_RETURN)] + [(unspec_volatile [(use (reg:SI 0)) (use (reg:SI LR_REGNO))] + UNSPECV_SPLIT_STACK_RETURN)] "" "blr" [(set_attr "type" "jmpreg")]) diff --git a/gcc/testsuite/gcc.dg/pr84300.c b/gcc/testsuite/gcc.dg/pr84300.c new file mode 100644 index 0000000..6016799 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr84300.c @@ -0,0 +1,5 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target split_stack } */ +/* { dg-options "-g -O2 -fsplit-stack -fno-omit-frame-pointer" } */ + +void trap () { __builtin_trap (); }