Patchwork PATCH: PR target/44615: -mtune=atom failed on sse2-vec-2.c and amd64-abi-3.c

login
register
mail settings
Submitter H.J. Lu
Date June 22, 2010, 5:09 p.m.
Message ID <AANLkTikpgEFa7PfIy-upjkYEAnyJtEVFe_l3zJH_6r07@mail.gmail.com>
Download mbox | patch
Permalink /patch/56537/
State New
Headers show

Comments

H.J. Lu - June 22, 2010, 5:09 p.m.
On Mon, Jun 21, 2010 at 12:52 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Mon, Jun 21, 2010 at 9:38 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
>
>>>> 2010-06-21  H.J. Lu  <hongjiu.lu@intel.com>
>>>>
>>>>        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

Patch

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,