From patchwork Mon Feb 22 13:08:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 586154 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 EBCE51402DD for ; Tue, 23 Feb 2016 00:09:00 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Y4Ul6bdK; 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:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=pkxOfyzlwEkAAk/JtQaZhnX4EvC22 yEPmM78TcD4ZFlIC8B7hSGcHOqY8CJhqnGaZnlFSUQDQWJ08zjN7oPLfiGyMDbVp yBT48EImy2hvmTglOXKM9PyJzD1nPeojFGmtqcOkwfRC//wQn4Q0iWp55nxL1TLg qc29x5VF4TV9KQ= 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:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=bHtBbxdBnFkkdBzkh0H7CTEnCAM=; b=Y4U l6bdKBpwz2g1vxJ1EfDQTKIWoYybs75358fO9TJYb5FjQX94pq7DlYr4Zu3mTBM/ mXC0J1Sw6lSv1rCsDkUSf2iaL4KwACgVv1MLPkssrOEWoT8e9Q/dekTrOjSF0ULT M2rHuFHvx0eJCe9VHluqjtuZhvdzZ9hgJLkDA+5U= Received: (qmail 104237 invoked by alias); 22 Feb 2016 13:08:53 -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 104219 invoked by uid 89); 22 Feb 2016 13:08:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:registe, sk:const_i, 20160120, sk:dg-addi 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 22 Feb 2016 13:08:46 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 9DB4E8553D; Mon, 22 Feb 2016 13:08:45 +0000 (UTC) Received: from tucnak.zalov.cz ([10.3.113.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1MD8iuT026352 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 Feb 2016 08:08:45 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u1MD8feY028462; Mon, 22 Feb 2016 14:08:42 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u1MD8d9e028461; Mon, 22 Feb 2016 14:08:39 +0100 Date: Mon, 22 Feb 2016 14:08:39 +0100 From: Jakub Jelinek To: Jeff Law , Andreas Schwab Cc: gcc-patches@gcc.gnu.org, Matthias Klose Subject: [PATCH] Fix bootstrap on m68k (PR target/69885) Message-ID: <20160222130839.GJ3017@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes Hi! Supposedly my recent invalid shift count expansion changes broke m68k bootstrap, we now really require that the shift expanders have some non-VOIDmode, so that we can convert_mode it to that mode. But m68k didn't specify mode. For valid shift counts the patch makes no difference beyond fixing the ICE, those are all CONST_INTs which when converted to CONST_INTs valid for SImode give the same values. Fixed thusly, Matthias has kindly tested it on m68k-linux, ok for trunk? 2016-02-22 Jakub Jelinek PR target/69885 * config/m68k/m68k.md (ashldi3, ashrdi3, lshrdi3): Use SImode for last match_operand. * gcc.dg/pr69885.c: New test. Jakub --- gcc/config/m68k/m68k.md.jj 2016-01-20 10:55:16.000000000 +0100 +++ gcc/config/m68k/m68k.md 2016-02-22 11:14:01.789697673 +0100 @@ -4544,7 +4544,7 @@ (define_insn "*ashldi3" (define_expand "ashldi3" [(set (match_operand:DI 0 "register_operand" "") (ashift:DI (match_operand:DI 1 "register_operand" "") - (match_operand 2 "const_int_operand" "")))] + (match_operand:SI 2 "const_int_operand" "")))] "!TARGET_COLDFIRE" { /* ??? This is a named pattern like this is not allowed to FAIL based @@ -4813,7 +4813,7 @@ (define_insn "ashrdi_const" (define_expand "ashrdi3" [(set (match_operand:DI 0 "register_operand" "") (ashiftrt:DI (match_operand:DI 1 "register_operand" "") - (match_operand 2 "const_int_operand" "")))] + (match_operand:SI 2 "const_int_operand" "")))] "!TARGET_COLDFIRE" { /* ??? This is a named pattern like this is not allowed to FAIL based @@ -5082,7 +5082,7 @@ (define_insn "*lshrdi3_const" (define_expand "lshrdi3" [(set (match_operand:DI 0 "register_operand" "") (lshiftrt:DI (match_operand:DI 1 "register_operand" "") - (match_operand 2 "const_int_operand" "")))] + (match_operand:SI 2 "const_int_operand" "")))] "!TARGET_COLDFIRE" { /* ??? This is a named pattern like this is not allowed to FAIL based --- gcc/testsuite/gcc.dg/pr69885.c.jj 2016-02-22 11:14:50.981023120 +0100 +++ gcc/testsuite/gcc.dg/pr69885.c 2016-02-22 11:13:45.000000000 +0100 @@ -0,0 +1,13 @@ +/* PR target/69885 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-additional-options "-m68000" { target m68k*-*-* } } */ + +void bar (void); + +void +foo (long long x) +{ + if (x >> 1) + bar (); +}