From patchwork Tue Oct 17 20:29:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 827295 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-464378-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="AkvHFYp2"; 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 3yGmxk4ZgWz9t2c for ; Wed, 18 Oct 2017 07:29:13 +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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=OJgZYJhAh/sJ2Svk X2LZfFrIwZjQM4CQEDKlP+luejsoFIPAJQrDUA8dUv5cGlAFMcRQJAvcLZAEHjS+ kRInKd0LyWoHQP1iz9RVp8UFxHwJ/jQsNogvAwQvkgQg9Uf5PTvNIEHe4t5bgjbr 4eU5gP9yGxZZv6diyZUB5Lxx4oE= 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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=TrUjcTlSTgLigsRbCDptvi r/kp0=; b=AkvHFYp2t9ONKLlpQppcILFY+IyhQsfjvuRZN67ltRKkmTiFdptycX n9wXg6K6d/eRBqCaEdSZ/5R2S1QhXqr5fktjzsgofIdkcYwr/Kwhx1BYJTzbrFZM BNLkwGV4zgLCgTC+fV7IzfK/wCH9ax+s83d1ukNoK11VUCezbFU3w= Received: (qmail 86663 invoked by alias); 17 Oct 2017 20:29:06 -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 86654 invoked by uid 89); 17 Oct 2017 20:29:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Oct 2017 20:29:03 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id B61A081A12 for ; Tue, 17 Oct 2017 22:29:01 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H5bVAy089Cz8 for ; Tue, 17 Oct 2017 22:29:01 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 893C881A10 for ; Tue, 17 Oct 2017 22:29:01 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Visium] Fix build breakage Date: Tue, 17 Oct 2017 22:29 +0200 Message-ID: <8720466.pMdDUnxbL2@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-53-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 The compare-elim.c change broke the build because the pass now sends all kind of junk RTXes to the select_cc_mode target hook, which was written in exact keeping with arithmetic patterns of the MD file. We now need to handle all possible RTXes on the RHS of an assignment, even calls. Tested on visium-elf, applied on the mainline. 2017-10-17 Eric Botcazou * config/visium/visium.c (visium_select_cc_mode): Return CCmode for any RTX present on the RHS of a SET. * compare-elim.c (try_eliminate_compare): Restore comment. Index: config/visium/visium.c =================================================================== --- config/visium/visium.c (revision 253767) +++ config/visium/visium.c (working copy) @@ -2938,12 +2938,6 @@ visium_select_cc_mode (enum rtx_code cod /* This is a btst, the result is in C instead of Z. */ return CCCmode; - case CONST_INT: - /* This is a degenerate case, typically an uninitialized variable. */ - gcc_assert (op0 == constm1_rtx); - - /* ... fall through ... */ - case REG: case AND: case IOR: @@ -2960,6 +2954,17 @@ visium_select_cc_mode (enum rtx_code cod when applied to a comparison with zero. */ return CCmode; + /* ??? Cater to the junk RTXes sent by try_merge_compare. */ + case ASM_OPERANDS: + case CALL: + case CONST_INT: + case LO_SUM: + case HIGH: + case MEM: + case UNSPEC: + case ZERO_EXTEND: + return CCmode; + default: gcc_unreachable (); } Index: compare-elim.c =================================================================== --- compare-elim.c (revision 253767) +++ compare-elim.c (working copy) @@ -729,6 +729,7 @@ try_eliminate_compare (struct comparison if (try_merge_compare (cmp)) return true; + /* We must have found an interesting "clobber" preceding the compare. */ if (cmp->prev_clobber == NULL) return false;