From patchwork Tue Jun 22 17:09:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: PATCH: PR target/44615: -mtune=atom failed on sse2-vec-2.c and amd64-abi-3.c Date: Tue, 22 Jun 2010 07:09:01 -0000 From: "H.J. Lu" X-Patchwork-Id: 56537 Message-Id: To: Uros Bizjak Cc: 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,