From patchwork Tue Jun 20 10:28:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 778217 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 3wsPFQ3cw5z9s4q for ; Tue, 20 Jun 2017 20:28:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="IhH/gS/g"; 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:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=CYrYUzK+AaXw/LXv ZuZYGMz9dVgK8B0ZCYtF2Uljs6FQ+iLvzlZUehQp/Lzo4DKMkuZROQqd/CF1lVhI Avv/8oAqY97n+egvkAlcWSruutFNhArv+wSmTbMJZecyoYXkn9uNZjNLseHgHoqJ 32DmevRVWaqJFUily8T3Eb0M7Pc= 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:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=/bWvF06xbzpBNkg4yga+jb Wfg5k=; b=IhH/gS/gBRSWwCm5/GRDZamgmNIpm5DDUCsjs33LTtVdN0tFkuZOtY 0I8Q+SAN0kSLJh18l17pe9MZWfdF1mlAnee92TRxpR0Om8sOg9zvSmwOmZl4pu0x 9QlnRven20UmNdPfaDKQrkYm3lmUdUph1y8P2JKc53bg27xt3EOaI= Received: (qmail 54396 invoked by alias); 20 Jun 2017 10:28:12 -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 54284 invoked by uid 89); 20 Jun 2017 10:28:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1795, 53637 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Jun 2017 10:28:09 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4A827AAB9; Tue, 20 Jun 2017 10:28:07 +0000 (UTC) From: Andreas Schwab To: Jeff Law Cc: gcc-patches Subject: Re: [PR target/25111] New patterns for m68k bit insns References: <9474d6d5-f806-9118-d69a-000d43f62a9e@redhat.com> X-Yow: OVER the undertow! UNDER the overpass! Around the FUTURE and BEYOND REPAIR!! Date: Tue, 20 Jun 2017 12:28:06 +0200 In-Reply-To: (Andreas Schwab's message of "Mon, 19 Jun 2017 17:07:09 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Tested on m68k, installed on trunk and gcc-7 branch. Andreas. PR target/80970 * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d" instead of "+d". Index: config/m68k/m68k.md =================================================================== --- config/m68k/m68k.md (revision 249400) +++ config/m68k/m68k.md (working copy) @@ -5337,7 +5337,7 @@ [(set_attr "type" "bitrw")]) (define_insn "*bsetdreg" - [(set (match_operand:SI 0 "register_operand" "+d") + [(set (match_operand:SI 0 "register_operand" "=d") (ior:SI (ashift:SI (const_int 1) (and:SI (match_operand:SI 1 "register_operand" "d") (const_int 31))) @@ -5350,7 +5350,7 @@ [(set_attr "type" "bitrw")]) (define_insn "*bchgdreg" - [(set (match_operand:SI 0 "register_operand" "+d") + [(set (match_operand:SI 0 "register_operand" "=d") (xor:SI (ashift:SI (const_int 1) (and:SI (match_operand:SI 1 "register_operand" "d") (const_int 31))) @@ -5363,7 +5363,7 @@ [(set_attr "type" "bitrw")]) (define_insn "*bclrdreg" - [(set (match_operand:SI 0 "register_operand" "+d") + [(set (match_operand:SI 0 "register_operand" "=d") (and:SI (rotate:SI (const_int -2) (and:SI (match_operand:SI 1 "register_operand" "d") (const_int 31))) Index: testsuite/gcc.dg/torture/pr80970.c =================================================================== --- testsuite/gcc.dg/torture/pr80970.c (nonexistent) +++ testsuite/gcc.dg/torture/pr80970.c (working copy) @@ -0,0 +1,13 @@ +/* { dg-do compile } */ + +int a, b, c, d, e; +void f () +{ + long g, h; + if (c) + e = d; + g = d & 31; + h = 1 << g; + a = e | h; + b = a; +}