From patchwork Fri Apr 25 10:47:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 342757 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 1DD94140161 for ; Fri, 25 Apr 2014 20:48:43 +1000 (EST) 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:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=n+UUU723rKQTafoo 6xuYfVIABuvU/XZxoAWbzbMjaC0wwvzs9Rk/oS2p7otQkzjRDrZmTF7RqEoDrEO/ jmh+IQEE7TPu7Ku0VCRjMeKcSLtBffcE5Lih7iN8zSKbrGXD16cFRsM/gKojLD2i mxyc1SoVNBmSPzA7+4kD6VCXZo0= 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:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=Jw91uLeB4e3zl/v5e8gAk9 BNThY=; b=Uk8DzDCWMcu1+J/oKvpphLGuZsT7kZYaSROGIM0KxPTfp1JyyusRyT w+SckbECLZCxs/4v7vdXuIcie39Q5IltsJdfqKFb8GrOHPxjq1hB0s3vgPUU+tBW slhQNYp9/LupeAb62NrLKracG1Fhbup77GTsF9IfsNVYDpOsG/zjU= Received: (qmail 8818 invoked by alias); 25 Apr 2014 10:48:25 -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 8755 invoked by uid 89); 25 Apr 2014 10:48:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 25 Apr 2014 10:48:22 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id BE0462727FAD for ; Fri, 25 Apr 2014 12:48:19 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U8b4ksGplgDM for ; Fri, 25 Apr 2014 12:48:19 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 9B95F2727EBE for ; Fri, 25 Apr 2014 12:48:19 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [SPARC] Fix PR target/60941 Date: Fri, 25 Apr 2014 12:47:32 +0200 Message-ID: <3316944.sc4MgGFZdG@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 This is a regression present on all active branches. The first pattern added by http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00060.html is wrong since, as counter-intuitive as it may seem, "sll" also does a full 64-bit shift. Tested on SPARC/Solaris, applied on all active branches. 2014-04-25 Eric Botcazou PR target/60941 * config/sparc/sparc.md (ashlsi3_extend): Delete. 2014-04-25 Eric Botcazou * gcc.c-torture/execute/20140425-1.c: New test. Index: config/sparc/sparc.md =================================================================== --- config/sparc/sparc.md (revision 209778) +++ config/sparc/sparc.md (working copy) @@ -5795,19 +5795,6 @@ (define_insn "ashlsi3" } [(set_attr "type" "shift")]) -(define_insn "*ashlsi3_extend" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI - (ashift:SI (match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "arith_operand" "rI"))))] - "TARGET_ARCH64" -{ - if (GET_CODE (operands[2]) == CONST_INT) - operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f); - return "sll\t%1, %2, %0"; -} - [(set_attr "type" "shift")]) - (define_expand "ashldi3" [(set (match_operand:DI 0 "register_operand" "=r") (ashift:DI (match_operand:DI 1 "register_operand" "r")