From patchwork Thu Sep 13 13:47:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 183630 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 211A72C0088 for ; Thu, 13 Sep 2012 23:47:25 +1000 (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=1348148846; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=1XTfVQ0 gyKo/176XNbfmur/ekRc=; b=tz4OjJ3835NUaL7xRQpSrOHD+C1iPCTKKuRSlO2 Kjd7rLwJI5BPJtjOltrMT0lHvXmkq9ThzKgzDp4pbkRcoG+bkC8TJZ15hXoWz/bP nnC800Mi8cEdqXq3dCOoenDjsKlyKwLYoyVMGzBccw4vEioIkYGhLNdORcY4f5qy n0cA= 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:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=TIMvAXO5JHUz6WComqP1pnzJO+YJAcgFyKcwHUMG8t57wA3wX1UFFxaJCUyPwj B3WhXV5kwajaDFvC7TSdvYQrPdAnZKFBP97VVztOQtzti6PlE+N7qJ7eD2XGIrWJ MGhFUuNytG1J3DBhobrc9jcIaKenX63+4U462hUMmfCEE=; Received: (qmail 11724 invoked by alias); 13 Sep 2012 13:47:21 -0000 Received: (qmail 11710 invoked by uid 22791); 13 Sep 2012 13:47:20 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Sep 2012 13:47:06 +0000 Received: by pbcwy7 with SMTP id wy7so3985446pbc.20 for ; Thu, 13 Sep 2012 06:47:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.90.38 with SMTP id bt6mr3423595pab.53.1347544026205; Thu, 13 Sep 2012 06:47:06 -0700 (PDT) Received: by 10.66.20.232 with HTTP; Thu, 13 Sep 2012 06:47:06 -0700 (PDT) Date: Thu, 13 Sep 2012 15:47:06 +0200 Message-ID: Subject: [PATCH, i386]: Remove mode of address_operand predicate from prefetch patterns From: Uros Bizjak To: gcc-patches@gcc.gnu.org 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 Hello! The mode of address_operand predicate is ignored in ix86_legitimate_address_p. 2012-08-13 Uros Bizjak * config/i386/i386.md (prefetch): Do not assert mode of operand 0. (*prefetch_sse_): Do not set mode of address_operand predicate. Rename to ... (*prefetch_sse): ... this. (*prefetch_3dnow_): Do not set mode of address_operand predicate. Rename to ... (*prefetch_3dnow): ... this. Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline SVN. Uros. Index: i386.md =================================================================== --- i386.md (revision 191240) +++ i386.md (working copy) @@ -17800,12 +17800,10 @@ int locality = INTVAL (operands[2]); gcc_assert (rw == 0 || rw == 1); - gcc_assert (locality >= 0 && locality <= 3); - gcc_assert (GET_MODE (operands[0]) == Pmode - || GET_MODE (operands[0]) == VOIDmode); + gcc_assert (IN_RANGE (locality, 0, 3)); + if (TARGET_PRFCHW && rw) operands[2] = GEN_INT (3); - /* Use 3dNOW prefetch in case we are asking for write prefetch not supported by SSE counterpart or the SSE prefetch is not available (K6 machines). Otherwise use SSE prefetch as it allows specifying @@ -17816,8 +17814,8 @@ operands[1] = const0_rtx; }) -(define_insn "*prefetch_sse_" - [(prefetch (match_operand:P 0 "address_operand" "p") +(define_insn "*prefetch_sse" + [(prefetch (match_operand 0 "address_operand" "p") (const_int 0) (match_operand:SI 1 "const_int_operand"))] "TARGET_PREFETCH_SSE" @@ -17827,7 +17825,7 @@ }; int locality = INTVAL (operands[1]); - gcc_assert (locality >= 0 && locality <= 3); + gcc_assert (IN_RANGE (locality, 0, 3)); return patterns[locality]; } @@ -17837,8 +17835,8 @@ (symbol_ref "memory_address_length (operands[0])")) (set_attr "memory" "none")]) -(define_insn "*prefetch_3dnow_" - [(prefetch (match_operand:P 0 "address_operand" "p") +(define_insn "*prefetch_3dnow" + [(prefetch (match_operand 0 "address_operand" "p") (match_operand:SI 1 "const_int_operand" "n") (const_int 3))] "TARGET_3DNOW || TARGET_PRFCHW"