]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Add ssemov2, sseicvt2 for some load instructions that use memory on operand2
authorHu, Lin1 <lin1.hu@intel.com>
Wed, 11 Sep 2024 02:10:40 +0000 (10:10 +0800)
committerHu, Lin1 <lin1.hu@intel.com>
Thu, 19 Sep 2024 06:53:41 +0000 (14:53 +0800)
The memory attr of some instructions should be 'load', but these are
'none', currently.

gcc/ChangeLog:

* config/i386/i386.md: Add ssemov2, sseicvt2.
* config/i386/sse.md (sse2_cvtsi2sd): Apply sseicvt2.
(sse2_cvtsi2sdq<round_name>): Ditto.
(vec_set<mode>_0): Apply ssemov2 for 4, 6.

gcc/config/i386/i386.md
gcc/config/i386/sse.md

index c0441514949088e3c780cdac18058f23fa320f8f..9c2a0aa61126c7ebb7d500baf3f6300f114ddbce 100644 (file)
    str,bitmanip,
    fmov,fop,fsgn,fmul,fdiv,fpspc,fcmov,fcmp,
    fxch,fistp,fisttp,frndint,
-   sse,ssemov,sseadd,sseadd1,sseiadd,sseiadd1,
+   sse,ssemov,ssemov2,sseadd,sseadd1,sseiadd,sseiadd1,
    ssemul,sseimul,ssediv,sselog,sselog1,
    sseishft,sseishft1,ssecmp,ssecomi,
-   ssecvt,ssecvt1,sseicvt,sseins,
+   ssecvt,ssecvt1,sseicvt,sseicvt2,sseins,
    sseshuf,sseshuf1,ssemuladd,sse4arg,
    lwp,mskmov,msklog,
    mmx,mmxmov,mmxadd,mmxmul,mmxcmp,mmxcvt,mmxshft"
   (cond [(eq_attr "type" "fmov,fop,fsgn,fmul,fdiv,fpspc,fcmov,fcmp,
                          fxch,fistp,fisttp,frndint")
           (const_string "i387")
-        (eq_attr "type" "sse,ssemov,sseadd,sseadd1,sseiadd,sseiadd1,
+        (eq_attr "type" "sse,ssemov,ssemov2,sseadd,sseadd1,sseiadd,sseiadd1,
                          ssemul,sseimul,ssediv,sselog,sselog1,
                          sseishft,sseishft1,ssecmp,ssecomi,
-                         ssecvt,ssecvt1,sseicvt,sseins,
+                         ssecvt,ssecvt1,sseicvt,sseicvt2,sseins,
                          sseshuf,sseshuf1,ssemuladd,sse4arg,mskmov")
           (const_string "sse")
         (eq_attr "type" "mmx,mmxmov,mmxadd,mmxmul,mmxcmp,mmxcvt,mmxshft")
                   mmx,mmxmov,mmxcmp,mmxcvt,mskmov,msklog")
              (match_operand 2 "memory_operand"))
           (const_string "load")
+        (and (eq_attr "type" "ssemov2,sseicvt2")
+             (match_operand 2 "memory_operand"))
+          (const_string "load")
         (and (eq_attr "type" "icmov,ssemuladd,sse4arg")
              (match_operand 3 "memory_operand"))
           (const_string "load")
index 1ae61182d0ccc750f7e9a964b296b1d7da428904..ff4f33b7b637a945df034874abb7c350dc461296 100644 (file)
    cvtsi2sd{l}\t{%2, %0|%0, %2}
    vcvtsi2sd{l}\t{%2, %1, %0|%0, %1, %2}"
   [(set_attr "isa" "noavx,noavx,avx")
-   (set_attr "type" "sseicvt")
+   (set_attr "type" "sseicvt2")
    (set_attr "athlon_decode" "double,direct,*")
    (set_attr "amdfam10_decode" "vector,double,*")
    (set_attr "bdver1_decode" "double,direct,*")
    cvtsi2sd{q}\t{%2, %0|%0, %2}
    vcvtsi2sd{q}\t{%2, <round_op3>%1, %0|%0, %1<round_op3>, %2}"
   [(set_attr "isa" "noavx,noavx,avx")
-   (set_attr "type" "sseicvt")
+   (set_attr "type" "sseicvt2")
    (set_attr "athlon_decode" "double,direct,*")
    (set_attr "amdfam10_decode" "vector,double,*")
    (set_attr "bdver1_decode" "double,direct,*")
              (const_string "imov")
            (eq_attr "alternative" "14")
              (const_string "fmov")
+           (eq_attr "alternative" "4,6")
+             (const_string "ssemov2")
           ]
           (const_string "ssemov")))
    (set (attr "addr")