From patchwork Tue Dec 5 14:28:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 120654 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5815459qgn; Tue, 5 Dec 2017 06:29:16 -0800 (PST) X-Google-Smtp-Source: AGs4zMb03TEXy8EZI79aCa04RrNUjnHEibfR3iQp7fAOFrsDpB/idH0wvZ6dL6+gkO7iKlRGq7Mb X-Received: by 10.84.160.233 with SMTP id v38mr18189072plg.179.1512484156154; Tue, 05 Dec 2017 06:29:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512484156; cv=none; d=google.com; s=arc-20160816; b=MnnE015eiZC2sKiAeJK+Bv8/2N7HT77yFqpvdwvDGahNn9VpuRBTS9WsGWCFH/RaSR L29Ceynjjt7GTDOpYMYFXp4idoMFSwwAc5vAC05IyloIgbj/SYW7p5h0lE/wgLH857/T 4CMUclt7SnagQob39uPh87bIyHnqBs4ZKRD6A10s6ReA4TmN2ZIrAmjRP8UlodbEdY56 fbeVnK4uGCnX6cHkUvVmIK4FD/E8+zDgr5lBAjcP6KIQlvT9XAka9ltje0o9vIBnuIHO zOoAuBNOrgwb3/3XFeNz6viUlumFMQCFMOyI39XGFVnUOB4ye/xNj1dPgGdYIXcWfkL5 qFVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:date:subject:cc:mail-followup-to :to:from:delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=DYnwNDrKorCw6egjGk0pFpWFfS6XYzQLT+kAFE+HdUU=; b=D7rBLdYcPQKhk0Db1SpL2V0xFlt5IKbEQB2G0TavTZzBte7aKvGRF4MRaZv627oGHP Nmn+F/U1LwguScrSZ5ju0l4cO2tQ1DkkafAweo0f8Tkm9GKMEpQHztxjYJ3MQ9vL5pL5 mBhY8Yoo5rfFQp9J6pf7cixBOAYlks4lpv939MLpbDy5QtITdzPQMKtKdCqY7CaOGIyy PkHheGh38XajmeI+FbRuvTdskvlvSq6NzuSwRbbISnaOw4JqZHnSrmuXEWrIEWDE8zbd CKA6D3fZekcPxoQWhN15dpBgHVzzlRlh5hIJw/OrJmp231x8dZYP+tNsyn38v/yRXE/R Za2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=J7H3xHpH; spf=pass (google.com: domain of gcc-patches-return-468523-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-468523-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id t134si153558pgc.384.2017.12.05.06.29.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 06:29:16 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-468523-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=J7H3xHpH; spf=pass (google.com: domain of gcc-patches-return-468523-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-468523-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=t50el0gkGyEj59qk2MXZe++az96d8TwCX5ZJUrzdXBK001fuTQ 9/In/K9NISV6rCvHsA+o2IhVz/lUK4UW5BAOPYpOQT9BeRgrAaM3PNl6wohKpuQu cSXvolZVc97c04cp7VZdDc4ELZ0TIDq7w2s9hLnotSMC2Ogb8QRnU4Opg= 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:cc:subject:date:message-id:mime-version:content-type; s= default; bh=yBp1yP4a+HCmWuKD6af2ehEmYZw=; b=J7H3xHpHf6aQF5aoAICY haYAFls2m7vbuZa3e7x2uCDnKZbPBam6g5cdHdrC0E9+Kxptjkr7bqebKjAXowIF gcyTgPdIqUWEsR2AbGeeMzxCGFZhMBzqnUfF/11F3PtUlD2dsaNYQYChxG3DQXqw TCLWQQ7yAsyydgIKsSUSz2Q= Received: (qmail 45421 invoked by alias); 5 Dec 2017 14:29:04 -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 45409 invoked by uid 89); 5 Dec 2017 14:29:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wr0-f176.google.com Received: from mail-wr0-f176.google.com (HELO mail-wr0-f176.google.com) (209.85.128.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Dec 2017 14:29:02 +0000 Received: by mail-wr0-f176.google.com with SMTP id z18so481187wrb.8 for ; Tue, 05 Dec 2017 06:29:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:cc:subject:date :message-id:user-agent:mime-version; bh=DYnwNDrKorCw6egjGk0pFpWFfS6XYzQLT+kAFE+HdUU=; b=VSZTS/6nqXQDBqh8k3BeLi2HMXveYDZkXZX/TTiyrVxtV+PuXS0DVEndFL6cqnTUNP rj032DH/tLv1Bmeb8uk+MPRhhfiojHTIKKXQMXGOKe1l7GsP5KExU2mvAGe80Rmb+b+o dAJdI1OHTUV9ADyGVNQxfQbgSyCAG2DT65hO8XKl32t/9Y3PRiYhEH8NotMngyNcJybU IpO8UJR6JayTZ6MrZ1vfUY9wguIHwLWeSSMO9/uksNJ4QPpZKEiImPN1kfNeb8hChWT1 CSivugQSXW2lkXjK6SkGK3jfROokcIw6QyP9RlgpceMYMzCfuz7FgDKENYN5my9LnBtu Mapw== X-Gm-Message-State: AJaThX6fdrT7X6ozXKfxDF52soic+IzBxBNHXNYJPj6/8DiglAIoUK4O Okeu0a7aepdtRyGV/2sndXaqaq32+lc= X-Received: by 10.223.175.100 with SMTP id z91mr18497127wrc.138.1512484140023; Tue, 05 Dec 2017 06:29:00 -0800 (PST) Received: from localhost (94.197.120.59.threembb.co.uk. [94.197.120.59]) by smtp.gmail.com with ESMTPSA id y99sm660195wmh.0.2017.12.05.06.28.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Dec 2017 06:28:59 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com, richard.sandiford@linaro.org Cc: richard.earnshaw@arm.com, james.greenhalgh@arm.com, marcus.shawcroft@arm.com Subject: [AArch64] Fix some define_insn_and_split conditions Date: Tue, 05 Dec 2017 14:28:56 +0000 Message-ID: <87wp21b653.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 The split conditions for aarch64_simd_bsldi_internal and aarch64_simd_bsldi_alt were: "&& GP_REGNUM_P (REGNO (operands[0]))" But since they (deliberately) can be split before reload, the operand matched by register_operand can be a SUBREG rather than a REG. This triggered a boostrap failure building libgcc with rtl checking enabled. While checking other define_insn_and_splits for the same thing, I noticed a couple of SIMD ones were missing the leading "&&", meaning that they would trigger even without TARGET_SIMD. That shouldn't matter in practice, since combine should never end up generating matching rtl, but... Tested on aarch64-linux-gnu. OK to install? Thanks, Richard 2017-12-05 Richard Sandiford gcc/ * config/aarch64/aarch64-simd.md (aarch64_simd_bsldi_internal) (aarch64_simd_bsldi_alt): Check REG_P before GP_REGNUM_P. (aarch64_cmdi, aarch64_cmtstdi): Add leading "&&" to split condition. Index: gcc/config/aarch64/aarch64-simd.md =================================================================== --- gcc/config/aarch64/aarch64-simd.md 2017-12-05 14:24:52.474015293 +0000 +++ gcc/config/aarch64/aarch64-simd.md 2017-12-05 14:25:28.128170629 +0000 @@ -2484,7 +2484,7 @@ (define_insn_and_split "aarch64_simd_bsl bit\\t%0.8b, %2.8b, %1.8b bif\\t%0.8b, %3.8b, %1.8b #" - "&& GP_REGNUM_P (REGNO (operands[0]))" + "&& REG_P (operands[0]) && GP_REGNUM_P (REGNO (operands[0]))" [(match_dup 1) (match_dup 1) (match_dup 2) (match_dup 3)] { /* Split back to individual operations. If we're before reload, and @@ -2526,7 +2526,7 @@ (define_insn_and_split "aarch64_simd_bsl bit\\t%0.8b, %3.8b, %1.8b bif\\t%0.8b, %2.8b, %1.8b #" - "&& GP_REGNUM_P (REGNO (operands[0]))" + "&& REG_P (operands[0]) && GP_REGNUM_P (REGNO (operands[0]))" [(match_dup 0) (match_dup 1) (match_dup 2) (match_dup 3)] { /* Split back to individual operations. If we're before reload, and @@ -4453,7 +4453,7 @@ (define_insn_and_split "aarch64_cm