From patchwork Mon Jan 16 11:23:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 715649 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 3v29pd2WPlz9stc for ; Mon, 16 Jan 2017 22:23:35 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="fQBWDT3U"; 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 :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=cXuPbvWQC5AqFkFwXx+bbr1hAp4TDp+uqtAcNYiV1mtoktAyak bxpKFneL0kBh+e8L3F3rS4Sg8qK/hJT1Q2cBGwobjA0xcUjN3bQ87OaAg328Zp2/ QsVieS9CV6ylaJu9mdvouIuhhePbaUPXutr5ZIzpWR1F4FXGaNzKmzDEc= 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=nhKUoxsCEqdaDnUwJalOWG+QVLM=; b=fQBWDT3UagSaCpPUC7Rs XcpbKawuWZTth7wGdCuqJeKepkkDnaLmS7eg5THoIIvjt4qZW2W9Eu3nOOSuO/hd dlKE5bChrg6CuK0BnbgPYVxl72NVsCIMYmlgkxvpYSm1VOAA7izWS1gLzFzgq1cv S+si+HJlE8wyGqPSV63JGT8= Received: (qmail 116603 invoked by alias); 16 Jan 2017 11:23:26 -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 115353 invoked by uid 89); 16 Jan 2017 11:23:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=sk:11394b2, Hx-languages-length:3728, transfer, highly X-HELO: mail-pf0-f195.google.com Received: from mail-pf0-f195.google.com (HELO mail-pf0-f195.google.com) (209.85.192.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Jan 2017 11:23:23 +0000 Received: by mail-pf0-f195.google.com with SMTP id f144so13993088pfa.2 for ; Mon, 16 Jan 2017 03:23:23 -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=QJyrvUuQ9EwD/8+P4m4mexra1Jc2eKmL+vUPHoce46g=; b=WkwCltWOcmZFR7s9Pvc+StKERBsL0Y+lFpa/DQQuhpG/DiCp0bGuLUh+D0zsazj/3q 1P5dlwrEew4Fk5DOJcfJiyMIhE2+0OoO5AtIJPcPSiHEYWRwGZSi1T0dOqHdxlAqeELO sk5QwpqlmkGcv9yparAICWDKkrjwAes5yplPFTJkmth4QnODeRAGaW4Bn2nTEBsKCIf6 GanGXrFQk0a4Kk9FHjomVpTZSFLBBOwIw+gh6U+dintyzRkNQKOUJtQn6wLtn0gt7bIz HeQosm45BYoIzFH91+vKql6/uvKnQzBVvlkYQISNhW3NGXbMlsn8x7CMT6WZgliCDXiN ug8A== X-Gm-Message-State: AIkVDXLyb5T1nUDvoEK5bmtzlX+Lb326Kx/ohyUYy6i3V38w3aYWsNk/YR9Vq4t5i+spQw== X-Received: by 10.84.209.204 with SMTP id y70mr49902487plh.180.1484565802151; Mon, 16 Jan 2017 03:23:22 -0800 (PST) Received: from bubble.grove.modra.org (CPE-58-160-71-80.tyqh2.lon.bigpond.net.au. [58.160.71.80]) by smtp.gmail.com with ESMTPSA id o24sm46992562pfj.78.2017.01.16.03.23.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jan 2017 03:23:21 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 5A9F5C0510; Mon, 16 Jan 2017 21:53:17 +1030 (ACDT) Date: Mon, 16 Jan 2017 21:53:17 +1030 From: Alan Modra To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool Subject: Powerpc bootstrap failure due to duplicate case value Message-ID: <20170116112317.GF32333@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes Commited as obvious. PR target/79098 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't use a switch. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 11394b2..f1d5d9d 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -9085,40 +9085,41 @@ rs6000_const_not_ok_for_debug_p (rtx x) static bool rs6000_legitimate_combined_insn (rtx_insn *insn) { - switch (INSN_CODE (insn)) - { - /* Reject creating doloop insns. Combine should not be allowed - to create these for a number of reasons: - 1) In a nested loop, if combine creates one of these in an - outer loop and the register allocator happens to allocate ctr - to the outer loop insn, then the inner loop can't use ctr. - Inner loops ought to be more highly optimized. - 2) Combine often wants to create one of these from what was - originally a three insn sequence, first combining the three - insns to two, then to ctrsi/ctrdi. When ctrsi/ctrdi is not - allocated ctr, the splitter takes use back to the three insn - sequence. It's better to stop combine at the two insn - sequence. - 3) Faced with not being able to allocate ctr for ctrsi/crtdi - insns, the register allocator sometimes uses floating point - or vector registers for the pseudo. Since ctrsi/ctrdi is a - jump insn and output reloads are not implemented for jumps, - the ctrsi/ctrdi splitters need to handle all possible cases. - That's a pain, and it gets to be seriously difficult when a - splitter that runs after reload needs memory to transfer from - a gpr to fpr. See PR70098 and PR71763 which are not fixed - for the difficult case. It's better to not create problems - in the first place. */ - case CODE_FOR_ctrsi_internal1: - case CODE_FOR_ctrdi_internal1: - case CODE_FOR_ctrsi_internal2: - case CODE_FOR_ctrdi_internal2: - case CODE_FOR_ctrsi_internal3: - case CODE_FOR_ctrdi_internal3: - case CODE_FOR_ctrsi_internal4: - case CODE_FOR_ctrdi_internal4: - return false; - } + int icode = INSN_CODE (insn); + + /* Reject creating doloop insns. Combine should not be allowed + to create these for a number of reasons: + 1) In a nested loop, if combine creates one of these in an + outer loop and the register allocator happens to allocate ctr + to the outer loop insn, then the inner loop can't use ctr. + Inner loops ought to be more highly optimized. + 2) Combine often wants to create one of these from what was + originally a three insn sequence, first combining the three + insns to two, then to ctrsi/ctrdi. When ctrsi/ctrdi is not + allocated ctr, the splitter takes use back to the three insn + sequence. It's better to stop combine at the two insn + sequence. + 3) Faced with not being able to allocate ctr for ctrsi/crtdi + insns, the register allocator sometimes uses floating point + or vector registers for the pseudo. Since ctrsi/ctrdi is a + jump insn and output reloads are not implemented for jumps, + the ctrsi/ctrdi splitters need to handle all possible cases. + That's a pain, and it gets to be seriously difficult when a + splitter that runs after reload needs memory to transfer from + a gpr to fpr. See PR70098 and PR71763 which are not fixed + for the difficult case. It's better to not create problems + in the first place. */ + if (icode != CODE_FOR_nothing + && (icode == CODE_FOR_ctrsi_internal1 + || icode == CODE_FOR_ctrdi_internal1 + || icode == CODE_FOR_ctrsi_internal2 + || icode == CODE_FOR_ctrdi_internal2 + || icode == CODE_FOR_ctrsi_internal3 + || icode == CODE_FOR_ctrdi_internal3 + || icode == CODE_FOR_ctrsi_internal4 + || icode == CODE_FOR_ctrdi_internal4)) + return false; + return true; }