From patchwork Tue Jun 22 17:09:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 56537 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 4C58FB6F0C for ; Wed, 23 Jun 2010 03:09:12 +1000 (EST) Received: (qmail 3500 invoked by alias); 22 Jun 2010 17:09:10 -0000 Received: (qmail 3490 invoked by uid 22791); 22 Jun 2010 17:09:10 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, TW_HF, TW_SR, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-pv0-f175.google.com (HELO mail-pv0-f175.google.com) (74.125.83.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Jun 2010 17:09:03 +0000 Received: by pvg3 with SMTP id 3so106789pvg.20 for ; Tue, 22 Jun 2010 10:09:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.196.5 with SMTP id t5mr5572403wff.54.1277226541537; Tue, 22 Jun 2010 10:09:01 -0700 (PDT) Received: by 10.142.212.10 with HTTP; Tue, 22 Jun 2010 10:09:01 -0700 (PDT) In-Reply-To: References: <20100621171703.GA9361@intel.com> Date: Tue, 22 Jun 2010 10:09:01 -0700 Message-ID: Subject: Re: PATCH: PR target/44615: -mtune=atom failed on sse2-vec-2.c and amd64-abi-3.c From: "H.J. Lu" To: Uros Bizjak Cc: gcc-patches@gcc.gnu.org X-IsSubscribed: yes 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 On Mon, Jun 21, 2010 at 12:52 PM, Uros Bizjak wrote: > On Mon, Jun 21, 2010 at 9:38 PM, H.J. Lu wrote: > > >>>> 2010-06-21  H.J. Lu   >>>> >>>>        PR target/44615 >>>>        * config/i386/atom.md (atom_sseishft_2): Also check sseishft1. >>>> >>>>        * config/i386/i386.md (type): Add sseishft1 >>>> >>>>        * config/i386/ppro_insn (ppro_insn): Also check sseishft1. >>>>        (ppro_insn_load): Likewise. >>>>        (ppro_insn_store): Likewise. >>>>        (ppro_insn_both): Likewise. >>>> >>>>        * config/i386/sse.md (avx_lshrv1ti3): Replace sseishft with >>>>        sseishft1 for type. >>>>        (sse2_lshrv1ti3): Likewise. >>> >>> No need to change above two patterns, they do have operand 2. >>> >> >> The condition is >> >> ;; if palignr or psrldq >> (define_insn_reservation  "atom_sseishft_2" 1 >>  (and (eq_attr "cpu" "atom") >>       (ior (eq_attr "type" "sseishft1") >>            (and (eq_attr "type" "sseishft") >>                 (and (eq_attr "atom_unit" "sishuf") >>                      (match_operand 2 "immediate_operand"))))) >>  "atom-simple-0") >> >> XXX_shrv1ti3 don't have atom_unit. I can either add atom_unit >> or use sseishft1 I choose sseishft1 for consistency. I can set >> atom_unit to sishuf if it is preferred. > > Yes, please set atom_unit to sishuf. Let's leave sseishft1 type to > "shift-with-only-one-operand" type of insns. > > Thanks, > Uros. > I missed unit attribute. Here is a patch. I am checking it into trunk/4.5 as an obvious fix. Thanks diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index e934696..ab90d73 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -372,7 +372,7 @@ (define_attr "unit" "integer,i387,sse,mmx,unknown" (cond [(eq_attr "type" "fmov,fop,fsgn,fmul,fdiv,fpspc,fcmov,fcmp,fxch,fistp,f isttp,frndint") (const_string "i387") - (eq_attr "type" "sselog,sselog1,sseiadd,sseiadd1,sseishft,sseimul, + (eq_attr "type" "sselog,sselog1,sseiadd,sseiadd1,sseishft,sseishft1,sse imul, sse,ssemov,sseadd,ssemul,ssecmp,ssecomi,ssecvt,