From patchwork Fri Oct 4 14:44:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 1171876 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-510265-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ouzhEtQO"; 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 46lCMQ4h8tz9sNw for ; Sat, 5 Oct 2019 00:44:48 +1000 (AEST) 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:message-id:date:mime-version:content-type; q=dns; s= default; b=R1+U9mxIredIv2t47kr/j1/5MwL9+TYDG8hPjqO503YtXpWT9cLr2 ARnvRT3p5KzfLeaiVzzDvuLq7qMmlHsXApanoUY78xg5n6Val+L7OQ8UHW/avCgO wN5fhAYZD66zWpR52j0Rh9H7CcD1XQxPkhhNnCOn1on3Orquo9dA84= 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:message-id:date:mime-version:content-type; s= default; bh=esbqf37o3/rn3LvGxg1kkU/9O+M=; b=ouzhEtQOjpGopkz+jWdG RCziST1i9GDdNT/S8F5D2+XziL0Nn0FV55ixjCdCO9O8QSfZ8HyFIA0AYd6E1hwo MIK94pxausPggpvy/lWoDqtIKoCvICFMbL5aeCeTaeCa3szCrU6wuIyUo1BBO0Ff RBtoO2XWkZ1cGgb5vc0RPKU= Received: (qmail 2397 invoked by alias); 4 Oct 2019 14:44:42 -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 2387 invoked by uid 89); 4 Oct 2019 14:44:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=bra, carrying, cc0, disappear X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Oct 2019 14:44:40 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 35FD2308C383 for ; Fri, 4 Oct 2019 14:44:39 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-68.rdu2.redhat.com [10.10.112.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E9765D721 for ; Fri, 4 Oct 2019 14:44:38 +0000 (UTC) From: Jeff Law Openpgp: preference=signencrypt To: gcc-patches Subject: [committed] Disable broken H8/SX patterns/expanders Message-ID: Date: Fri, 4 Oct 2019 08:44:37 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 X-IsSubscribed: yes Spurred by an IRC discussion with Segher a week or so ago this is a patch I've been carrying around for a long time that I'm going to push into the trunk. The H8 port will fail to build parts of libgcc because of its block move patterns will fail at compile time. Whether or not they fail depends on the precise set of registers used by the pattern and nearby code. Unfortunately, I've been unable to find documentation on the insns used by these patterns (they're for a variant of the H8 I've never worked with). I've also been unable to justify spending significant amounts of time tracking down precisely what's wrong. As a result this patch has lingered in my tester. The patch simply disables the problematical patterns in the H8 md file. With these patterns disabled the H8 consistently builds and has consistent testing results. If my son ends up finishing the conversion of the H8 from cc0 to MODE_CC, we'll then convert to LRA and try to re-enable the patterns again. Otherwise the port is on the deprecation list and thus will disappear in gcc-11. Committing to the trunk momentarily. Jeff * config/h8300/h8300.md (cpymemsi): Disable. (movmd, movmd_internal_, movstr, movsd): (movstr, movsd, stpcpy_internal_: Likewise. (movmd splitter, movsd splitter): Likewise. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 0686f25d71d..c43175d5bc0 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -483,7 +483,7 @@ (use (match_operand:BLK 1 "memory_operand" "")) (use (match_operand:SI 2 "" "")) (use (match_operand:SI 3 "const_int_operand" ""))] - "TARGET_H8300SX" + "TARGET_H8300SX && 0" { if (h8sx_emit_movmd (operands[0], operands[1], operands[2], INTVAL (operands[3]))) DONE; @@ -505,7 +505,7 @@ (clobber (match_dup 5)) (set (match_dup 2) (const_int 0))])] - "TARGET_H8300SX" + "TARGET_H8300SX && 0" { operands[4] = copy_rtx (XEXP (operands[0], 0)); operands[5] = copy_rtx (XEXP (operands[1], 0)); @@ -523,7 +523,7 @@ (clobber (match_operand:P 1 "register_operand" "=f,f")) (set (match_operand:HI 2 "register_operand" "=c,c") (const_int 0))] - "TARGET_H8300SX" + "TARGET_H8300SX && 0" "@ movmd%m6 #" @@ -553,6 +553,7 @@ (set (match_dup 2) (const_int 0))] "TARGET_H8300SX && reload_completed + && 0 && REGNO (operands[4]) != DESTINATION_REG" [(const_int 0)] { @@ -573,7 +574,7 @@ [(use (match_operand 0 "register_operand" "")) (use (match_operand:BLK 1 "memory_operand" "")) (use (match_operand:BLK 2 "memory_operand" ""))] - "TARGET_H8300SX" + "TARGET_H8300SX && 0" { operands[1] = replace_equiv_address (operands[1], copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); @@ -596,7 +597,7 @@ (clobber (match_dup 3)) (clobber (match_dup 4)) (clobber (match_operand 2 "register_operand" ""))])] - "TARGET_H8300SX" + "TARGET_H8300SX && 0" { operands[3] = copy_rtx (XEXP (operands[0], 0)); operands[4] = copy_rtx (XEXP (operands[1], 0)); @@ -611,7 +612,7 @@ (clobber (match_operand:P 0 "register_operand" "=d,??D")) (clobber (match_operand:P 1 "register_operand" "=f,f")) (clobber (match_operand:P 2 "register_operand" "=c,c"))] - "TARGET_H8300SX" + "TARGET_H8300SX && 0" "@ \n1:\tmovsd\t2f\;bra\t1b\n2: #" @@ -628,6 +629,7 @@ (clobber (match_operand:P 3 "register_operand" "")) (clobber (match_operand:P 4 "register_operand" ""))] "TARGET_H8300SX && reload_completed + && 0 && REGNO (operands[2]) != DESTINATION_REG" [(const_int 0)] {