From patchwork Mon Dec 10 19:55:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 205020 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]) by ozlabs.org (Postfix) with SMTP id 2D2932C0324 for ; Tue, 11 Dec 2012 06:56:02 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1355774163; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Mail-Followup-To:Cc:Subject:References:Date: In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=SvfC5S4koMg6FNgq3nk7 f7IQHrU=; b=RrbTAqxKPRTGXwH/RqCK4gGAowCMK83BuY6DNj5p4Iyiegk+YGMY E0IcDbOulc3BmQU5GQf+aWQ1H3iC9Kd8wqFLDdw79suYnbBdPUgxkzryPIsQen3T MKDqxGxId4n/4ndZI0oklwxJYeZk/g8zFvRAXLzHwpijZ7iJhM3AhwA= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Mail-Followup-To:Cc:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=epe4SvQN20XrmCHN7AznSr+7HvgJXedERElcaE5GuYsEF0+5CAl78NtoWSL8pU mO0RPGXaB+7ug1ipM2N+/QYkQ1klV/OUHK/MTWcrLYwBLNZbRq6TXUy5Q0Hl4trG zjX9K9qQA77/wgymMyOtG206hK5XxKSp3d1kAfjXs1ZH4=; Received: (qmail 24388 invoked by alias); 10 Dec 2012 19:55:57 -0000 Received: (qmail 24270 invoked by uid 22791); 10 Dec 2012 19:55:56 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL, BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, KHOP_RCVD_TRUST, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_MG X-Spam-Check-By: sourceware.org Received: from mail-we0-f175.google.com (HELO mail-we0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Dec 2012 19:55:52 +0000 Received: by mail-we0-f175.google.com with SMTP id z53so1422141wey.20 for ; Mon, 10 Dec 2012 11:55:51 -0800 (PST) Received: by 10.180.81.232 with SMTP id d8mr12814807wiy.14.1355169351000; Mon, 10 Dec 2012 11:55:51 -0800 (PST) Received: from localhost ([2.28.234.219]) by mx.google.com with ESMTPS id ec3sm11437221wib.10.2012.12.10.11.55.49 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 11:55:50 -0800 (PST) From: Richard Sandiford To: "Steve Ellcey " Mail-Followup-To: "Steve Ellcey " , , rdsandiford@googlemail.com Cc: Subject: Re: [patch, mips, testsuite] Fix scan on gcc.target/mips/ext-2.c References: <487cd252-3f6e-41d1-b313-ac9dbe928370@EXCHHUB01.MIPS.com> Date: Mon, 10 Dec 2012 19:55:44 +0000 In-Reply-To: <487cd252-3f6e-41d1-b313-ac9dbe928370@EXCHHUB01.MIPS.com> (Steve Ellcey's message of "Mon, 10 Dec 2012 09:11:17 -0800") Message-ID: <87sj7d1y2n.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 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 "Steve Ellcey " writes: > In looking at the failure of gcc.target/mips/ext-2.c, it looks like the > GCC compiler is now figuring out that it can use a 32 bit ext instruction > instead of a 64 bit dext instruction and that this is why the test > fails. Here is a patch to look for 'ext' or 'dext', OK to checkin? > It fixes the failure for me and I see no reason why GCC should not use > the ext instruction instead of dext in this case. Agreed, but it no longer matches the original intention of the test: /* Turn the truncate,zero_extend,lshiftrt sequence before the or into a zero_extract. The truncate is due to TARGET_PROMOTE_PROTOTYPES, the zero_extend to PROMOTE_MODE. */ because we've lost the truncate. I went for the patch below instead, after checking that the uncombined sequence really was a truncate/zero_extend/lshiftft sequence. Tested on mips64-linux-gnu (where the test also failed for -mabi=n32 and -mabi=32, but not for -mabi=64). Applied. Richard gcc/testsuite/ * gcc.target/mips/ext-2.c: Require -mlong64. Index: gcc/testsuite/gcc.target/mips/ext-2.c =================================================================== --- gcc/testsuite/gcc.target/mips/ext-2.c 2012-08-27 17:31:22.000000000 +0100 +++ gcc/testsuite/gcc.target/mips/ext-2.c 2012-12-10 19:50:25.159758211 +0000 @@ -2,7 +2,7 @@ zero_extract. The truncate is due to TARGET_PROMOTE_PROTOTYPES, the zero_extend to PROMOTE_MODE. */ /* { dg-do compile } */ -/* { dg-options "isa_rev>=2 -mgp64" } */ +/* { dg-options "isa_rev>=2 -mgp64 -mlong64" } */ /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ /* { dg-final { scan-assembler "\tdext\t" } } */ /* { dg-final { scan-assembler-not "\tand" } } */