From patchwork Thu Feb 1 17:20:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 868298 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-472491-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="pxXA6xJS"; 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 3zXRj03yJLz9t45 for ; Fri, 2 Feb 2018 04:20:52 +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:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=eAKdhHaiqxveq27oc2eZjrpHz1BVITdV7S2HOeXx7wQVykG/c7 dtD71EyxOPvHfPiHpUCLg2VfkBpOkrKkgpXTMxKogMRlPf+Ix7kTLkO2Qx3FcqXN CRwZzWzgNJl+DiTSOCn8IvqI5fG6zKOyC21JjQlhb1tZH0NtdqLwWi3Mw= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=8BuvGiytN27Dgzd7z/uEHGQyB2w=; b=pxXA6xJScB69weX6v+jz RRv3+sGcfvU+QsytNP1E29zVmtMVyR9danU2/agRFMQGGFqN3Z5m/GObVlltBjcp scNzo7Y/NxS2Zrv1Ttom0bo10eWr39iLkd7odz2WSiey2ULxzJdUV8Enu71M35Jo Yoio2xcD1ojzk6YhdhvpYNk= Received: (qmail 72900 invoked by alias); 1 Feb 2018 17:20:45 -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 72882 invoked by uid 89); 1 Feb 2018 17:20:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=pas X-HELO: mail-wr0-f173.google.com Received: from mail-wr0-f173.google.com (HELO mail-wr0-f173.google.com) (209.85.128.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Feb 2018 17:20:43 +0000 Received: by mail-wr0-f173.google.com with SMTP id v15so19825727wrb.8 for ; Thu, 01 Feb 2018 09:20:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language; bh=35i8k8lZLKJQPpCkTkaz1fovxLjw/MtoaPNRzVpYrxU=; b=DTQudp+XmT62yD2B1KuE3iyzbSBsk7+14/HXOb7EE4JGPUknk78sqcez9uhmJbYujo N9UA3J9xHxkajz47waiGG+hzjS0mMnjWj+PgdcVVKnczvsIviv4LS6lIQ4oA3wUcEERQ BZTCTrCQnxvZUkHwxeXdESm9NPzErsh53YV9+ac6ONKwx0d4A3Eh48Fi3CeaR7qSPSdj 8RyQ3/7J/y9nQZEi9F7rikLDHGRnK8oDJpdtLU2Ahp+BUqk59AwbrnFRDfeD2FDUBDGX h9Pa5jrW9tZrsQ1SSmvEUv6aXARGTaofSHC6cd5PhpAGoBwMAupXZ9zMVD63x/gL+sCI KfTA== X-Gm-Message-State: AKwxytd3oz544iWZ3gAzUpAFSygYPv31iIsh3AX944gMrmZiUxkvU7/n tA+j3b4byaqhRm075RV/59zH/WWNpNk= X-Google-Smtp-Source: AH8x225IzK1o2uISfdCnrxIDGWyFmv+XkF9LT0ST00lE0oZXZfgShyfKwuNrAP6qiHHXBSVAd7n3fQ== X-Received: by 10.223.190.18 with SMTP id n18mr12290811wrh.102.1517505641317; Thu, 01 Feb 2018 09:20:41 -0800 (PST) Received: from abulafia.quesejoda.com (55.red-88-8-76.dynamicip.rima-tde.net. [88.8.76.55]) by smtp.gmail.com with ESMTPSA id t141sm443858wmd.34.2018.02.01.09.20.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 09:20:40 -0800 (PST) To: dave.anglin@bell.net Cc: gcc-patches From: Aldy Hernandez Subject: [PR target/84089] handle E_VOIDmode in PA's base14_operand Message-ID: <90c32ca3-75c6-ceda-becf-37b4f4cfbebf@redhat.com> Date: Thu, 1 Feb 2018 12:20:39 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 X-IsSubscribed: yes Before r196122, a VOIDmode would return the default value of false in base14_operand, but when S?mode and D?mode's were collapsed with the aforementioned patch, we started handling E_VOIDmode which has a size of 0. The zero is causes a division by zero in the PR's testcase. Dave has suggested returning false for E_VOIDmode. Having no access to a PA system, I haven't tested this other than visual inspection and making sure we don't ICE. However, since a VOID clearly causes a division by zero, we're not worse off than before :). Perhaps someone with access to a PA box can run further tests. In the meantime... committed to trunk. Pre-approved by Dave. Aldy PR target/84089 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode. diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md index 4600f988c87..cc2bffa0762 100644 --- a/gcc/config/pa/predicates.md +++ b/gcc/config/pa/predicates.md @@ -277,6 +277,9 @@ case E_HImode: return true; + case E_VOIDmode: + return false; + default: return (INTVAL (op) % GET_MODE_SIZE (mode)) == 0; }